2019-08-18 13:38:58 +02:00
|
|
|
image: Visual Studio 2019
|
2019-09-11 22:20:29 +02:00
|
|
|
# branches:
|
|
|
|
# only:
|
|
|
|
# - master
|
2020-01-02 23:42:47 +01:00
|
|
|
version: '{build}'
|
2019-08-23 23:13:45 +02:00
|
|
|
cache:
|
|
|
|
- c:\Tools\vcpkg\installed
|
2019-08-18 13:29:53 +02:00
|
|
|
install:
|
2019-08-18 13:51:32 +02:00
|
|
|
- cd c:\tools\vcpkg
|
|
|
|
- vcpkg integrate install
|
|
|
|
- vcpkg install capnproto
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
2020-01-02 23:39:00 +01:00
|
|
|
- dotnet tool install -g nbgv
|
2020-02-25 21:46:15 +01:00
|
|
|
- choco install opencover --version=4.7.922 --force -y
|
|
|
|
- choco install reportgenerator.portable --version=2.5.0.0 --force -y
|
|
|
|
- dotnet tool install -g coveralls.net --version 1.0.0
|
2020-01-02 17:57:30 +01:00
|
|
|
init:
|
|
|
|
# Good practise, because Windows line endings are different from Unix/Linux ones
|
|
|
|
- cmd: git config --global core.autocrlf true
|
2020-02-25 21:46:15 +01:00
|
|
|
environment:
|
|
|
|
COVERALLS_REPO_TOKEN:
|
|
|
|
secure: mwxwOymoS7vB56iQN5Obbt8+oMqbRpK8Ei2GZUI7Mm46C8asDR/Wu0RAXYlhp85Q
|
2019-08-18 13:29:53 +02:00
|
|
|
before_build:
|
2020-01-03 00:40:41 +01:00
|
|
|
- cmd: nbgv cloud
|
2019-08-18 13:29:53 +02:00
|
|
|
- cmd: dotnet --version
|
2019-08-18 18:01:50 +02:00
|
|
|
- cmd: msbuild -ver
|
2019-08-18 19:38:37 +02:00
|
|
|
- cmd: dotnet restore ./Capnp.Net.Runtime/Capnp.Net.Runtime.csproj --verbosity m
|
2020-03-21 14:40:46 +01:00
|
|
|
- cmd: dotnet restore ./Capnp.Net.Runtime.Tests/Capnp.Net.Runtime.Tests.csproj --verbosity m
|
2019-09-11 22:20:29 +02:00
|
|
|
- cmd: dotnet restore ./CapnpC.CSharp.Generator/CapnpC.CSharp.Generator.csproj --verbosity m
|
2019-09-10 22:48:25 +02:00
|
|
|
- cmd: dotnet restore ./CapnpC.CSharp.Generator.Tests/CapnpC.CSharp.Generator.Tests.csproj --verbosity m
|
2019-09-11 22:20:29 +02:00
|
|
|
- cmd: dotnet restore ./CapnpC.CSharp.MsBuild.Generation/CapnpC.CSharp.MsBuild.Generation.csproj --verbosity m
|
|
|
|
- cmd: dotnet restore ./CapnpC.CSharp.MsBuild.Generation.Tests/CapnpC.CSharp.MsBuild.Generation.Tests.csproj --verbosity m
|
2019-09-11 22:50:37 +02:00
|
|
|
- cmd: dotnet restore ./capnpc-csharp/capnpc-csharp.csproj --verbosity m
|
2019-08-18 13:29:53 +02:00
|
|
|
build_script:
|
2019-08-18 17:44:04 +02:00
|
|
|
- cmd: msbuild ./Capnp.Net.sln /p:Configuration="Debug"
|
|
|
|
- cmd: msbuild ./Capnp.Net.sln /p:Configuration="Release"
|
|
|
|
- cmd: msbuild ./CapnpCompatTest.sln /p:Configuration="Debug"
|
|
|
|
- cmd: msbuild ./CapnpCompatTest.sln /p:Configuration="Release"
|
2020-01-02 22:39:00 +01:00
|
|
|
- ps: scripts\capnpc-csharp-pack.ps1
|
2019-08-18 13:29:53 +02:00
|
|
|
after_build:
|
|
|
|
# For once the build has completed
|
|
|
|
artifacts:
|
2020-01-02 20:21:29 +01:00
|
|
|
- path: bin\Release\Capnp.Net.Runtime.*.nupkg
|
2019-08-21 19:48:04 +02:00
|
|
|
name: Capnp.Net.Runtime
|
2019-08-19 20:54:42 +02:00
|
|
|
type: NuGetPackage
|
2020-01-02 20:21:29 +01:00
|
|
|
- path: bin\Release\CapnpC.CSharp.MsBuild.Generation.*.nupkg
|
2019-09-11 22:20:29 +02:00
|
|
|
name: CapnpC.CSharp.MsBuild.Generation
|
|
|
|
type: NuGetPackage
|
2020-01-02 20:21:29 +01:00
|
|
|
- path: chocolatey\install\capnpc-csharp-win-x86.*.nupkg
|
2019-08-21 19:48:04 +02:00
|
|
|
name: capnpc-csharp-win-x86
|
2019-08-19 20:54:42 +02:00
|
|
|
type: NuGetPackage
|
2020-01-02 20:21:29 +01:00
|
|
|
- path: chocolatey\install\capnpc-csharp.*-deprecated.nupkg
|
2019-12-31 00:24:28 +01:00
|
|
|
name: capnpc-csharp-deprecated
|
|
|
|
type: NuGetPackage
|
2020-01-02 21:34:17 +01:00
|
|
|
- path: capnpc-csharp\nupkg\*.nupkg
|
2019-08-21 19:48:04 +02:00
|
|
|
name: capnpc-csharp
|
2019-08-19 20:54:42 +02:00
|
|
|
type: NuGetPackage
|
2020-02-25 21:46:15 +01:00
|
|
|
- path: coverage\report\*
|
|
|
|
name: Coverage report
|
|
|
|
type: zip
|
2019-08-19 20:54:42 +02:00
|
|
|
test_script:
|
2020-01-03 02:17:07 +01:00
|
|
|
- cmd: |
|
|
|
|
nbgv get-version -v NuGetPackageVersion >> version.txt
|
|
|
|
set /P VERSION=< version.txt
|
2020-02-08 22:28:39 +01:00
|
|
|
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp3.0\CapnpC.CSharp.Generator.Tests.dll
|
2020-01-03 02:17:07 +01:00
|
|
|
choco install capnproto --source="https://chocolatey.org/api/v2" --force -y
|
|
|
|
cd %APPVEYOR_BUILD_FOLDER%\capnpc-csharp
|
|
|
|
dotnet tool install --global --add-source ./nupkg capnpc-csharp --version %VERSION%
|
|
|
|
cd %APPVEYOR_BUILD_FOLDER%\install-test
|
|
|
|
compile-test
|
|
|
|
cd %APPVEYOR_BUILD_FOLDER%
|
2020-02-08 22:28:39 +01:00
|
|
|
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp3.0\CapnpC.CSharp.Generator.Tests.dll
|
2020-01-03 02:17:07 +01:00
|
|
|
dotnet tool uninstall --global capnpc-csharp
|
|
|
|
cd %APPVEYOR_BUILD_FOLDER%\install-test
|
|
|
|
notinstalled-test
|
|
|
|
cd %APPVEYOR_BUILD_FOLDER%\chocolatey\install
|
2020-01-03 02:23:44 +01:00
|
|
|
choco install capnpc-csharp-win-x86 --source=".;https://chocolatey.org/api/v2" --force -y --version %VERSION% --pre
|
2020-01-03 02:17:07 +01:00
|
|
|
cd %APPVEYOR_BUILD_FOLDER%\install-test
|
|
|
|
compile-test
|
|
|
|
choco uninstall capnpc-csharp-win-x86 -y
|
|
|
|
notinstalled-test
|
|
|
|
cd %APPVEYOR_BUILD_FOLDER%
|
2020-02-08 22:28:39 +01:00
|
|
|
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.MsBuild.Generation.Tests\bin\Release\netcoreapp3.0\CapnpC.CSharp.MsBuild.Generation.Tests.dll
|
2020-01-03 02:17:07 +01:00
|
|
|
msbuild -t:restore ./MsBuildGenerationTest/MsBuildGenerationTest.csproj /p:Configuration="Debug" /p:PackageReferenceVersion="%VERSION%"
|
|
|
|
msbuild ./MsBuildGenerationTest/MsBuildGenerationTest.sln /p:Configuration="Debug" /p:PackageReferenceVersion="%VERSION%"
|
|
|
|
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Debug\net471\Capnp.Net.Runtime.Tests.Std20.dll
|
|
|
|
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Release\net471\Capnp.Net.Runtime.Tests.Std20.dll
|
2020-03-21 14:40:46 +01:00
|
|
|
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Debug\netcoreapp2.1\Capnp.Net.Runtime.Tests.Core21.dll
|
|
|
|
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Release\netcoreapp2.1\Capnp.Net.Runtime.Tests.Core21.dll
|
2020-03-01 17:56:51 +01:00
|
|
|
powershell -File .\scripts\measure-coverage.ps1
|
2020-03-21 14:40:46 +01:00
|
|
|
csmacnz.Coveralls --multiple -i "opencover=coverage\cov-Capnp.Net.Runtime.xml;opencover=coverage\cov-CapnpC.CSharp.Generator.xml" --repoToken %COVERALLS_REPO_TOKEN%
|
2019-08-18 13:29:53 +02:00
|
|
|
on_finish :
|
|
|
|
# any cleanup in here
|
2019-08-19 22:46:58 +02:00
|
|
|
deploy:
|
|
|
|
- provider: Environment
|
2019-08-26 21:16:21 +02:00
|
|
|
name: GitHub Releases
|
2019-08-27 20:49:31 +02:00
|
|
|
description: 'Deployed from CI.'
|
2019-08-26 22:31:03 +02:00
|
|
|
artifact: /.*\.nupkg/
|
|
|
|
draft: true
|
|
|
|
prerelease: true
|
2019-08-27 20:49:31 +02:00
|
|
|
force_update: true
|
2019-08-19 22:48:31 +02:00
|
|
|
on:
|
|
|
|
APPVEYOR_REPO_TAG: true
|