-
Notifications
You must be signed in to change notification settings - Fork 196
295 lines (265 loc) · 9.16 KB
/
ubuntu.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
name: 🐧 OpenMP
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu
cancel-in-progress: true
jobs:
build_cxxminimal:
name: GCC Minimal w/o MPI
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
- name: CCache Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="RZ;3" \
-DWarpX_EB=OFF \
-DWarpX_MPI=OFF \
-DWarpX_QED=OFF
cmake --build build -j 4
./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_3d
./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_rz
ccache -s
du -hs ~/.cache/ccache
build_1D_2D:
name: GCC 1D & 2D w/ MPI, QED tools
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
CXX: "g++-12"
CC: "gcc-12"
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc12.sh
- name: CCache Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
cmake -S . -B build \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="1;2" \
-DWarpX_EB=OFF \
-DWarpX_FFT=ON \
-DWarpX_QED_TABLE_GEN=ON \
-DWarpX_QED_TOOLS=ON
cmake --build build -j 4
./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_1d
./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_2d
ccache -s
du -hs ~/.cache/ccache
- name: run QED table tools
run: |
.github/workflows/scripts/checkQEDTableGenerator.sh
build_3D_sp:
name: GCC 3D & RZ w/ MPI, single precision
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CXX: "g++-12"
CC: "gcc-12"
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc12_blaspp_lapackpp.sh
- name: CCache Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=200M
ccache -z
# we need to define this *after* having installed the dependencies,
# because the compilation of blaspp raises warnings.
export CXXFLAGS="-Werror"
cmake -S . -B build \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="RZ;3" \
-DWarpX_EB=OFF \
-DWarpX_FFT=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PARTICLE_PRECISION=SINGLE \
-DWarpX_QED_TABLE_GEN=ON
cmake --build build -j 4
./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_3d
./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_rz
ccache -s
du -hs ~/.cache/ccache
build_gcc_ablastr:
name: GCC ABLASTR w/o MPI
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-Werror"
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
sudo apt-get install -y libopenmpi-dev openmpi-bin
- name: CCache Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_APP=OFF \
-DWarpX_LIB=OFF
cmake --build build -j 4
ccache -s
du -hs ~/.cache/ccache
build_pyfull:
name: Clang pywarpx
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CC: clang
CXX: clang++
# On CI for this test, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/pyfull.sh
- name: CCache Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build packaging setuptools wheel
export CXXFLAGS="-Werror -Wno-error=pass-failed"
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_APP=OFF \
-DWarpX_FFT=ON \
-DWarpX_PYTHON=ON \
-DWarpX_QED_TABLE_GEN=ON
cmake --build build -j 4 --target pip_install
ccache -s
du -hs ~/.cache/ccache
- name: run pywarpx
run: |
export OMP_NUM_THREADS=1
mpirun -n 2 Examples/Physics_applications/laser_acceleration/PICMI_inputs_3d.py
build_UB_sanitizer:
name: Clang UB sanitizer
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CC: clang
CXX: clang++
# On CI for this test, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
.github/workflows/dependencies/clang15.sh
- name: CCache Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
ccache -z
export CXX=$(which clang++-15)
export CC=$(which clang-15)
export CXXFLAGS="-fsanitize=undefined -fno-sanitize-recover=all"
cmake -S . -B build \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS="RZ;1;2;3" \
-DWarpX_FFT=ON \
-DWarpX_QED=ON \
-DWarpX_QED_TABLE_GEN=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_PRECISION=SINGLE \
-DWarpX_PARTICLE_PRECISION=SINGLE
cmake --build build -j 4
ccache -s
du -hs ~/.cache/ccache
- name: run with UB sanitizer
run: |
export OMP_NUM_THREADS=2
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_rz
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_1d
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_2d
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_3d
save_pr_number:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt
retention-days: 1