-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
431 lines (402 loc) · 10.5 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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
---
stages:
- compilers
- sanitizers
- platforms
- images
- analysis
.code_change_filter: &code_change_filter_definition
changes:
- cmake/*
- src/**/*
- third_party/**/*
.binary_artifacts: &binary_artifact_paths
artifacts:
name: "$CI_BUILD_ID-$CI_JOB_NAME"
expire_in: 1 week
paths:
- build/src/apps/depth2x
- build/src/apps/depth_filter
- build/src/apps/feature_extractor
- build/src/apps/keypoint_plotter
- build/src/apps/feature_performance
- build/src/apps/transformation_step.py
api-documentation:
image: $CI_REGISTRY_IMAGE/base-image-documentation
stage: compilers
script:
- ./scripts/ci/generate_doc.bash
only:
refs:
- master
cache:
key: doxygen-output
paths:
- public/**/*
artifacts:
paths:
- public
coverage:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
script:
- ./scripts/ci/coverage_build.bash
only:
refs:
- master
- merge_requests
ubuntu-1804-clang-8:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "clang-8"
CXX: "clang++-8"
LD: "lld-8"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-clang-9:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "clang-9"
CXX: "clang++-9"
LD: "lld-9"
USE_LIBCXX: "OFF"
WITH_BENCHMARK: "ON"
WITH_BENCHMARK_JUNIT_REPORT: "OFF"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-clang-10:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "lld-10"
USE_LIBCXX: "OFF"
WITH_BENCHMARK: "ON"
WITH_BENCHMARK_JUNIT_REPORT: "OFF"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-clang-10-libcxx:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "lld-10"
USE_LIBCXX: "ON"
FORCE_BUNDLED_CV: "ON"
CUSTOM_OPENCV_SOURCE: "/opencv/opencv"
CUSTOM_OPENCV_CONTRIB_SOURCE: "/opencv/opencv_contrib/modules"
FORCE_BUNDLED_EIGEN: "ON"
CUSTOM_EIGEN_SOURCE: "/eigen3/eigen"
WITH_TESTING: "ON"
WITH_STATIC_STDCXXLIB: "OFF"
WITH_IPO: "OFF"
WITH_THREAD_SAFETY_ANALYSIS: "ON"
BUILD_TYPE: "Release"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- master
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-clang-10-static-libcxx-lto:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "lld-10"
USE_LIBCXX: "ON"
FORCE_BUNDLED_CV: "ON"
CUSTOM_OPENCV_SOURCE: "/opencv/opencv"
CUSTOM_OPENCV_CONTRIB_SOURCE: "/opencv/opencv_contrib/modules"
FORCE_BUNDLED_EIGEN: "ON"
CUSTOM_EIGEN_SOURCE: "/eigen3/eigen"
WITH_TESTING: "ON"
WITH_STATIC_STDCXXLIB: "ON"
WITH_IPO: "ON"
BUILD_TYPE: "Release"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- master
<<: *code_change_filter_definition
<<: *binary_artifact_paths
ubuntu-1804-gcc-7:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "gcc-7"
CXX: "g++-7"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-gcc-8:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "gcc-8"
CXX: "g++-8"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-gcc-9:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "gcc-9"
CXX: "g++-9"
WITH_BENCHMARK: "ON"
WITH_BENCHMARK_JUNIT_REPORT: "OFF"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- merge_requests
<<: *code_change_filter_definition
ubuntu-1804-gcc-9-lto-static:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
variables:
CC: "gcc-9"
CXX: "g++-9"
FORCE_BUNDLED_CV: "ON"
CUSTOM_OPENCV_SOURCE: "/opencv/opencv"
CUSTOM_OPENCV_CONTRIB_SOURCE: "/opencv/opencv_contrib/modules"
FORCE_BUNDLED_EIGEN: "ON"
CUSTOM_EIGEN_SOURCE: "/eigen3/eigen"
WITH_TESTING: "ON"
WITH_STATIC_STDCXXLIB: "ON"
WITH_IPO: "ON"
BUILD_TYPE: "Release"
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- master
<<: *code_change_filter_definition
<<: *binary_artifact_paths
clang-tidy-analysis:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: compilers
script:
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -DWITH_TESTING=OFF -DWITH_CONTRACT_EXCEPTION=OFF -DWITH_BENCHMARK=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- cd .. && ln -s build/compile_commands.json && cd src/
- run-clang-tidy-10 -header-filter=sens_loc/* include/ apps/ lib/
only:
refs:
- master
- merge_requests
<<: *code_change_filter_definition
.wide_testing_filter: &wide_test_filter_definition
script:
- ./scripts/ci/normal_build.bash
only:
refs:
- master
<<: *code_change_filter_definition
ubuntu-1804-asan:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: sanitizers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "clang++-10"
BUILD_TYPE: "Debug"
WITH_ASAN: "ON"
<<: *wide_test_filter_definition
dependencies: []
ubuntu-1804-msan:
image: $CI_REGISTRY_IMAGE/base-image-msan
stage: sanitizers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "clang++-10"
USE_LIBCXX: "ON"
BUILD_TYPE: "RelWithDebInfo"
WITH_MSAN: "ON"
<<: *wide_test_filter_definition
dependencies: []
ubuntu-1804-ubsan:
image: $CI_REGISTRY_IMAGE/base-image-tools
stage: sanitizers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "clang++-10"
BUILD_TYPE: "Debug"
WITH_UBSAN: "ON"
<<: *wide_test_filter_definition
dependencies: []
ubuntu-1804-tsan:
image: $CI_REGISTRY_IMAGE/base-image-tools
allow_failure: true
stage: sanitizers
variables:
CC: "clang-10"
CXX: "clang++-10"
LD: "clang++-10"
BUILD_TYPE: "RelWithDebInfo"
WITH_TSAN: "ON"
TSAN_OPTIONS: "suppressions=/builds/jtoth/master-thesis/scripts/tsan_suppressions"
<<: *wide_test_filter_definition
dependencies: []
.platform_build_options: &platform_build_option_variables
variables:
BUILD_TYPE: "RelWithDebInfo"
WITH_IPO: "ON"
WITH_STATIC_STDCXXLIB: "ON"
CC: "gcc-9"
CXX: "g++-9"
old-linux-most-portable:
image: $CI_REGISTRY_IMAGE/base-image-old-linux
stage: platforms
dependencies: []
variables:
CC: "gcc-9"
CXX: "g++-9"
WITH_TESTING: "ON"
WITH_STATIC_STDCXXLIB: "ON"
WITH_IPO: "OFF"
WITH_SSE42: "ON"
WITH_AVX2: "OFF"
BUILD_TYPE: "Release"
script:
- ./scripts/ci/normal_build.bash
<<: *wide_test_filter_definition
<<: *binary_artifact_paths
roskinetic-image:
image: $CI_REGISTRY_IMAGE/base-image-roskinetic
stage: platforms
<<: *platform_build_option_variables
<<: *wide_test_filter_definition
<<: *binary_artifact_paths
dependencies: []
rosmelodic-image:
image: $CI_REGISTRY_IMAGE/base-image-rosmelodic
stage: platforms
<<: *platform_build_option_variables
<<: *wide_test_filter_definition
<<: *binary_artifact_paths
dependencies: []
ubuntu-2004-image:
image: $CI_REGISTRY_IMAGE/base-image-ubuntu-2004
stage: platforms
<<: *platform_build_option_variables
<<: *wide_test_filter_definition
<<: *binary_artifact_paths
dependencies: []
ubuntu-rolling-image:
image: $CI_REGISTRY_IMAGE/base-image-ubuntu-rolling
stage: platforms
allow_failure: true
<<: *platform_build_option_variables
<<: *wide_test_filter_definition
<<: *binary_artifact_paths
dependencies: []
alpine-edge-image:
image: $CI_REGISTRY_IMAGE/base-image-alpine-edge
stage: platforms
allow_failure: true
dependencies: []
variables:
CC: "gcc"
CXX: "g++"
WITH_TESTING: "ON"
WITH_STATIC_STDCXXLIB: "ON"
WITH_IPO: "OFF"
WITH_SSE42: "ON"
WITH_AVX2: "OFF"
BUILD_TYPE: "Release"
script:
- ./scripts/ci/normal_build.bash
<<: *wide_test_filter_definition
<<: *binary_artifact_paths
create-production-image:
stage: images
image: docker:git
services:
- docker:dind
dependencies: ["old-linux-most-portable"]
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- cd docker/.production
- mv ../../build/src/apps/* .
- cp ../../scripts/analysis/* .
- cp ../../scripts/plot/* .
- docker build --pull -t $CI_REGISTRY_IMAGE .
- docker run --rm $CI_REGISTRY_IMAGE:latest depth2x -h
- docker run --rm $CI_REGISTRY_IMAGE:latest depth_filter -h
- docker run --rm $CI_REGISTRY_IMAGE:latest feature_extractor -h
- docker run --rm $CI_REGISTRY_IMAGE:latest keypoint_plotter -h
- docker run --rm $CI_REGISTRY_IMAGE:latest feature_performance -h
- docker push $CI_REGISTRY_IMAGE:latest
only:
refs:
- master
<<: *code_change_filter_definition
tags:
- docker-in-docker
create-alpine-image:
stage: images
image: docker:git
allow_failure: true
services:
- docker:dind
dependencies: ["alpine-edge-image"]
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- cd docker/.alpine-edge
- mv ../../build/src/apps/* .
- cp ../../scripts/analysis/* .
- cp ../../scripts/plot/* .
- docker build --pull -t $CI_REGISTRY_IMAGE:alpine-edge .
- docker run --rm $CI_REGISTRY_IMAGE:alpine-edge depth2x -h
- docker run --rm $CI_REGISTRY_IMAGE:alpine-edge depth_filter -h
- docker run --rm $CI_REGISTRY_IMAGE:alpine-edge feature_extractor -h
- docker run --rm $CI_REGISTRY_IMAGE:alpine-edge keypoint_plotter -h
- docker run --rm $CI_REGISTRY_IMAGE:alpine-edge feature_performance -h
- docker push $CI_REGISTRY_IMAGE:alpine-edge
only:
refs:
- master
<<: *code_change_filter_definition
tags:
- docker-in-docker
analyse-data:
stage: analysis
dependencies: []
image: $CI_REGISTRY_IMAGE/trigger
script:
- "curl -X POST -F token=aa720d8296fcf96da2148255d8aa2e -F ref=master https://git.informatik.tu-freiberg.de/api/v4/projects/283/trigger/pipeline"
only:
refs:
- master
<<: *code_change_filter_definition