Skip to content

Commit

Permalink
Configure AppVeyor CI script for dotnet CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed May 9, 2016
1 parent a13753b commit 0de3387
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
[Bb]in/
[Oo]bj/

# dotnet CLI stuff
.dotnetcli/
scripts/

# mstest test results
TestResults

Expand Down
9 changes: 9 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
72 changes: 65 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,71 @@
---
version: '1.0.{build}'
os: Visual Studio 2015 RC
before_build:
- nuget restore -verbosity detailed
- git submodule update --init --recursive

os: Visual Studio 2015

environment:
matrix:
- CLI_VERSION: Latest
Configuration: Debug
Framework: net45
- CLI_VERSION: Latest
Configuration: Release
Framework: net45
- CLI_VERSION: Latest
Configuration: Debug
Framework: netcoreapp1.0
- CLI_VERSION: Latest
Configuration: Release
Framework: netcoreapp1.0

install:
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
build:
verbosity: minimal
# Download install script to install .NET cli in .dotnet dir
- ps: |
mkdir -f scripts/ > $null
# Download install script from CLI repo
wget https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1 -OutFile .\scripts\install.ps1
$DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
.\scripts\install.ps1 -Channel preview -version $env:CLI_VERSION -InstallDir "$DOTNET_INSTALL_DIR" -NoPath
# add dotnet to PATH
$env:Path = "$DOTNET_INSTALL_DIR;$env:Path"
build_script:
- git submodule update --init --recursive
- ps: |
if (gcm dotnet -errorAction SilentlyContinue) {
echo "Using dotnet '$((gcm dotnet).Path)'"
dotnet --info
}
else {
echo "dotnet.exe not found"
exit 1
}
# dotnet restore
dotnet restore
if($env:Framework -eq "net45") {
$FrameworkLibsMoniker = "net45"
} else {
$FrameworkLibsMoniker = "netstandard1.4"
}
# Build projects
dotnet build -c $env:Configuration -f $FrameworkLibsMoniker .\MaxMind.Db
dotnet build -c $env:Configuration -f $env:Framework .\MaxMind.Db.Benchmark
dotnet build -c $env:Configuration -f $env:Framework .\MaxMind.Db.Test
test_script:
- ps: |
# Run tests
cd .\MaxMind.Db.Test
dotnet run -f $env:Framework
notifications:
- auth_token:
secure: X+ymndzchVeC2LYsehzOt/GEMFfZJeTENeAU9lwNwTuCxBXFJNkuwZLd9joAtHgykHQoYqmEv/nH64+MA6nTlw==
Expand Down

0 comments on commit 0de3387

Please sign in to comment.