-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathappveyor.yml
More file actions
83 lines (69 loc) · 3.47 KB
/
appveyor.yml
File metadata and controls
83 lines (69 loc) · 3.47 KB
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
branches:
except:
- pr
image: Visual Studio 2019
pull_requests:
do_not_increment_build_number: true
environment:
nodejs_version: "12"
global:
NET_FRAMEWORK: netstandard2.1
JAVA_HOME: C:\Program Files\Java\jdk11
SonarToken:
secure: Yqq5NPe3TMsALEVm/5AQZIi47F1OOwB+cmzLvYHF5qfbQUdyFaZ/E1ZjtTC5qEgO
GitHubToken:
secure: lEdFzP16FFnzrhclyiPpWIS5u+mDod8Y56dR1ulbBzB4IO+xuHEdnrsrHuDA2SwD
platform:
- Any CPU
configuration:
- Debug
build:
project: Oberon0.sln
verbosity: minimal
install:
- ps: Install-Product node $env:nodejs_version
- choco install gitversion.portable -pre -y
- choco install msbuild-sonarqube-runner -y
- dotnet tool install coverlet.console --tool-path tools
before_build:
- call call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
- nuget restore
- npm install
- npm install -g conventional-changelog-cli conventional-changelog
- ps: gitversion /l console /output buildserver /updateAssemblyInfo
- ps: if ($true) { . .\patch-package-version.ps1 }
- conventional-changelog -p angular -i CHANGELOG.md -s -r 0
- cmd: IF "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" ( SonarScanner.MSBuild.exe begin /k:"steven-r_Oberon0Compiler" /o:"steven-r-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=%SonarToken% /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml" /v:"%GitVersion_FullSemVer%" ) ELSE ( SonarScanner.MSBuild.exe begin /k:"steven-r_Oberon0Compiler" /o:"steven-r-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=%SonarToken% /d:sonar.cs.opencover.reportsPaths="%CD%\opencover.xml" /v:"%GitVersion_FullSemVer%" /d:"sonar.pullrequest.branch=%APPVEYOR_REPO_BRANCH%" /d:"sonar.pullrequest.key=%APPVEYOR_PULL_REQUEST_NUMBER%" )
before_package:
- cmd: msbuild Oberon0.Msil\Oberon0.Msil.csproj /t:ILMerge
test_script:
- tools\coverlet .\Oberon0.Generator.MsilBin.Tests\bin\Debug\%NET_FRAMEWORK%\Oberon0.Generator.Msil.Tests.dll --target "xunit-console" --targetargs ".\Oberon0.Generator.MsilBin.Tests\bin\Debug\%NET_FRAMEWORK%\Oberon0.Generator.MsilBin.Tests.dll .\UnitTestProject1\bin\Debug\%NET_FRAMEWORK%\Oberon0.Compiler.Tests.dll " --format json --output .\msil-tests.json --exclude "[Xunit*]*"
- tools\coverlet .\UnitTestProject1\bin\Debug\%NET_FRAMEWORK%\Oberon0.Compiler.Tests.dll --target "nunit3-console" --targetargs ".\Oberon0.Generator.Msil.Tests\bin\Debug\%NET_FRAMEWORK%\Oberon0.Generator.Msil.Tests.dll .\UnitTestProject1\bin\Debug\%NET_FRAMEWORK%\Oberon0.Compiler.Tests.dll " --format opencover --output "%CD%\opencover.xml" --exclude "[NUnit3*]*" --merge-with .\msil-tests.json
after_test:
- SonarScanner.MSBuild.exe end /d:sonar.login=%SonarToken%
artifacts:
- path: 'Oberon0.Msil\Oberon0Msil.exe'
name: Oberon0Msil
- path: 'CHANGELOG.md'
name: CHANGELOG
deploy:
- release: v$(appveyor_build_version)
description: 'Release description'
provider: GitHub
auth_token: $(GitHubToken)
artifact: Oberon0Msil,CHANGELOG
draft: true
prerelease: false
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only
- release: v$(appveyor_build_version)
description: 'Release description'
provider: GitHub
auth_token: $(GitHubToken)
artifact: Oberon0Msil,CHANGELOG
draft: true
prerelease: true
force_update: true
on:
branch: /release\/release-[0-9a-z.-]+/ # release from release branch only