forked from c80k/capnproto-dotnetcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
103 lines (103 loc) · 4.7 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
image: Visual Studio 2019
# branches:
# only:
# - master
version: '{build}'
cache:
- c:\Tools\vcpkg\installed
install:
- cd c:\tools\vcpkg
- vcpkg integrate install
- vcpkg install capnproto
- set PATH_COPY=%PATH%
- set PATH=%PATH%;c:\tools\vcpkg\installed\x86-windows\tools\capnproto
- cd %APPVEYOR_BUILD_FOLDER%
- dotnet tool install -g nbgv --version 3.4.240
- choco install reportgenerator.portable --version=4.5.6 --force -y
- dotnet tool install -g coveralls.net --version 1.0.0
init:
# Good practise, because Windows line endings are different from Unix/Linux ones
- cmd: git config --global core.autocrlf true
environment:
COVERALLS_REPO_TOKEN:
secure: mwxwOymoS7vB56iQN5Obbt8+oMqbRpK8Ei2GZUI7Mm46C8asDR/Wu0RAXYlhp85Q
MSBUILDSINGLELOADCONTEXT: '1'
before_build:
- cmd: nbgv cloud
- cmd: dotnet --version
- cmd: msbuild -ver
- cmd: dotnet restore ./Capnp.Net.Runtime/Capnp.Net.Runtime.csproj --verbosity m
- cmd: dotnet restore ./Capnp.Net.Runtime.Tests/Capnp.Net.Runtime.Tests.csproj --verbosity m
- cmd: dotnet restore ./CapnpC.CSharp.Generator/CapnpC.CSharp.Generator.csproj --verbosity m
- cmd: dotnet restore ./CapnpC.CSharp.Generator.Tests/CapnpC.CSharp.Generator.Tests.csproj --verbosity m
- 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
- cmd: dotnet restore ./capnpc-csharp/capnpc-csharp.csproj --verbosity m
build_script:
- cmd: msbuild ./Capnp.Net.sln /p:Configuration="Debug" -V:m
- cmd: msbuild ./Capnp.Net.sln /p:Configuration="Release" -V:m
- cmd: msbuild ./CapnpCompatTest.sln /p:Configuration="Debug" -V:m
- cmd: msbuild ./CapnpCompatTest.sln /p:Configuration="Release" -V:m
- ps: scripts\capnpc-csharp-pack.ps1
after_build:
# For once the build has completed
artifacts:
- path: bin\Release\Capnp.Net.Runtime.*.nupkg
name: Capnp.Net.Runtime
type: NuGetPackage
- path: bin\Release\CapnpC.CSharp.MsBuild.Generation.*.nupkg
name: CapnpC.CSharp.MsBuild.Generation
type: NuGetPackage
- path: chocolatey\install\capnpc-csharp-win-x86.*.nupkg
name: capnpc-csharp-win-x86
type: NuGetPackage
- path: chocolatey\install\capnpc-csharp.*-deprecated.nupkg
name: capnpc-csharp-deprecated
type: NuGetPackage
- path: capnpc-csharp\nupkg\*.nupkg
name: capnpc-csharp
type: NuGetPackage
- path: coverage
name: Coverage report
type: zip
test_script:
- cmd: |
nbgv get-version -v NuGetPackageVersion >> myversion.txt
set /P VERSION=< myversion.txt
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp3.1\CapnpC.CSharp.Generator.Tests.dll
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%
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.Generator.Tests\bin\Release\netcoreapp3.1\CapnpC.CSharp.Generator.Tests.dll
dotnet tool uninstall --global capnpc-csharp
cd %APPVEYOR_BUILD_FOLDER%\install-test
notinstalled-test
cd %APPVEYOR_BUILD_FOLDER%\chocolatey\install
choco install capnproto --source="https://chocolatey.org/api/v2" --force -y
choco install capnpc-csharp-win-x86 --source=".;https://chocolatey.org/api/v2" --force -y --version %VERSION% --pre
cd %APPVEYOR_BUILD_FOLDER%\install-test
compile-test
choco uninstall capnpc-csharp-win-x86 -y
notinstalled-test
cd %APPVEYOR_BUILD_FOLDER%
vstest.console /logger:Appveyor /inIsolation CapnpC.CSharp.MsBuild.Generation.Tests\bin\Release\netcoreapp3.1\CapnpC.CSharp.MsBuild.Generation.Tests.dll
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.dll
vstest.console /logger:Appveyor /inIsolation Capnp.Net.Runtime.Tests\bin\Release\netcoreapp3.1\Capnp.Net.Runtime.Tests.dll
powershell -File .\scripts\measure-coverage.ps1
csmacnz.Coveralls --lcov -i "coverage\lcov.info" --repoToken %COVERALLS_REPO_TOKEN%
on_finish :
# any cleanup in here
deploy:
- provider: Environment
name: GitHub Releases
description: 'Deployed from CI.'
artifact: /.*\.nupkg/
draft: true
prerelease: true
force_update: true
on:
APPVEYOR_REPO_TAG: true