Repository navigation
Expand file tree
/
Copy pathappveyor.yml
More file actions
149 lines (145 loc) · 5.26 KB
/
Copy pathappveyor.yml
File metadata and controls
149 lines (145 loc) · 5.26 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# QLNet Appveyor builds
# Configuration for "master" branch
# build in Release mode and deploy to Nuget and GitHub
-
branches:
only:
- master
# Overwritten in install with the VersionPrefix of QLNet.csproj
version: '{build}'
configuration: Release
platform: Any CPU
image: Visual Studio 2022
test: off
skip_tags: true
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
install:
- ps: |
$version = (Select-Xml -Path src\QLNet\QLNet.csproj -XPath '//VersionPrefix').Node.InnerText
Update-AppveyorBuild -Version $version
- ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1
- ps: ./dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet"
build_script:
- cmd: dotnet build -c Release
after_build:
- cmd: dotnet pack src/qlnet/qlnet.csproj -c Release -o ./
artifacts:
- path: src\QLNet\bin\Release\net10.0\QLNet.dll
name: Windows
- path: .\*.nupkg
name: ng
deploy:
- provider: GitHub
tag: QLNet-v$(APPVEYOR_BUILD_VERSION)
release: QLNet Version $(APPVEYOR_BUILD_VERSION)
description: QLNet $(APPVEYOR_BUILD_VERSION)
auth_token:
secure: 4cCBgQRwNh1N6VbvMJTCUKpp1EYpNHGlXj/LFfVgcCMnTYk5yDX/7vURrRGrLy+zflAFBotCGVgLQ1WkdIXPBrpS9fs4n43oKDWPezRFLt22jYdTeIWxGDdS9vF7y+zI
artifact: src\QLNet\bin\Release\net10.0\QLNet.dll
draft: false
force_update: false
- provider: NuGet
api_key:
secure: M9U/C2nK665O9d8+ajLdLwmkjTzAJlHYrG6xmyQ390HAjsGGxmLx0ENgU9T6Y+EO
skip_symbols: true
artifact: ng
# Configuration for "develop" branch
# build in Release mode, run tests , deploy to Sonar
-
branches:
only:
- develop
# Overwritten in install with the next patch of QLNet.csproj VersionPrefix
version: '{build}'
configuration: Release
platform: Any CPU
image: Visual Studio 2022
skip_tags: true
clone_folder: c:\projects\qlnet_develop
test: off
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
init:
- cmd: set JAVA_HOME=C:\Program Files\Java\jdk17
install:
- ps: |
$v = [version](Select-Xml -Path src\QLNet\QLNet.csproj -XPath '//VersionPrefix').Node.InnerText
Update-AppveyorBuild -Version ("{0}.{1}.{2}-preview.{3}" -f $v.Major, $v.Minor, ($v.Build + 1), $env:APPVEYOR_BUILD_NUMBER)
- ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1
- ps: ./dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet"
before_build:
- cmd: "dotnet tool install --global dotnet-sonarscanner"
- cmd: "SET runner_args=\"\""
- cmd: "if \"%APPVEYOR_PULL_REQUEST_NUMBER%\"==\"\" SET runner_args=%sonar_commit_new%"
- cmd: "if not \"%APPVEYOR_PULL_REQUEST_NUMBER%\"==\"\" SET runner_args=%sonar_pr_new%"
- cmd: "dotnet sonarscanner begin %runner_args% /d:sonar.projectBaseDir=%CD%"
build_script:
- cmd: dotnet build -c Release
artifacts:
- path: .\*.nupkg
name: ng
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
test_script:
- cmd: dotnet test -v=normal --no-build -p:Configuration=Release --collect "XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
after_test:
- cmd: if exist C:\projects\qlnet_develop\.sonarqube\out\sonar-project.properties (echo FOUND) else (echo MISSING)
- cmd: dotnet sonarscanner end /d:sonar.login=%sonar_token_new%
- cmd: dotnet pack src/qlnet/qlnet.csproj -c Release -o ./
deploy:
- provider: NuGet
api_key:
secure: M9U/C2nK665O9d8+ajLdLwmkjTzAJlHYrG6xmyQ390HAjsGGxmLx0ENgU9T6Y+EO
skip_symbols: false
artifact: ng
# Configuration for "feature/*" branch
# build in Release mode, run tests , deploy to Nuget
-
branches:
only:
- /feature/
# Overwritten in install with the next patch of QLNet.csproj VersionPrefix plus the branch name
version: '{build}'
configuration: Release
platform: Any CPU
image: Visual Studio 2022
skip_tags: true
clone_folder: c:\projects\qlnet_feature
init:
- cmd: set JAVA_HOME=C:\Program Files\Java\jdk11
install:
- ps: |
$v = [version](Select-Xml -Path src\QLNet\QLNet.csproj -XPath '//VersionPrefix').Node.InnerText
$branch = $env:APPVEYOR_REPO_BRANCH -replace '/', '.'
Update-AppveyorBuild -Version ("{0}.{1}.{2}-{3}.{4}" -f $v.Major, $v.Minor, ($v.Build + 1), $branch, $env:APPVEYOR_BUILD_NUMBER)
- ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1
- ps: ./dotnet-install.ps1 -Channel 10.0 -InstallDir "$env:ProgramFiles\dotnet"
before_build:
- cmd: dotnet restore qlnet.sln
build_script:
- cmd: dotnet build -c Release
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
pull_requests:
do_not_increment_build_number: true
nuget:
disable_publish_on_pr: true
test_script:
- cmd: dotnet test -v=normal --no-build -p:Configuration=Release