-
Notifications
You must be signed in to change notification settings - Fork 171
/
.gitlab-ci.yml
443 lines (371 loc) · 10.7 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
variables:
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
CCACHE_MAXSIZE: 2G
CCACHE_KEY_SUFFIX: r2
CTEST_OUTPUT_ON_FAILURE: 1
DEPENDENCY_TAG: v5
clang_tidy:
stage: build
image: ghcr.io/acts-project/ubuntu2404:63
tags:
- large
artifacts:
paths:
- src/clang-tidy/
when: always
expire_in: 1 week
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.$DEPENDENCY_TAG.tar.zst
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- >
apt-get update
&& apt-get install -y clang-tidy-18
&& ln -sf /usr/bin/clang++-18 /usr/bin/clang++
&& ln -sf /usr/bin/clang-18 /usr/bin/clang
&& ln -sf /usr/bin/clang-tidy-18 /usr/bin/clang-tidy
- source CI/dependencies.sh
- >
cmake -B build -S .
--preset=gitlab-ci-clangtidy
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-DPython_EXECUTABLE=$(which python3)
# Main clang-tidy run during cmake compilation
- CI/clang_tidy/run_clang_tidy.sh clang-tidy build
# Install dependencies for processing scripts
- python3 -m pip install -r CI/clang_tidy/requirements.txt
# Parse the main clang-tidy run
- >
CI/clang_tidy/parse_clang_tidy.py
clang-tidy/clang-tidy.log
clang-tidy/clang-tidy.json
--exclude "*thirdparty*"
--exclude "*ActsPodioEdm*"
--exclude "*build/_deps/*"
# Check the combined report against the defined limits
- CI/clang_tidy/check_clang_tidy.py --report clang-tidy/clang-tidy.json --config CI/clang_tidy/limits.yml
# Generate an html report
- codereport clang-tidy/clang-tidy.json clang-tidy/html
build_exatrkx_cpu:
stage: build
image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
tags:
- large
cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
script:
- export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
- export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:$PATH
- export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0"
- echo $PATH
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- source CI/dependencies.sh
- cd ..
- mkdir build
# Here we only do a minimal build without examples to save resources
- >
cmake -B build -S src
--preset=gitlab-ci-exatrkx
-DPython_EXECUTABLE=$(which python3)
-DACTS_EXATRKX_ENABLE_CUDA=OFF
- ccache -z
- cmake --build build -- -j6
- ccache -s
build_exatrkx:
stage: build
image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
tags:
- large
cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
artifacts:
paths:
- 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
- export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0"
- echo $PATH
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- source CI/dependencies.sh
- cd ..
- mkdir build
- >
cmake -B build -S src
--preset=gitlab-ci-exatrkx
-DPython_EXECUTABLE=$(which python3)
-DCMAKE_CUDA_ARCHITECTURES="75;86"
- ccache -z
- cmake --build build -- -j6
- ccache -s
# test_exatrkx_unittests:
# stage: test
# needs:
# - build_exatrkx
# image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
# tags:
# - docker-gpu-nvidia
# script:
# - ctest --test-dir build -R ExaTrkX
#
# test_exatrkx_python:
# stage: test
# needs:
# - build_exatrkx
# image: ghcr.io/acts-project/ubuntu2204_exatrkx:63
# tags:
# - docker-gpu-nvidia
# script:
# - apt-get update -y
# - apt-get install -y python3 libxxhash0
# - source build/this_acts_withdeps.sh
# - git clone $CLONE_URL src
# - cd src
# - git checkout $HEAD_SHA
# - pip3 install -r Examples/Python/tests/requirements.txt
# - nvidia-smi
# - pytest -rFsv -k test_exatrkx
build_linux_ubuntu:
stage: build
image: ghcr.io/acts-project/ubuntu2404:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.$DEPENDENCY_TAG.tar.zst
cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
artifacts:
paths:
- build/
exclude:
- build/bin/ActsUnitTest*
- build/bin/ActsIntegrationTest*
- build/**/*.o
expire_in: 1 day
script:
- echo $PATH
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- git submodule init
- git submodule update
- source CI/dependencies.sh
- cd ..
- mkdir build
- >
cmake -B build -S src
--preset=gitlab-ci
-DPython_EXECUTABLE=$(which python3)
-DACTS_BUILD_PLUGIN_ONNX=ON
- ccache -z
- cmake --build build -- -j6
- ccache -s
linux_test_examples:
stage: test
image: ghcr.io/acts-project/ubuntu2404:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.$DEPENDENCY_TAG.tar.zst
needs: [build_linux_ubuntu]
script:
- apt-get update && apt-get install -y git-lfs
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- git submodule init
- git submodule update
- source CI/dependencies.sh
- cd ..
- geant4-config --install-datasets
- source build/this_acts_withdeps.sh
- cd src
- python3 -m pip install -r Examples/Python/tests/requirements.txt
- pytest -rFsv -k "not exatrkx" -v -s
linux_physmon:
stage: test
image: ghcr.io/acts-project/ubuntu2404:63
variables:
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.$DEPENDENCY_TAG.tar.zst
needs: [build_linux_ubuntu]
artifacts:
when: always
paths:
- src/physmon
expire_in: 1 week
script:
- apt-get update && apt-get install -y git-lfs time
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- git submodule init
- git submodule update
- source CI/dependencies.sh
- cd ..
- git config --global safe.directory "$GITHUB_WORKSPACE"
- python3 -m pip install histcmp==0.6.8 matplotlib
- python3 -m pip install -r src/Examples/Scripts/requirements.txt
- geant4-config --install-datasets
- venv_python=$(which python3)
- echo $venv_python
- source build/this_acts_withdeps.sh
- export PATH=$(dirname $venv_python):$PATH
- echo $PATH
- which python3
- cd src
- CI/physmon/phys_perf_mon.sh all physmon
###############################
### UBUNTU EXTRA JOB MATRIX ###
###############################
.linux_ubuntu_extra:
variables:
INSTALL_DIR: ${CI_PROJECT_DIR}/install
stage: build
cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- git submodule init
- git submodule update
- source CI/dependencies.sh
- cd ..
- mkdir build
- >
cmake -B build -S src
--preset=gitlab-ci
-DPython_EXECUTABLE=$(which python3)
-DCMAKE_CXX_STANDARD=${CXXSTD}
- ccache -z
- cmake --build build -- -j6
- 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_CXX_STANDARD=${CXXSTD}
-DCMAKE_PREFIX_PATH="${INSTALL_DIR}"
# Downstream build
- cmake --build build-downstream
# Downstream run
- ./build-downstream/bin/ShowActsVersion
linux_ubuntu_2204:
extends: .linux_ubuntu_extra
variables:
CXXSTD: 20
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
image: ghcr.io/acts-project/ubuntu2204:63
linux_ubuntu_2204_clang:
extends: .linux_ubuntu_extra
variables:
CXXSTD: 20
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.$DEPENDENCY_TAG.tar.zst
image: ghcr.io/acts-project/ubuntu2204_clang:63
######################
### LCG JOB MATRIX ###
######################
.lcg_base_job:
image: ghcr.io/acts-project/${OS}-base:63
stage: build
tags:
- cvmfs
variables:
ACTS_LOG_FAILURE_THRESHOLD: WARNING
INSTALL_DIR: ${{ github.workspace }}/install
SETUP:
cache:
key: ccache-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}-${CCACHE_KEY_SUFFIX}
fallback_keys:
- ccache-${CI_JOB_NAME}-${CI_DEFAULT_BRANCH}-${CCACHE_KEY_SUFFIX}
when: always
paths:
- ${CCACHE_DIR}
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
- 'echo "LCG_PLATFORM: ${LCG_PLATFORM}"'
- source /cvmfs/sft.cern.ch/lcg/views/LCG_${LCG_VERSION}/x86_64-${LCG_PLATFORM}-${COMPILER}-opt/setup.sh
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- git submodule init
- git submodule update
- cd ..
- ccache --version
script:
- >
cmake -B build -S src
--preset=gitlab-ci
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
-DPython_EXECUTABLE=$(which python3)
-DACTS_BUILD_PLUGIN_GEOMODEL=OFF # GeoModel is not in LCG at this point
- ccache -z
- cmake --build build -- -j6
- ccache -s
- ctest --test-dir build -j$(nproc)
lcg_105:
extends: .lcg_base_job
variables:
LCG_VERSION: "105"
parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc13
- clang16
lcg_106a:
extends: .lcg_base_job
variables:
LCG_VERSION: "106a"
parallel:
matrix:
- OS: [alma9]
COMPILER:
- gcc13
- gcc14
- clang16