-
Notifications
You must be signed in to change notification settings - Fork 19
200 lines (179 loc) · 6.6 KB
/
builds.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
name: Builds
on:
push:
pull_request:
branches:
- main
# Cancel existing jobs on new pushes.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# All the different build/test jobs.
jobs:
# Native build jobs.
native:
# The different build modes to test.
strategy:
matrix:
BUILD_TYPE: ["Debug"]
PLATFORM:
- OS: "ubuntu-latest"
GENERATOR: "Unix Makefiles"
- OS: "macos-latest"
GENERATOR: "Xcode"
# The system to run on.
runs-on: ${{ matrix.PLATFORM.OS }}
name: "native (${{ matrix.PLATFORM.OS }})"
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: cmake --preset full-fp64
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }}
-DDETRAY_FAIL_ON_WARNINGS=ON
-S ${{ github.workspace }} -B build
-G "${{ matrix.PLATFORM.GENERATOR }}"
# Perform the build.
- name: Build
run: cmake --build build --config ${{ matrix.BUILD_TYPE }} -- -j 2
# Containerised build jobs.
host-container:
# The different build modes to test.
strategy:
matrix:
BUILD_TYPE: ["Release", "Debug"]
SCALAR_TYPE: ["float", "double"]
PLATFORM:
- NAME: "HOST"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404:56"
OPTIONS: -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=ON -DDETRAY_VC_AOS_PLUGIN=ON -DDETRAY_VC_SOA_PLUGIN=ON
# The system to run on.
runs-on: ubuntu-latest
container: ${{ matrix.PLATFORM.CONTAINER }}
name: "host-container (${{ matrix.PLATFORM.NAME }}, C++${{ matrix.PLATFORM.CXX_STANDARD }})"
# Use BASH as the shell from the image.
defaults:
run:
shell: bash
# Set the path to the test data files
env:
DETRAY_DATA_DIRECTORY: ${{ github.workspace }}/data/
DETRAY_BFIELD_FILE: ${{ github.workspace }}/data/odd-bfield_v0_9_0.cvf
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Get the data files for the tests
- name: Download data files
run: data/detray_data_get_files.sh
# Run the CMake configuration.
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake --preset full-fp32 \
-DCMAKE_CXX_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} \
-DDETRAY_BUILD_BENCHMARKS=OFF \
-DDETRAY_FAIL_ON_WARNINGS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} \
${{ matrix.PLATFORM.OPTIONS }} \
-S ${GITHUB_WORKSPACE} \
-B build
# Perform the build.
- name: Build
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake --build build -- -j $(nproc)
# Run the unit test(s).
- name: Full Test
if: "matrix.BUILD_TYPE == 'Release'"
run: |
cd build
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
ctest --output-on-failure
- name: Unit Tests
if: "matrix.BUILD_TYPE == 'Debug'"
run: |
cd build
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
ctest -R detray_unit_test_. -E "._eigen|._vc_aos" --output-on-failure
# Containerised build jobs.
device-container:
# The different build modes to test.
strategy:
matrix:
BUILD_TYPE: ["Debug"]
SCALAR_TYPE: ["float", "double"]
PLATFORM:
- NAME: "CUDA"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_cuda:67"
OPTIONS: -DDETRAY_BUILD_CUDA=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_AOS_PLUGIN=OFF -DDETRAY_VC_SOA_PLUGIN=OFF
- NAME: "SYCL"
CXX_STANDARD: "20"
CONTAINER: "ghcr.io/acts-project/ubuntu2404_oneapi:56"
OPTIONS: -DDETRAY_BUILD_CUDA=OFF -DDETRAY_BUILD_SYCL=ON -DDETRAY_EIGEN_PLUGIN=ON -DDETRAY_SMATRIX_PLUGIN=OFF -DDETRAY_VC_AOS_PLUGIN=OFF -DDETRAY_VC_SOA_PLUGIN=OFF
# The system to run on.
runs-on: ubuntu-latest
container: ${{ matrix.PLATFORM.CONTAINER }}
name: "device-container (${{ matrix.PLATFORM.NAME }}, C++${{ matrix.PLATFORM.CXX_STANDARD }})"
# Use BASH as the shell from the image.
defaults:
run:
shell: bash
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake --preset full-fp32 \
-DCMAKE_CXX_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} \
-DCMAKE_CUDA_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} \
-DCMAKE_SYCL_STANDARD=${{ matrix.PLATFORM.CXX_STANDARD }} \
-DDETRAY_BUILD_HOST=OFF \
-DDETRAY_FAIL_ON_WARNINGS=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} \
${{ matrix.PLATFORM.OPTIONS }} \
-S ${GITHUB_WORKSPACE} \
-B build
# Perform the build.
- name: Build
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh ${{ matrix.PLATFORM.NAME }}
cmake --build build
- name: FP64 Compliance
if: "matrix.PLATFORM.NAME == 'CUDA' && matrix.BUILD_TYPE == 'Debug' && matrix.SCALAR_TYPE == 'float'"
continue-on-error: true
run: ${GITHUB_WORKSPACE}/.github/find_f64_ptx.py --source ${GITHUB_WORKSPACE} --build build $(find build -name "*.ptx" ! -name "container_cuda_kernel.ptx")
benchmark-build:
# The system to run on.
runs-on: ubuntu-latest
container: ghcr.io/acts-project/ubuntu2204_cuda:56
name: "gitlab-benchmark"
# Use BASH as the shell from the image.
defaults:
run:
shell: bash
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: Configure
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh CUDA
cmake --preset gitlab-benchmark \
-S ${GITHUB_WORKSPACE} \
-B build
# Perform the build.
- name: Build
run: |
source ${GITHUB_WORKSPACE}/.github/ci_setup.sh CUDA
cmake --build build