Skip to content

rc4 appveyor/travis cleanup #1599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ matrix:
- os: osx # OSX 10.11
osx_image: xcode7.2
dotnet: 1.0.0-preview2-003121
- os: osx # OSX 10.12
osx_image: xcode7.3
dotnet: 1.0.0-rc4-0044771

## If `dotnet` configuration doesnt work, use install script instead
# install:
# - export DOTNET_INSTALL_DIR="$PWD/.dotnetsdk"
# - curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version "$CLI_VERSION" --install-dir "$DOTNET_INSTALL_DIR"
# - export PATH="$DOTNET_INSTALL_DIR:$PATH"

script:
- dotnet --info
# Run a new console app
- mkdir -p "test/test-dotnet-new" && pushd "test/test-dotnet-new"
- dotnet new
- dotnet restore
- dotnet --verbose run a b
- dotnet run a b
- popd
36 changes: 15 additions & 21 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
os: Visual Studio 2015

## .NET Core SDK preview1 is already installed in the build worker image Visual Studio 2015
##
## To install a specific version:
##
## install:
## # .NET Core SDK binaries
## ## 1) from direct url
## - ps: $url = "https://go.microsoft.com/fwlink/?LinkID=798402" # v1.0.0-preview1 x64
## ## 2) from url based on version, for example using an env var CLI_VERSION that can be a
## ## a specific version `1.0.0-preview2-003121` or `Latest` (for latest dev version)
## - ps: $url = "https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$($env:CLI_VERSION)/dotnet-dev-win-x64.$($env:CLI_VERSION.ToLower()).zip"
## # Download .NET Core SDK and add to PATH
## - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
## - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
## - ps: $tempFile = [System.IO.Path]::GetTempFileName()
## - ps: (New-Object System.Net.WebClient).DownloadFile($url, $tempFile)
## - ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFile, $env:DOTNET_INSTALL_DIR)
## - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
# NOTE .NET Core SDK preview2 is already installed in the build worker image Visual Studio 2015
# so the `install` section is not required

environment:
CLI_VERSION: 1.0.0-rc4-004771

install:
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
- ps: Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1"
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version $env:CLI_VERSION -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"

build_script:
# dotnet info
- ps: dotnet --info
# Run dotnet new
- ps: mkdir "test\test-dotnet-new" -Force | Push-Location
- ps: dotnet new --lang fsharp
- ps: dotnet new console -lang f#
- ps: dotnet restore
- ps: dotnet --verbose build
- ps: dotnet --verbose run a b
- ps: dotnet build
- ps: dotnet run a b
- ps: Pop-Location


Expand Down
12 changes: 7 additions & 5 deletions docs/core/preview3/tools/using-ci-with-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,17 @@ $LOCALDOTNET="./$INSTALLDIR/dotnet"
### TravisCI

The [Travis-CI](https://travis-ci.org/) can be configured to install the .NET Core SDK using the `csharp` language and the `dotnet` key.
See official travis docs about [Building a C#, F#, or Visual Basic Project](https://docs.travis-ci.com/user/languages/csharp/) for more info.

As a note, the `language: csharp` (community maintained) works for all .NET languages (for F# projects too) and support mono.

Just use:

```yaml
dotnet: 1.0.0-rc4-0044771
```

Travis can run both `osx` (OS X 10.11) and `linux` ( Ubuntu 14.04 ) job in a build matrix, see [example .travis.yml](https://github.com/dotnet/docs/blob/master/.travis.yml)
Travis can run both `osx` (OS X 10.11, OS X 10.12) and `linux` ( Ubuntu 14.04 ) job in a build matrix, see [example .travis.yml](https://github.com/dotnet/docs/blob/master/.travis.yml)
for more information.

The MSBuild-based tools bring both the LTS and Current runtimes (1.0.x and 1.1.x respectively) in the package, so by installing the SDK you will get everything you need to build.
Expand All @@ -148,7 +151,7 @@ os: Visual Studio 2015
It's possible to install a specific version of .NET Core SDK, see [example appveyor.yml](https://github.com/dotnet/docs/blob/master/appveyor.yml)
for more info.

In the example, the .NET Core SDK binaries are downloaded, unzipped in a subdirectory and added to `PATH` environment variable.
In the example, the .NET Core SDK binaries are downloaded and unzipped in a subdirectory, using the install script, and added to `PATH` environment variable.

A build matrix can be added to run integration tests with multiple version of
the .NET Core SDK.
Expand All @@ -157,12 +160,11 @@ the .NET Core SDK.
environment:
matrix:
- CLI_VERSION: 1.0.0-preview2-003121
- CLI_VERSION: 1.0.0-rc4-004771
- CLI_VERSION: Latest

install:
# .NET Core SDK binaries
- ps: $url = "https://dotnetcli.blob.core.windows.net/dotnet/preview/Binaries/$($env:CLI_VERSION)/dotnet-dev-win-x64.$($env:CLI_VERSION.ToLower()).zip"
# follow normal installation from binaries
# see example appveyor.yml for install script
```

### Visual Studio Team Services
Expand Down