forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
594 lines (490 loc) · 13.2 KB
/
.gitlab-ci.yml
File metadata and controls
594 lines (490 loc) · 13.2 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
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
variables:
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
CCACHE_MAXSIZE: 2G
CCACHE_KEY_SUFFIX: r2
CTEST_OUTPUT_ON_FAILURE: 1
SPACK_VERSION: bf1637a793b507a76bdc06e1169a373c83a5e535
SPACK_REPO_VERSION: 182b26b2612f9cdabc4af13ae62b92a321e11d5f
LOCKFILE_CACHE_DIR: ${CI_PROJECT_DIR}/spack_lockfile_cache
DEPENDENCY_TAG: v23.0.0
MODEL_STORAGE: ${CI_PROJECT_DIR}/ci_models
.ccache_base:
cache:
- key: ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-${REPO_SLUG}_${HEAD_REF}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CCACHE_KEY_SUFFIX}-https://github.com/acts-project/acts.git-main
when: always
paths:
- ${CCACHE_DIR}
.spack_cache:
cache:
- key:
files:
- CI/dependencies/setup_spack.sh
prefix: spack_${SPACK_VERSION}_${SPACK_REPO_VERSION}
paths:
- spack
- .spack
- key:
files:
- spack_lockfile_cache/digest.txt
prefix: spack_lockfile_
paths:
- spack_lockfile_cache
.spack_cleanup:
after_script:
- rm -rf spack/.git spack/opt spack/var/spack/cache
- find spack -type f -name "*.pyc" -delete || true
build_gnn_cpu:
stage: build
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404_gnn:85
tags:
- large
cache:
- !reference [.ccache_base, cache]
- !reference [.spack_cache, cache]
script:
- export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env
- source .env
- cd ..
- mkdir build
# Here we only do a minimal build without examples to save resources
- >
cmake -B build -S src
--preset=gitlab-ci-gnn
-DACTS_ENABLE_CUDA=OFF
-DACTS_GNN_ENABLE_MODULEMAP=OFF
- ccache -z
- cmake --build build -- -j8
- ccache -s
after_script:
- !reference [.spack_cleanup, after_script]
build_gnn:
stage: build
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404_gnn:85
tags:
- large
cache:
- !reference [.ccache_base, cache]
- !reference [.spack_cache, cache]
artifacts:
paths:
- boost-install/
- build/
exclude:
- build/**/*.o
- build/bin/ActsIntegrationTest*
expire_in: 6 hours
script:
- export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
- export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:$PATH
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env
- source .env
- cd ..
- mkdir build
- >
cmake -B build -S src
--preset=gitlab-ci-gnn
- ccache -z
- cmake --build build -- -j8
- ccache -s
after_script:
- !reference [.spack_cleanup, after_script]
test_gnn_unittests:
stage: test
needs:
- build_gnn
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404_gnn:85
tags:
- docker-gpu-nvidia
cache:
- !reference [.spack_cache, cache]
script:
- apt-get update -y
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env
- source .env
- cd ..
- ctest --test-dir build -R "(Gnn|ConnectedComponentsCuda|JunctionRemoval|Tensor)"
after_script:
- !reference [.spack_cleanup, after_script]
test_gnn_python:
stage: test
needs:
- build_gnn
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404_gnn:85
tags:
- docker-gpu-nvidia
cache:
- !reference [.spack_cache, cache]
script:
- apt-get update -y
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- nvidia-smi
- CI/dependencies/setup.sh -c g++ -e .env
- source .env
- CI/dependencies/download_models.sh
- ls ${MODEL_STORAGE}
- apt-get install tree
- tree ${MODEL_STORAGE}
- source ../build/this_acts_withdeps.sh
- python3 -m pip install -r Python/Examples/tests/requirements.txt
# There is not yet a proper test for the ModuleMap, but we can at least ensure that it is present and can be imported
- python3 -c "from acts.gnn import ModuleMapCuda"
- pytest -rsfExw -k torch -v --collect-only
- pytest -rsFExw -k gpu -v # For now only test torch GPU pipeline
after_script:
- !reference [.spack_cleanup, after_script]
build_gnn_tensorrt:
stage: build
image: ghcr.io/acts-project/ubuntu2404_tensorrt:85
cache:
- !reference [.spack_cache, cache]
- !reference [.ccache_base, cache]
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env
- source .env
- cd ..
- mkdir build
- >
cmake -B build -S src --preset gitlab-ci-tensorrt
- ccache -z
- cmake --build build -- -j8
- ccache -s
after_script:
- !reference [.spack_cleanup, after_script]
build_linux_ubuntu:
stage: build
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404:85
cache:
- !reference [.ccache_base, cache]
- !reference [.spack_cache, cache]
artifacts:
paths:
- build/
exclude:
- build/bin/ActsUnitTest*
- build/bin/ActsIntegrationTest*
- build/**/*.o
expire_in: 1 day
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env
- source .env
- cd ..
- mkdir build
- >
cmake -B build -S src
--preset=gitlab-ci
-DACTS_BUILD_PLUGIN_ONNX=ON
- ccache -z
- cmake --build build -- -j8
- ccache -s
- ctest --test-dir build -j$(nproc)
- cmake --build build --target integrationtests
# Install main project
- cmake --install build
# Downstream configure
- >
cmake -B build-downstream -S src/Tests/DownstreamProject
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_PREFIX_PATH="${INSTALL_DIR}"
# Downstream build
- cmake --build build-downstream
# Downstream tests
- ctest --test-dir build-downstream --output-on-failure
after_script:
- !reference [.spack_cleanup, after_script]
linux_test_examples:
stage: test
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404:85
needs: [build_linux_ubuntu]
cache:
- !reference [.spack_cache, cache]
script:
- apt-get update && apt-get install -y git-lfs
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env -f
- source .env
- cd ..
- source build/this_acts_withdeps.sh
- cd src
- pytest -rsfExw --durations=10 -k "not gnn" -v
after_script:
- !reference [.spack_cleanup, after_script]
linux_physmon:
stage: test
needs: [build_linux_ubuntu]
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404:85
artifacts:
when: always
paths:
- src/physmon
expire_in: 1 week
cache:
- !reference [.spack_cache, cache]
script:
- apt-get update && apt-get install -y git-lfs time
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c g++ -e .env -f
- source .env
- cd ..
- git config --global safe.directory "$GITHUB_WORKSPACE"
- source build/this_acts_withdeps.sh
- cd src
- CI/physmon/phys_perf_mon.sh all physmon
after_script:
- !reference [.spack_cleanup, after_script]
###############################
### UBUNTU EXTRA JOB MATRIX ###
###############################
.linux_ubuntu_extra:
variables:
INSTALL_DIR: ${CI_PROJECT_DIR}/install
stage: build
cache:
- !reference [.ccache_base, cache]
- !reference [.spack_cache, cache]
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- CI/dependencies/setup.sh -c ${CXX} -e .env
- source .env
- cd ..
- mkdir build
- >
cmake -B build -S src
--preset=gitlab-ci
-DCMAKE_CXX_STANDARD=${CXXSTD}
-DCMAKE_CXX_COMPILER=${CXX}
- ccache -z
- cmake --build build -- -j8
- ccache -s
- ctest --test-dir build -j$(nproc)
- cmake --build build --target integrationtests
# Install main project
- cmake --install build > install.log
# Downstream configure
- >
cmake -B build-downstream -S src/Tests/DownstreamProject
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-Werror
-DCMAKE_CXX_STANDARD=${CXXSTD}
-DCMAKE_CXX_COMPILER=${CXX}
-DCMAKE_PREFIX_PATH="${INSTALL_DIR}"
# Downstream build
- cmake --build build-downstream
# Downstream tests
- ctest --test-dir build-downstream --output-on-failure
after_script:
- !reference [.spack_cleanup, after_script]
linux_ubuntu_2404_clang22:
extends: .linux_ubuntu_extra
variables:
CXX: clang++-22
CXXSTD: 23
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404_clang22:85
######################
### LCG JOB MATRIX ###
######################
.lcg_base_job:
image: registry.cern.ch/ghcr.io/acts-project/${OS}-base:85
stage: build
tags:
- cvmfs
variables:
LCG_VERSION:
ACTS_LOG_FAILURE_THRESHOLD: WARNING
ACTS_SEQUENCER_FAIL_ON_UNMASKED_FPE: 0
INSTALL_DIR: ${CI_PROJECT_DIR}/install
# force off even if it is CI mode
ROOT_HASH_CHECKS: off
cache:
- !reference [.ccache_base, cache]
before_script:
- 'echo "LCG_VERSION: ${LCG_VERSION}"'
- 'echo "COMPILER: ${COMPILER}"'
# Figure out LCG platform name based on version number and OS
- >
if [ "$OS" = "alma9" ]; then
export LCG_PLATFORM="el9"
else
export LCG_PLATFORM="$OS"
fi
- dnf install -y git-lfs
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- cd ..
- 'echo "LCG_PLATFORM: ${LCG_PLATFORM}"'
- source /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/x86_64-${LCG_PLATFORM}-${COMPILER}-opt/setup.sh
script:
- >
cmake -B build -S src
--preset=gitlab-ci-lcg
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
- ccache -z
- cmake --build build -- -j8
- ccache -s
lcg_107:
extends: .lcg_base_job
variables:
LCG_VERSION: "107"
parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc13
- clang16
lcg_107a:
extends: .lcg_base_job
variables:
LCG_VERSION: "107a"
parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc14
lcg_108:
extends: .lcg_base_job
variables:
LCG_VERSION: "108"
parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc15
lcg_109:
extends: .lcg_base_job
variables:
LCG_VERSION: "109"
parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc15
- clang19
script:
- !reference [.lcg_base_job, script]
- ctest --test-dir build -j$(nproc)
# Install main project for Python tests
- cmake --install build > install.log
# Install Python dependencies
- source build/this_acts_withdeps.sh
- python3 -m pip install -r src//Python/Examples/tests/requirements.txt
- cd src
# plotting tests with mplhep fail because an ancient mplhep version in LCG
# overrides the mplhep version in our venv
- pytest -rsfExw --durations=10 -k "not gnn and not plot" -v -n1
# Detray gitlab CI workflows
detray_build_cuda:
tags: [docker]
stage: build
image: ghcr.io/acts-project/ubuntu2404_cuda:82
cache:
- !reference [.ccache_base, cache]
artifacts:
paths:
- build
only:
changes:
- Detray/*
- .gitlab-ci.yml
script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- >
cmake --preset detray-gitlab-cuda-ci -S src/Detray -B build
-DCMAKE_BUILD_TYPE=Release
- ccache -z
- cmake --build build -- -j 2
- ccache -s
detray_test_cuda:
variables:
DETRAY_DATA_DIRECTORY: src/Detray/data/
DETRAY_BFIELD_FILE: $CI_PROJECT_DIR/src/Detray/data/odd-bfield_v0_9_0.cvf
stage: test
tags: [docker-gpu-nvidia]
image: ghcr.io/acts-project/ubuntu2404_cuda:82
needs:
- detray_build_cuda
only:
changes:
- Detray/*
- .gitlab-ci.yml
script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- src/Detray/data/detray_data_get_files.sh
- cd build
- nvidia-smi
- ctest --output-on-failure -R ".*cuda.*"
- find bin -type f -name "*cuda" -not -name "*text*" -exec {} \;
detray_build_sycl:
tags: [docker-gpu-nvidia]
stage: build
image: "ghcr.io/acts-project/ubuntu2404_oneapi:81"
cache:
- !reference [.ccache_base, cache]
artifacts:
paths:
- build
only:
changes:
- Detray/*
- .gitlab-ci.yml
script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- source src/Detray/CI/ci_setup.sh SYCL
- >
cmake --preset detray-gitlab-sycl-ci -S src/Detray -B build
-DCMAKE_BUILD_TYPE=Release
- ccache -z
- cmake --build build -- -j 2
- ccache -s
detray_test_sycl:
stage: test
tags: [docker-gpu-nvidia]
image: "ghcr.io/acts-project/ubuntu2404_oneapi:81"
needs:
- detray_build_sycl
variables:
ONEAPI_DEVICE_SELECTOR: "*:cpu"
only:
changes:
- Detray/*
- .gitlab-ci.yml
script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- source src/Detray/CI/ci_setup.sh SYCL
- cd build
- nvidia-smi
- sycl-ls
- ctest --output-on-failure -R ".*sycl.*"
- find bin -type f -name "*sycl" -not -name "*text*" -exec {} \;