-
Notifications
You must be signed in to change notification settings - Fork 51
/
.gitlab-ci.yml
109 lines (98 loc) · 2.91 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
# TRACCC library, part of the ACTS project (R&D line)
#
# (c) 2022-2024 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0
# The list of build satages.
stages:
- build
- test
# Base job template.
.base_template: &base_job
before_script:
- git clone $CLONE_URL src
- git -C src checkout $HEAD_SHA
- source ./src/.github/ci_setup.sh ${TRACCC_BUILD_TYPE}
# Build job template.
.build_template: &build_job
<<: *base_job
tags: [docker]
stage: build
artifacts:
paths:
- build
script:
- SYCLFLAGS="${TRACCC_SYCL_FLAGS}" CXXFLAGS="${TRACCC_CXX_FLAGS}"
cmake -G Ninja --preset ${TRACCC_BUILD_PRESET} -DCMAKE_BUILD_TYPE=Release
-DTRACCC_BUILD_EXAMPLES=FALSE ${TRACCC_CMAKE_ARGS}
-S src -B build
- cmake --build build --parallel 2
# Test job template for running on an NVIDIA GPU.
.nvidia_test_template: &nvidia_test_job
<<: *base_job
tags: [docker-gpu-nvidia]
stage: test
script:
- nvidia-smi
- ./src/data/traccc_data_get_files.sh
- ctest --output-on-failure --test-dir build/ -R "${TRACCC_BUILD_TYPE}"
# Test job template for running on an Intel device.
.intel_test_template: &intel_test_job
<<: *base_job
tags: [docker-gpu-nvidia]
stage: test
script:
- ./src/data/traccc_data_get_files.sh
- ctest --output-on-failure --test-dir build/ -R "${TRACCC_BUILD_TYPE}"
# CUDA build job.
build:cuda:
<<: *build_job
image: ghcr.io/acts-project/ubuntu2204_cuda:56
variables:
TRACCC_BUILD_TYPE: CUDA
TRACCC_BUILD_PRESET: cuda-fp32
# CUDA test job.
test:cuda:
<<: *nvidia_test_job
image: ghcr.io/acts-project/ubuntu2204_cuda:56
variables:
TRACCC_BUILD_TYPE: CUDA
dependencies:
- build:cuda
# SYCL build job (with an Intel backend).
build:sycl_intel:
<<: *build_job
image: ghcr.io/acts-project/ubuntu2404_oneapi:56
variables:
TRACCC_BUILD_TYPE: SYCL
TRACCC_BUILD_PRESET: sycl-fp32
TRACCC_SYCL_FLAGS: -fsycl -fsycl-targets=spir64
TRACCC_CMAKE_ARGS: -DTRACCC_BUILD_CUDA=FALSE
# SYCL test job (with an Intel backend).
test:sycl_intel:
<<: *intel_test_job
image: ghcr.io/acts-project/ubuntu2404_oneapi:56
variables:
TRACCC_BUILD_TYPE: SYCL
ONEAPI_DEVICE_SELECTOR: opencl:*
dependencies:
- build:sycl_intel
# SYCL build job (with an NVIDIA backend).
build:sycl_nvidia:
<<: *build_job
image: ghcr.io/acts-project/ubuntu2204_cuda_oneapi:56
variables:
TRACCC_BUILD_TYPE: SYCL
TRACCC_BUILD_PRESET: sycl-fp32
TRACCC_SYCL_FLAGS: -fsycl -fsycl-targets=nvidia_gpu_sm_75 -Wno-unknown-cuda-version -Wno-deprecated-declarations
TRACCC_CXX_FLAGS: -Wno-deprecated-declarations
TRACCC_CMAKE_ARGS: -DTRACCC_BUILD_CUDA=FALSE
# SYCL test job (with an NVIDIA backend).
test:sycl_nvidia:
<<: *nvidia_test_job
image: ghcr.io/acts-project/ubuntu2204_cuda_oneapi:56
variables:
TRACCC_BUILD_TYPE: SYCL
ONEAPI_DEVICE_SELECTOR: cuda:*
dependencies:
- build:sycl_nvidia