-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
375 lines (360 loc) · 11.2 KB
/
.gitlab-ci.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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
variables:
GIT_SUBMODULE_STRATEGY: "recursive"
MACOSX_XCODE_VERSION: "12.0.0"
CMAKE_OSX_DEPLOYMENT_TARGET: "10.10"
stages:
- first
- second
- third
- fourth
- fifth
download-xoptoolkit:
stage: first
tags:
- docker, debian, amd64
cache:
key: xop-toolkit-8
paths:
- XOPSupport
variables:
GIT_SUBMODULE_STRATEGY: "none"
image:
name: ${CI_REGISTRY}/internal/docker-utils
script:
- if [[ -d XOPSupport ]]; then exit 0; fi
- curl -L --user ${XOPTOOLKIT_USER}:${XOPTOOLKIT_PW} https://www.wavemetrics.net/ecomm/xop/XOPToolkit8.exe --output XOPToolkit8.exe
- 7z x -y XOPToolkit8.exe
- mv XOP\ Toolkit\ 8/IgorXOPs8/XOPSupport .
artifacts:
paths:
- XOPSupport
compile-libzmq-windows:
stage: first
tags:
- windows, shell, amd64
variables:
GIT_SUBMODULE_STRATEGY: "none"
parallel:
matrix:
- CONFIG_TYPE:
- Release
- Debug
ARCHITECTURE:
- x86
- x64
rules:
- if: '$ARCHITECTURE == "x64"'
variables:
GENERATOR_PLATFORM: "x64"
when: manual
- if: '$ARCHITECTURE == "x86"'
variables:
GENERATOR_PLATFORM: "Win32"
when: manual
script:
- del /S /Q output
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCHITECTURE%
- cd src/libzmq
- md build
- cd build
- cmake -G "Visual Studio 16 2019" -A %GENERATOR_PLATFORM% -DENABLE_CURVE=OFF -DENABLE_DRAFTS=OFF -DWITH_DOC=OFF -DZMQ_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=../../../output/win/%ARCHITECTURE%/libzmq/%CONFIG_TYPE% ..
- cmake --build . --config %CONFIG_TYPE% --target install
# - ctest -C %CONFIG_TYPE%
artifacts:
paths:
- output/win
compile-libzmq-macosx:
stage: first
when: manual
tags:
- macosx, xcode, catalina, amd64
variables:
GIT_SUBMODULE_STRATEGY: "none"
parallel:
matrix:
- CONFIG_TYPE:
- Release
- Debug
script:
- rm -rf output
- cd src/libzmq
- mkdir build
- cd build
- cmake -G "Xcode" -DENABLE_CURVE=OFF -DENABLE_DRAFTS=OFF -DWITH_DOC=OFF -DCMAKE_INSTALL_PREFIX=../../../output/mac/libzmq/${CONFIG_TYPE} ..
- cmake --build . --config ${CONFIG_TYPE} --target install
artifacts:
paths:
- output/mac
sphinx-documentation-html:
tags:
- docker, debian, amd64
stage: first
variables:
GIT_SUBMODULE_STRATEGY: "normal"
image:
name: ${CI_REGISTRY}/internal/docker-sphinx:latest
script:
- cd doc
- cp ../Readme.rst index.rst
- make html
artifacts:
paths:
- doc/_build/html
compile-xop-windows:
stage: second
tags:
- windows, shell, amd64
parallel:
matrix:
- CONFIG_TYPE:
- Release
- Debug
ARCHITECTURE:
- x86
- x64
rules:
- if: '$ARCHITECTURE == "x64"'
variables:
GENERATOR_PLATFORM: "x64"
- if: '$ARCHITECTURE == "x86"'
variables:
GENERATOR_PLATFORM: "Win32"
script:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCHITECTURE%
- md build
- cd build
- cmake -G "Visual Studio 16 2019" -A %GENERATOR_PLATFORM% -DMSVC_RUNTIME_DYNAMIC=ON -DWARNINGS_AS_ERRORS=ON ../src
- cmake --build . --config %CONFIG_TYPE% --target install
needs:
- download-xoptoolkit
artifacts:
paths:
- output/win/*/xop
compile-xop-release-macosx:
stage: second
tags:
- macosx, xcode, catalina, amd64
script:
- mkdir build
- cd build
- cmake -G "Xcode" -DWARNINGS_AS_ERRORS=ON ../src
- cmake --build . --config Release --target install
needs:
- download-xoptoolkit
artifacts:
paths:
- output/mac/xop
compile-xop-debug-coverage-macosx:
stage: second
tags:
- macosx, xcode, catalina, amd64
script:
- mkdir build
- cd build
- cmake -G "Xcode" -DWARNINGS_AS_ERRORS=ON -DCOVERAGE=ON -DSANITIZER=ON ../src
- cmake --build . --config Debug --target install
needs:
- download-xoptoolkit
artifacts:
expire_in: 1 week
paths:
- output/mac/xop
clang-tidy:
stage: second
tags:
- macosx, xcode, catalina, amd64
variables:
GIT_AUTHOR_NAME: "ci"
GIT_AUTHOR_EMAIL: "[email protected]"
script:
- mkdir build
- cd build
- cmake -G "Unix Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../src
- cmake --build . --config Debug --target clang-tidy && exit_value=$? || exit_value=$?
- git commit -m "clang-tidy fixes" ..
- git format-patch -n1
- exit ${exit_value}
needs:
- download-xoptoolkit
artifacts:
when: always
expire_in: 1 week
paths:
- build/clang-tidy-fixes.yaml
- build/*.patch
# codesign-and-notarize-xop-macosx:
# tags:
# - macosx, xcode, catalina, amd64
# stage: second
# script:
# - cd output/mac
# - unzip JSON-64.zip
# - ../../tools/notarize-macos.py --username "${APPLE_NOTARIZATION_USERNAME}" --password "${APPLE_NOTARIZATION_PASSWORD}" --certname "${APPLE_NOTARIZATION_CERTNAME}" --bundleid "com.wavemetrics.xops.JSON-64" --folder "Release/JSON-64.xop"
# - zip -ru JSON-64.zip Release
# artifacts:
# paths:
# - output/mac/JSON-64.zip
# needs:
# - compile-release-macosx-64bit
#
# testing-macosx-bigsur-release-v9:
# tags:
# - macosx, igorpro, bigsur, amd64
# stage: third
# variables:
# IGORPRO_VERSION: "9"
# script:
# - rm -rf "$HOME/Documents/WaveMetrics"
# - mkdir -p "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/Igor Extensions (64-bit)"
# - unzip output/mac/*.zip -d "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/Igor Extensions (64-bit)"
# - mkdir -p "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/User Procedures"
# - ln -s $(pwd)/utf/procedures "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/User Procedures"
# - cd tests
# - touch DO_AUTORUN.TXT
# - /Applications/Igor\ Pro\ ${IGORPRO_VERSION}\ Folder/Igor64.app/Contents/MacOS/Igor64 /I RunTests.pxp
# # generate a proper exit value
# - exit $(grep "errors\|failures=\"[0-9]\+\"" JU_*.xml | grep -cv "failures=\"0\" errors=\"0\"")
# artifacts:
# when: always
# reports:
# junit: tests/JU_*.xml
# needs:
# - codesign-and-notarize-xop-macosx
#
testing-macosx:
tags:
- macosx, igorpro, catalina, amd64
stage: third
parallel:
matrix:
- IGORPRO_VERSION:
- 8
- 9
script:
- rm -rf "$HOME/Documents/WaveMetrics"
- mkdir -p "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/Igor Extensions (64-bit)"
- unzip output/mac/xop/Debug/*.zip -d "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/Igor Extensions (64-bit)"
- mkdir -p "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/User Procedures"
- ln -s $(pwd)/utf/procedures "$HOME/Documents/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/User Procedures/utf"
- cd tests
- touch DO_AUTORUN.TXT
- export UBSAN_OPTIONS=print_stacktrace=1,suppressions=$(pwd)/UBSAN.supp,log_path=$(pwd)/sanitizer.log
- DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/${MACOSX_XCODE_VERSION}/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
/Applications/Igor\ Pro\ ${IGORPRO_VERSION}\ Folder/Igor64.app/Contents/MacOS/Igor64 /I RunTests.pxp
- export SANIFILE=$(find . -name sanitizer.log.*)
- if [ "$SANIFILE" ]; then cat $SANIFILE; echo -e "\e[31mSanitizer does not agree with code !"; fi
- test ! "$SANIFILE"
# generate a proper exit value
- exit $(grep "errors\|failures=\"[0-9]\+\"" JU_*.xml | grep -cv "failures=\"0\" errors=\"0\"")
artifacts:
when: always
reports:
junit: tests/JU_*.xml
paths:
- tests/JU_*.xml
- tests/report.html
- tests/default.profraw
- tests/sanitizer.log.*
needs:
- compile-xop-debug-coverage-macosx
# testing-docker-windows:
# stage: third
# tags:
# - docker, debian, amd64
# parallel:
# matrix:
# - IGORPRO_VERSION:
# - 8
# ARCHITECTURE:
# - x86
# - x64
# rules:
# - if: '$ARCHITECTURE == "x64"'
# variables:
# EXECUTE_FLAGS: ""
# IGORPRO_XOP_FOLDER: "Igor Extensions"
# - if: '$ARCHITECTURE == "x86"'
# variables:
# EXECUTE_FLAGS: "--32bit"
# IGORPRO_XOP_FOLDER: "Igor Extensions (64-bit)"
# image:
# name: ${CI_REGISTRY}/internal/docker-igorpro:v${IGORPRO_VERSION}
# script:
# - ln -rs utf/procedures "/home/igor/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/User Procedures/utf"
# - ln -rs output/win/${ARCHITECTURE}/xop/Release "/home/igor/WaveMetrics/Igor Pro ${IGORPRO_VERSION} User Files/${IGORPRO_XOP_FOLDER}/"
# - cd tests
# - touch DO_AUTORUN.TXT
# - igorpro execute ${EXECUTE_FLAGS} --screenshot "RunTests.pxp"
# # generate a proper exit value
# - exit $(grep "errors\|failures=\"[0-9]\+\"" JU_*.xml | grep -cv "failures=\"0\" errors=\"0\"")
# artifacts:
# when: always
# reports:
# junit: tests/JU_*.xml
# paths:
# - tests/*.xml
# - screenshot/*.png
# retry:
# max: 2
# when: runner_system_failure
# needs:
# - compile-xop-windows
packaging:
stage: fourth
tags:
- debian, docker, amd64
image:
name: ${CI_REGISTRY}/internal/docker-utils:latest
variables:
GIT_SUBMODULE_STRATEGY: "none"
GIT_DEPTH: 0
script:
- mkdir package
- VERSION_STR=$(git describe --tags --always --match "version")
- zip -r package/ZeroMQ-XOP-${VERSION_STR}.zip CONTRIBUTING.md LICENSE.txt procedures help/*.ihf output/mac/xop/Release/*.zip output/win/*/xop/Release/*{.xop,.dll}
- zip -r package/ZeroMQ-PDB-${VERSION_STR}.zip output/win/*/xop/Release/*.pdb
needs:
- compile-xop-windows
- compile-xop-release-macosx
artifacts:
paths:
- package
coverage:
stage: fourth
tags:
- macosx, xcode, catalina, amd64
script:
- mkdir -p build/coverage
- mv tests/default.profraw build/coverage
- cd build
- cmake -G "Xcode" -DCOVERAGE=ON ../src
- cmake --build . --config Debug --target install
- cmake --build . --target coverage
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
paths:
- build/coverage
needs:
- compile-xop-debug-coverage-macosx
- download-xoptoolkit
- testing-macosx
symbol_creation_and_upload:
tags:
- debian, docker, amd64
stage: fifth
image:
name: ${CI_REGISTRY}/internal/docker-utils:latest
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_BRANCH == "main"'
when: on_success
needs:
- compile-xop-windows
script:
- mkdir symbols
- symstore -z symbols output/win/x64/xop/Release/*.pdb output/win/x64/xop/Release/*.xop
- symstore -z symbols output/win/x86/xop/Release/*.pdb output/win/x86/xop/Release/*.xop
- lftp -e "mirror --reverse -n symbols /; bye" -u $FTP_SYMBOLS_USER,$FTP_SYMBOLS_PASS ftp.byte-physics.de