-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
327 lines (314 loc) · 8.61 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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
version: 1.0.{build}
environment:
matrix:
# Visual Studio
- job_group: VisualStudio
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
PROJECT_DIR: vs2013
CMAKE_GENERATOR_NAME: Visual Studio 12 2013
- job_group: VisualStudio
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
PROJECT_DIR: vs2015
CMAKE_GENERATOR_NAME: Visual Studio 14 2015
- job_group: VisualStudio
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PROJECT_DIR: vs2017
CMAKE_GENERATOR_NAME: Visual Studio 15 2017
- job_group: VisualStudio
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PROJECT_DIR: vs2019
CMAKE_GENERATOR_NAME: Visual Studio 16 2019
- job_group: VisualStudio
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PROJECT_DIR: vs2022
CMAKE_GENERATOR_NAME: Visual Studio 17 2022
# Cygwin
- job_group: Cygwin
job_depends_on: VisualStudio
BUILD_CYGWIN: yes
USE_GNU_EXTENSION: 0
OUTPUTXML_TYPE: junit
- job_group: Cygwin
job_depends_on: VisualStudio
BUILD_CYGWIN: yes
USE_GNU_EXTENSION: 1
OUTPUTXML_TYPE: xml
# MINGW/MINGW64
- job_group: MINGW
job_depends_on: VisualStudio
BUILD_MINGW: yes
USE_GNU_EXTENSION: 0
OUTPUTXML_TYPE: xml
# MINGW/MINGW64 GNU EXTENSION
- job_group: MINGW
job_depends_on: VisualStudio
BUILD_MINGW: yes
OUTPUTXML_TYPE: junit
USE_GNU_EXTENSION: 1
# NMAKE
- job_group: VisualStudio
job_depends_on: VS2017
BUILD_NMAKE: yes
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
OUTPUTXML_TYPE: xml
# Prefast
- job_group: VisualStudio
job_depends_on: VS2015
BUILD_PREFAST: yes
PROJECT_DIR: vs2015
# Menu
- job_group: VisualStudio
BUILD_MENU: yes
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# Package Build
- job_group: Package
job_depends_on: VisualStudio
BUILD_PACKAGE: yes
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# Nuget
- job_group: Package
job_depends_on: VisualStudio
BUILD_NUGET: yes
configuration:
- Debug
- Release
platform:
- Win32
- x64
matrix:
# the first failed job cancels other jobs and fails entire build
fast_finish: true
exclude:
- configuration: Debug
BUILD_CYGWIN: yes
- configuration: Debug
BUILD_MINGW: yes
- configuration: Debug
BUILD_NMAKE: yes
- configuration: Release
BUILD_PREFAST: yes
- configuration: Debug
BUILD_MENU: yes
- configuration: Debug
BUILD_PACKAGE: yes
- configuration: Debug
BUILD_NUGET: yes
# exclude x64
- platform: x64
BUILD_NMAKE: yes
- platform: x64
BUILD_PREFAST: yes
- platform: x64
BUILD_PACKAGE: yes
- platform: x64
BUILD_NUGET: yes
branches:
only:
- master
- develop
- /appveyor.*/
skip_commits:
files:
- .circleci/
- .github/
- .semaphore/
- "*.md"
- docs/
- Jenkinsfile
- LICENSE
- .bandit
- .editorconfig
- .hadolint.yaml
- .lgtm.yaml
- tox.ini
- azure-pipelines.yml
- bitrise.yml
- buddy.yml
- .circleci/*
- .cirrus.yml
- .scrutinizer.yml
- codecov.yml
- codefresh.yml
- codeship-services.yml
- codeship-steps.yml
- .drone.yml
- .github/*
- .razorops.yaml
- .semaphore/*
- shippable.yml
- sider.yml
- .travis.yml
- wercker.yml
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
clone_depth: 1
before_build:
cmd: |
mkdir build && cd build
cmake ../projects/cmake -G "%CMAKE_GENERATOR_NAME%" -A %PLATFORM% -Dbuild_gtest_samples=ON
cd ..
build:
project: build\iutest.sln
parallel: true
verbosity: minimal
test_script:
cmd: cd build && ctest -C %Configuration% -V -T Test
on_finish:
ps: |
try {
$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform
$XSLInputElement.Load("https://raw.githubusercontent.com/rpavlik/jenkins-ctest-plugin/master/ctest-to-junit.xsl")
$TestXmlFile = Get-Childitem –Path "$($env:APPVEYOR_BUILD_FOLDER)\build" -Include *Test.xml -File -Recurse -ErrorAction SilentlyContinue
Write-Host $TestXmlFile
$XSLInputElement.Transform($TestXmlFile, (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml"))
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\ctest-to-junit-results.xml))
} catch {
Write-Host $_.Exception.Message
}
# artifacts:
# - path: "**/*.xml"
for:
# Build .sln (no cmake)
-
matrix:
only:
- BUILD_PRE_PROJECT: yes
before_build:
cmd: cmake --version
build:
project: projects\%PROJECT_DIR%\iutest.sln
parallel: true
verbosity: minimal
test_script:
cd projects\%PROJECT_DIR%\%Configuration%
iutest_sample.exe
iutest_sample.exe --spec
on_finish: &noop
cmd: echo.
# Cygwin
-
matrix:
only:
- BUILD_CYGWIN: yes
init:
ps: |
if($env:PLATFORM -eq "Win32"){
$env:CYGWIN_PATH="C:\cygwin"
$env:CYGWIN_SETUP_EXE="setup-x86.exe"
} else {
$env:CYGWIN_PATH="C:\cygwin64"
$env:CYGWIN_SETUP_EXE="setup-x86_64.exe"
}
$env:PATH=$env:CYGWIN_PATH + "\bin;" + $env:PATH
install:
cmd: |
curl -sSL -o %CYGWIN_PATH%\%CYGWIN_SETUP_EXE% "https://cygwin.com/%CYGWIN_SETUP_EXE%"
%CYGWIN_PATH%\%CYGWIN_SETUP_EXE% -qnNdO --allow-unsupported-windows -R %CYGWIN_PATH% -s http://cygwin.mirror.constant.com -l %CYGWIN_PATH%/var/cache/setup -P make -P clang
before_build: *noop
build_script:
cmd: |
cd test
make showcxxmacros check_stdlib showstdlbfeatures
make -j4 OUTPUTXML=%OUTPUTXML_TYPE%
test_script:
cmd: make test OUTPUTXML=%OUTPUTXML_TYPE% && make report
on_finish: &test_result
ps: |
$wc = New-Object 'System.Net.WebClient'
Get-ChildItem "$($env:APPVEYOR_BUILD_FOLDER)\test" -Filter *.xml |
Foreach-Object {
$XmlFilePath = $_.FullName
Write-Host $XmlFilePath
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", $XmlFilePath)
}
# cmd: |
# cd %APPVEYOR_BUILD_FOLDER%/test
# find . -type f -name '*.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%"
# MINGW
-
matrix:
only:
- BUILD_MINGW: yes
install:
ps: |
if($env:PLATFORM -eq "Win32"){
$env:MINGW_PATH="C:\mingw\bin"
} else {
$env:MAKE_OPTIONS="LIBS=ws2_32"
$env:MINGW_PATH="C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin"
}
$env:PATH=$env:MINGW_PATH + ";" + $env:PATH
before_build: *noop
build_script:
cmd: |
cd test
mingw32-make showcxxversion showcxxmacros check_stdlib showstdlbfeatures
mingw32-make -j4 %MAKE_OPTIONS% OUTPUTXML=%OUTPUTXML_TYPE%
test_script:
cmd: mingw32-make test %MAKE_OPTIONS% OUTPUTXML=%OUTPUTXML_TYPE% && mingw32-make report
on_finish: *test_result
# NAMKE
-
matrix:
only:
- BUILD_NMAKE: yes
before_build:
cmd: |
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd.bat"
cd test && nmake showcxxmacros check_stdlib showstdlbfeatures
nmake minimum_tests && minimum_tests.exe --spec
nmake clean
build_script:
cmd: nmake OUTPUTXML=%OUTPUTXML_TYPE%
test_script:
cmd: nmake test OUTPUTXML=%OUTPUTXML_TYPE%
on_finish: *test_result
# Prefast
-
matrix:
only:
- BUILD_PREFAST: yes
environment:
MSBUILD_LOGGER_OPTION: /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
MSBUILD_PREFAST_OPTION: /p:RunCodeAnalysis=true /p:EnablePREfast=true /p:CodeAnalysisTreatWarningsAsErrors=true
before_build: *noop
build_script:
cmd: msbuild "projects\%PROJECT_DIR%\iutest_sample.vcxproj" /m %MSBUILD_LOGGER_OPTION% %MSBUILD_PREFAST_OPTION%
test: off
on_finish: *noop
# Menu
-
matrix:
only:
- BUILD_MENU: yes
before_build: *noop
build:
project: samples\windows\iutest_windows_sample.sln
parallel: true
verbosity: minimal
test: off
on_finish: *noop
# Package Build
-
matrix:
only:
- BUILD_PACKAGE: yes
before_build: *noop
build_script:
sh: bash ./.ci/make-package.sh
test: off
on_finish: *noop
# NuGet
-
matrix:
only:
- BUILD_NUGET: yes
before_build: *noop
build_script:
ps: |
$nuspecPath = "projects\nuget\iutest.nuspec"
Write-Output "Building NuGet package"
nuget pack $nuspecPath -OutputDirectory ".\"
test: off
on_finish: *noop