-
Notifications
You must be signed in to change notification settings - Fork 266
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
267 lines (234 loc) · 7.77 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
267 lines (234 loc) · 7.77 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
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.3.1
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
# Only GPU jobs and their artifact producers remain here. build_gnn_cpu moved
# to .github/workflows/builds.yml as `gnn_cpu`.
build_gnn:
stage: build
image: registry.cern.ch/ghcr.io/acts-project/ubuntu2404_gnn:87
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:87
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:87
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 moved to builds.yml as `gnn_tensorrt`.
# linux_ubuntu_2404_clang22 dropped: builds.yml `linux_ubuntu_extra` duplicated it.
# The LCG job matrix lives in .github/workflows/builds.yml (job `lcg`); it runs
# on self-hosted runners carrying the `cvmfs` label.
# Detray gitlab CI workflows
detray_build_cuda:
tags: [docker]
stage: build
image: ghcr.io/acts-project/ubuntu2404_cuda:87
cache:
- !reference [.ccache_base, cache]
artifacts:
paths:
- build
only:
changes:
# Not `Detray/*`: GitLab globs via fnmatch FNM_PATHNAME, where `*` does
# not cross a `/`, so that matched only the top level of Detray/.
- 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:87
needs:
- detray_build_cuda
only:
changes:
# Must stay identical to detray_build_cuda.
- 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 SYCL build/test dropped along with all other SYCL coverage.
# traccc GitLab CI workflows
.traccc_base_template: &traccc_base_job
before_script:
- apt install -y zstd
- curl --retry 5 --retry-delay 10 --output deps.tar.zst https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.v6.tar.zst
- tar -xf deps.tar.zst -C /usr/local --strip-components=1
- rm deps.tar.zst
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- source ./src/Traccc/.github/ci_setup.sh ${TRACCC_BUILD_TYPE}
- export CTEST_PARALLEL_LEVEL=2
.traccc_build_template: &traccc_build_job
<<: *traccc_base_job
tags: [docker]
stage: build
artifacts:
paths:
- build
exclude:
# Only the test binaries and the libraries they load are consumed
# downstream. Note build/_deps must stay: vecmem is pulled in via
# FetchContent and its shared libraries live there at runtime.
- build/**/*.o
expire_in: 6 hours
script:
- CXXFLAGS="${TRACCC_CXX_FLAGS}"
cmake -G Ninja --preset ${TRACCC_BUILD_PRESET} -DTRACCC_SETUP_VECMEM=ON -DTRACCC_SETUP_COVFIE=ON -DACTS_SETUP_VECMEM=OFF -DACTS_SETUP_COVFIE=OFF -DDETRAY_SET_LOGGING=NONE -DCMAKE_BUILD_TYPE=Release -DTRACCC_BUILD_EXAMPLES=FALSE ${TRACCC_CMAKE_ARGS}
-S src/Traccc -B build
# Build only the test binary the paired test job runs, not everything.
- cmake --build build --parallel 2 --target ${TRACCC_BUILD_TARGET}
.traccc_nvidia_test_template: &traccc_nvidia_test_job
<<: *traccc_base_job
tags: [docker-gpu-nvidia]
stage: test
script:
- nvidia-smi
- ./src/Traccc/data/traccc_data_get_files.sh
# ctest -R is case-sensitive, so the regex must spell out both cases or
# it silently skips the lowercase-named GPU tests (e.g. grids_cuda.*).
- ctest --output-on-failure --test-dir build/ -R "${TRACCC_TEST_REGEX}"
traccc_build_cuda:
<<: *traccc_build_job
image: ghcr.io/acts-project/ubuntu2404_cuda:87
variables:
TRACCC_BUILD_TYPE: CUDA
TRACCC_BUILD_PRESET: cuda-fp32
TRACCC_BUILD_TARGET: traccc_test_cuda
# device/cuda generates 13 nvcc translation units per detector type, so
# build only the two the CUDA tests instantiate. The full matrix is still
# compiled by the GitHub CUDA-Release and cuda-fp64 jobs.
TRACCC_CMAKE_ARGS: "-DTRACCC_SUPPORTED_DETECTORS=default_detector;telescope_detector"
traccc_test_cuda:
<<: *traccc_nvidia_test_job
image: ghcr.io/acts-project/ubuntu2404_cuda:87
variables:
TRACCC_BUILD_TYPE: CUDA
TRACCC_TEST_REGEX: "[Cc][Uu][Dd][Aa]"
dependencies:
- traccc_build_cuda
# traccc SYCL Intel build/test dropped along with all other SYCL coverage.