-
Notifications
You must be signed in to change notification settings - Fork 164
/
.gitlab-ci.yml
617 lines (534 loc) · 14.3 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
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
workflow:
rules:
# always run on master
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# always run for merge requests
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# always run if triggered by "run pipleline" in gitlab
- if: $CI_PIPELINE_SOURCE == "web"
# always run if the ci variable CI_FORCE is 1.
# for example by pushing with: git push -o ci.variable=CI_FORCE=1
- if: $CI_FORCE == "1"
# Run distro tests if CI_DISTRO_TESTS=1 is set, or when it is a scheduled run
- if: $CI_PIPELINE_SOURCE == "schedule"
variables:
CI_DISTRO_TESTS: "1"
# do not run for anything else
variables:
OMP_NUM_THREADS: "1"
# mpirun in docker has a problem with its default transfer mechanism,
# so we disable it:
OMPI_MCA_btl_vader_single_copy_mechanism: "none"
# make DEBUG_DWARF the default
DEBUG: "1"
DEBUG_DWARF: "1"
# utests give a backtrace + abort on the first error
BART_UTEST_ABORT: "1"
# For gitlab-runner using docker: create diretories as the USER in the docker image, not as root
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_cuda_bart
default:
# Make Builds interruptible by default
interruptible: true
stages:
- distro_build
- build
- test1
- test2
Build_NoDEBUG:
stage: build
script:
- DEBUG=0 DEBUG_DWARF=0 WERROR=1 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
expire_in: 45 minutes
Build:
stage: build
script:
- WERROR=1 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_riscv:
stage: build
tags:
- riscv
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_riscv_noroot
script:
- make -j 4 all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 180 minutes
Build_Clang:
stage: build
script:
- CC=clang-16 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_Clang_GPU:
stage: build
script:
- CC=clang-16 CUDA_CC=clang-14 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_Static:
stage: build
script:
# - apt-get update -qq && apt-get install -y libgfortran-12-dev
- SLINK=1 make
artifacts:
paths:
- bart
expire_in: 45 minutes
Build_Shared:
stage: build
script:
- make libbart.so
artifacts:
paths:
- libbart.so
expire_in: 45 minutes
Build_Shared_GPU:
stage: build
script:
- CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make libbart.so
artifacts:
paths:
- libbart.so
expire_in: 45 minutes
Build_UBSan:
stage: build
script:
- UBSAN=1 ASAN=1 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_GPU:
stage: build
script:
- CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" WERROR=1 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_MPI_GPU:
stage: build
script:
- MPI=1 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_MPI:
stage: build
script:
- MPI=1 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_LTO:
stage: build
script:
- CFLAGS="-flto -O2 -g" DEBUG=0 DEBUG_DWARF=0 make
artifacts:
paths:
- bart
- "./lib/*.a"
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_Analyzer:
stage: build
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_gcc-git_bart
script:
- gcc-git --version
- CC=gcc-git CFLAGS="-fanalyzer -Werror" DEBUG=0 DEBUG_DWARF=0 make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
expire_in: 45 minutes
allow_failure: true
Build_Tensorflow:
stage: build
script:
# Already part of the Docker image
# - wget --no-verbose https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
# - mkdir tensorflow_dir && tar -C tensorflow_dir -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
- TENSORFLOW=1 TENSORFLOW_BASE=/tensorflow_dir/ CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make all
artifacts:
paths:
- bart
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
expire_in: 45 minutes
Build_wasm:
stage: build
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_wasm_bart
variables:
DEPS_FOLDER: /wasm_libs
script:
- echo -e
"FFTW_BASE=$DEPS_FOLDER\n
BLAS_BASE=$DEPS_FOLDER\n
CC=emcc\n
LDFLAGS=-s EXPORTED_FUNCTIONS=_main,__Block_object_dispose -s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s INITIAL_MEMORY=256MB -s TOTAL_STACK=64MB $DEPS_FOLDER/lib/libfftw3f.a $DEPS_FOLDER/lib/libopenblas.a $DEPS_FOLDER/usr/local/lib/libBlocksRuntime.a -lnodefs.js -lnoderawfs.js\n
OPENBLAS=1\n
FORTRAN=0\n
FFTWTHREADS=0\n
USE_THREAD=1\n
PNG=0\n
OMP=0\n
TENSORFLOW=0\n
DEBUG=0\n
MKL=0\n
ACML=0\n
CUDA=0\n
CUDNN=0\n
ISMRMRD=0\n" > Makefiles/Makefile.wasm
- bash -c "source /emsdk/emsdk_env.sh && make -j 4 DEBUG=0 DEBUG_DWARF=0 all"
artifacts:
paths:
- bart
- bart.wasm
- "./lib/*.a"
- ./commands/
- "./src/*.o"
- ./src/misc/version.inc
- ./Makefiles/Makefile.wasm
expire_in: 45 minutes
UTest:
stage: test1
script:
- AUTOCLEAN=0 WERROR=1 make utest
needs: [Build]
dependencies:
- Build
UTest_riscv:
stage: test1
tags:
- riscv
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_riscv_noroot
script:
- AUTOCLEAN=0 make -j 4 utest
needs: [Build_riscv]
dependencies:
- Build_riscv
UTest_Clang:
stage: test1
script:
- AUTOCLEAN=0 CC=clang-16 make utest
needs: [Build_Clang]
dependencies:
- Build_Clang
UTest_Clang_GPU:
stage: test1
script:
- if ! nvidia-smi ; then printf "No usable GPU found, skipping GPU tests!\n"; exit 0; fi
- AUTOCLEAN=0 CC=clang-16 CUDA_CC=clang-14 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make utest_gpu
needs: [Build_Clang_GPU]
dependencies:
- Build_Clang_GPU
UTest_Valgrind:
stage: test1
script:
- AUTOCLEAN=0 UTESTLEAK=1 make utest
needs: [Build]
dependencies:
- Build
UTest_UBSan:
stage: test1
script:
- AUTOCLEAN=0 UBSAN=1 ASAN=1 make utest
needs: [Build_UBSan]
dependencies:
- Build_UBSan
UTest_GPU:
stage: test1
script:
- if ! nvidia-smi ; then printf "No usable GPU found, skipping GPU tests!\n"; exit 0; fi
- AUTOCLEAN=0 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" WERROR=1 make utest_gpu
needs: [Build_GPU]
dependencies:
- Build_GPU
UTest_MPI:
stage: test1
script:
- AUTOCLEAN=0 MPI=1 make utest
needs: [Build_MPI]
dependencies:
- Build_MPI
UTest_Tensorflow:
stage: test1
script:
# Already part of the Docker image
# - wget --no-verbose https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
# - mkdir tensorflow_dir && tar -C tensorflow_dir -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz
- AUTOCLEAN=0 TENSORFLOW=1 TENSORFLOW_BASE=/tensorflow_dir/ CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make utest
needs: [Build_Tensorflow]
dependencies:
- Build_Tensorflow
UTest_LTO:
stage: test1
script:
- AUTOCLEAN=0 CFLAGS="-flto -O2 -g" DEBUG=0 DEBUG_DWARF=0 make utest
needs: [Build_LTO]
dependencies:
- Build_LTO
UTest_wasm:
stage: test1
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_wasm_bart
script:
- bash -c "source /emsdk/emsdk_env.sh && AUTOCLEAN=0 DEBUG=0 DEBUG_DWARF=0 make utest"
needs: [Build_wasm]
dependencies:
- Build_wasm
IntTest:
stage: test2
script:
- AUTOCLEAN=0 AGUE_REF=/reference_data/ WERROR=1 make test testslow testague
needs: [Build]
dependencies:
- Build
IntTest_riscv:
stage: test2
tags:
- riscv
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_riscv_noroot
script:
- AUTOCLEAN=0 AGUE_REF=/reference_data/ make -j 4 test testague
needs: [Build_riscv]
dependencies:
- Build_riscv
timeout: 6 hours
IntTest_Python:
stage: test2
script:
- AUTOCLEAN=0 make pythontest
needs: [Build]
dependencies:
- Build
allow_failure: true
IntTest_GPU:
stage: test2
script:
- if ! nvidia-smi ; then printf "No usable GPU found, skipping GPU tests!\n"; exit 0; fi
- AUTOCLEAN=0 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" WERROR=1 make gputest
needs: [Build_GPU]
dependencies:
- Build_GPU
IntTest_Clang:
stage: test2
script:
- AUTOCLEAN=0 CC=clang-16 make test
needs: [Build_Clang]
dependencies:
- Build_Clang
IntTest_Clang_GPU:
stage: test2
script:
- if ! nvidia-smi ; then printf "No usable GPU found, skipping GPU tests!\n"; exit 0; fi
- AUTOCLEAN=0 CC=clang-16 CUDA_CC=clang-14 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" make gputest
needs: [Build_Clang_GPU]
dependencies:
- Build_Clang_GPU
IntTest_UBSan:
stage: test2
script:
- AUTOCLEAN=0 UBSAN=1 ASAN=1 DEBUG=1 UBSAN_OPTIONS=print_stacktrace=1 make test
needs: [Build_UBSan]
dependencies:
- Build_UBSan
IntTest_MPI:
stage: test2
script:
- AUTOCLEAN=0 MPI=1 make testslow
needs: [Build_MPI]
dependencies:
- Build_MPI
IntTest_MPI_GPU:
stage: test2
script:
- if ! nvidia-smi ; then printf "No usable GPU found, skipping GPU tests!\n"; exit 0; fi
- AUTOCLEAN=0 CUDA=1 CUDA_LIB=lib64 GPUARCH_FLAGS="-arch sm_35 -Wno-deprecated-gpu-targets" MPI=1 make gputest
needs: [Build_MPI_GPU]
dependencies:
- Build_MPI_GPU
#IntTest_LTO:
# stage: test2
# script:
# - CFLAGS="-flto -O2 -g" DEBUG=0 DEBUG_DWARF=0 make test
# needs: [Build_LTO]
# dependencies:
# - Build_LTO
IntTest_wasm:
stage: test2
image: registry.gitlab.tugraz.at/ibi/reproducibility/gitlab-ci-containers/ibi_wasm_bart
script:
- bash -c "source /emsdk/emsdk_env.sh && AUTOCLEAN=0 DEBUG=0 DEBUG_DWARF=0 make test"
needs: [Build_wasm]
dependencies:
- Build_wasm
Debian_Bookworm:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: debian:bookworm
script:
- apt-get update
- apt-get install -y gcc make libfftw3-dev liblapacke-dev libpng-dev libopenblas-dev gfortran
- make all -j8
- make utest -j8
Debian_Trixie:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: debian:trixie
script:
- apt-get update
- apt-get install -y gcc make libfftw3-dev liblapacke-dev libpng-dev libopenblas-dev gfortran
- make all -j8
- make utest -j8
Fedora_39:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: fedora:39
script:
- dnf install -y gcc make fftw-devel lapack-devel openblas-devel atlas-devel libpng-devel
- make all -j8
- make utest -j8
Fedora_40:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: fedora:40
script:
- dnf install -y gcc make fftw-devel lapack-devel openblas-devel atlas-devel libpng-devel util-linux-core
- make all -j8
- make utest -j8
RockyLinux_8:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: docker.io/rockylinux:8
script:
- dnf --enablerepo=powertools install -y fftw-devel atlas-devel libpng-devel lapack-devel gcc-toolset-12
- source scl_source enable gcc-toolset-12 # redhat magic for enabling gcc-12
- make all -j8
- make utest -j8
RockyLinux_9:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: docker.io/rockylinux:9
script:
- dnf --enablerepo=crb install -y fftw-devel atlas-devel libpng-devel lapack-devel gcc-toolset-12
- source scl_source enable gcc-toolset-12 # redhat magic for enabling gcc-12
- make all -j8
- make utest -j8
Ubuntu_22.04:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: docker.io/ubuntu:22.04
script:
- apt-get update
- apt-get install -y gcc-12 make libfftw3-dev liblapacke-dev libpng-dev libopenblas-dev gfortran
- echo -e -n "CC=gcc-12\n" > Makefiles/Makefile.local
- make all -j8
- make utest -j8
Ubuntu_24.04:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: docker.io/ubuntu:24.04
script:
- apt-get update
- apt-get install -y gcc make libfftw3-dev liblapacke-dev libpng-dev libopenblas-dev gfortran
- make all -j8
- make utest -j8
Arch_Latest:
variables:
DEBUG: "0"
DEBUG_DWARF: "0"
rules:
- if: $CI_DISTRO_TESTS == "1"
stage: distro_build
image: docker.io/archlinux:base-devel
script:
- pacman -Sy --noconfirm blas-openblas fftw libpng
- echo -e -n "CPPFLAGS+=-I/usr/include/openblas\nAR_LOCK_NEEDED=0\n" > Makefiles/Makefile.local
- make all -j8
- make utest -j8
allow_failure: true