-
Notifications
You must be signed in to change notification settings - Fork 50
435 lines (433 loc) · 15 KB
/
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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
CI:
defaults:
run:
shell: bash
env:
CCACHE_DIR: "${{ github.workspace }}/.ccache"
CCACHE_MAXSIZE: "10G"
CCACHE_CPP2: "true"
ASAN_OPTIONS: "detect_leaks=0"
strategy:
matrix:
distro: ['ubuntu:latest']
cxx: ['g++', 'clang++']
backend: ['OPENMP', 'SERIAL']
cmake_build_type: ['Debug', 'Release']
kokkos_ver: ['3.7.02']
bounds_check: ['OFF']
arborx: ['OFF']
heffte: ['OFF' ]
hypre: ['OFF']
liball: ['OFF']
silo: ['OFF']
hdf5: ['OFF']
coverage: ['OFF']
include:
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'THREADS'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
silo: 'OFF'
coverage: 'OFF'
- distro: 'fedora:intel'
cxx: 'icpx'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'fedora:intel'
cxx: 'icpx'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'fedora:intel'
cxx: 'icpx'
backend: 'SERIAL'
cmake_build_type: 'Release'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'fedora:intel'
cxx: 'icpx'
backend: 'SERIAL'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'fedora:intel'
cxx: 'icpx'
backend: 'SERIAL'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'MKL'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'fedora:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '4.0.00'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
doxygen: 'ON'
- distro: 'fedora:latest'
cxx: 'clang++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '4.0.00'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'opensuse:latest'
cxx: 'g++'
cmake_build_type: 'Release'
backend: 'OPENMP'
kokkos_ver: '4.0.00'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'opensuse:latest'
cxx: 'clang++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '4.0.00'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
hdf5: 'HDF5'
coverage: 'OFF'
- distro: 'ubuntu:rolling'
cxx: 'g++'
cmake_build_type: 'Release'
backend: 'OPENMP'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'ubuntu:rolling'
cxx: 'clang++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'fedora:nompi'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '4.0.00'
arborx: 'ArborX'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '3.7.02'
arborx: 'ArborX'
heffte: 'OFF'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'FFTW'
hypre: 'OFF'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Release'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
liball: 'libALL'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'HYPRE'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
silo: 'Silo'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'OFF'
heffte: 'OFF'
hypre: 'OFF'
hdf5: 'HDF5'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'ArborX'
heffte: 'FFTW'
hypre: 'HYPRE'
liball: 'libALL'
silo: 'Silo'
hdf5: 'HDF5'
bounds_check: 'BoundsCheck'
coverage: 'OFF'
- distro: 'ubuntu:latest'
cxx: 'g++'
backend: 'OPENMP'
cmake_build_type: 'Debug'
kokkos_ver: '3.7.02'
arborx: 'ArborX'
heffte: 'FFTW'
hypre: 'HYPRE'
liball: 'libALL'
silo: 'Silo'
hdf5: 'HDF5'
coverage: 'ON'
runs-on: ubuntu-20.04
container:
image: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }}
options: --security-opt seccomp=unconfined
# FIXME: remove failing distributions here when passing
continue-on-error: ${{ (matrix.distro == 'fedora:intel' && matrix.backend == 'SERIAL' && matrix.cmake_build_type == 'Release') }}
steps:
- name: Cache ccache
uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.distro }}-${{github.run_id}}
restore-keys: ccache-${{ matrix.distro }}
- name: Zero ccache stats
run: |
ccache -z
- name: Checkout kokkos
uses: actions/[email protected]
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
env:
BOUNDS: ${{ matrix.bounds_check }}
working-directory: kokkos
run: |
[[ ${{ matrix.backend }} == "OPENMP" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_OPENMP==ON )
[[ ${{ matrix.backend }} == "THREADS" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_THREADS==ON )
[[ ${BOUNDS} == "BoundsCheck" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_DEBUG_BOUNDS_CHECK=ON )
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DKokkos_ENABLE_HWLOC=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
${kokkos_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout arborx
if: ${{ matrix.arborx == 'ArborX' }}
uses: actions/[email protected]
with:
repository: arborx/ArborX
ref: v1.2
path: arborx
- name: Build arborx
if: ${{ matrix.arborx == 'ArborX' }}
working-directory: arborx
run: |
cmake -B build \
-DKokkos_ROOT=${HOME}/kokkos \
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout heffte
if: ${{ matrix.heffte != 'OFF' }}
# actions/checkout doesn't work for external repos yet (actions/checkout#447)
run: |
git clone --depth 1 --branch v2.3.0 https://bitbucket.org/icl/heffte.git heffte
- name: Build heffte
if: ${{ matrix.heffte != 'OFF' }}
working-directory: heffte
run: |
[[ ${{ matrix.heffte }} == "FFTW" ]] && heffte_cmake_opts+=( -DHeffte_ENABLE_FFTW=ON )
[[ ${{ matrix.heffte }} == "MKL" ]] && heffte_cmake_opts+=( -DHeffte_ENABLE_MKL=ON )
# FIXME: Remove MKL path below when we update heFFTe
cmake -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=$HOME/heffte \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DMKL_ROOT=/opt/intel/oneapi/mkl/latest \
-DHeffte_MKL_IOMP5=/opt/intel/oneapi/compiler/latest/linux/compiler/lib/intel64_lin/libiomp5.so \
${heffte_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout hypre
if: ${{ matrix.hypre == 'HYPRE' }}
uses: actions/[email protected]
with:
repository: hypre-space/hypre
ref: v2.22.1
path: hypre
- name: Build hypre
if: ${{ matrix.hypre == 'HYPRE' }}
working-directory: hypre/src
run: |
[[ ${{ matrix.backend }} == 'OPENMP' ]] && hypre_cmake_opts+=( -DHYPRE_WITH_OPENMP=ON )
cmake -B build \
-DHYPRE_INSTALL_PREFIX=$HOME/hypre \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DHYPRE_WITH_MPI=ON \
${hypre_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout ALL
if: ${{ matrix.liball == 'libALL' }}
run: |
git clone --depth 1 --branch v0.9.2 https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing ALL
- name: Build ALL
if: ${{ matrix.liball == 'libALL' }}
working-directory: ALL
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/ALL
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/[email protected]
- name: Build Cabana
env:
SANITIZER: ${{ matrix.sanitizer }}
SILO: ${{ matrix.silo }}
HDF5: ${{ matrix.hdf5 }}
run: |
if [[ ${SILO} == 'Silo' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_SILO=ON )
else
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_SILO=ON )
fi
if [[ ${HDF5} == 'HDF5' ]]; then
cabana_cmake_opts+=( -DCabana_REQUIRE_HDF5=ON )
else
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON )
fi
# FIXME: Add sanitizer for fedora when fixed
if [[ ${SANITIZER} == 'MSAN' ]]; then
cabana_cmake_opts+=( -DWITH_MSAN=ON )
elif [[ ${{ matrix.distro }} != *"fedora"* ]]; then
cabana_cmake_opts+=( -DWITH_ASAN=ON )
fi
#FIXME: Run valgrind for all builds once fixed/suppressed
[[ ${{ matrix.distro }} == 'ubuntu:latest' || ${{ matrix.distro }} == 'ubuntu:rolling' || ${{ matrix.backend }} == OPENMP || ${{ matrix.cmake_build_type }} == Release ]] && cabana_cmake_opts+=( -DVALGRIND_EXECUTABLE=False )
cmake -B build \
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/hypre;$HOME/ALL" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror $([[ ${{ matrix.cxx }} == icpx ]] && echo -DCMAKE_CXX_FLAGS_DEBUG="-g -O0")" \
-DCabana_ENABLE_TESTING=ON \
-DCabana_ENABLE_EXAMPLES=ON \
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \
-DCabana_ENABLE_COVERAGE_BUILD=${{ matrix.coverage }} \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-DDOXYGEN_WARN_AS_ERROR=FAIL_ON_WARNINGS \
${cabana_cmake_opts[@]}
cmake --build build --parallel 2 --verbose
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
cmake --install build
- name: Test Cabana Export Target
working-directory: example/core_tutorial/01_hello_world
run: |
cmake -B build \
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/hypre;$HOME/Cabana" \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
cmake --build build
- name: Build Doxygen
if: ${{ matrix.doxygen == 'ON' }}
run: cmake --build build --target doxygen
- name: Show ccache stats
run: |
ccache -s
- name: Upload Report to codecov.io
if: ${{ matrix.coverage == 'ON' }}
uses: codecov/codecov-action@v1
- name: Checkout gh-pages
if: ${{ matrix.doxygen == 'ON' }}
uses: actions/checkout@v2
with:
ref: 'gh-pages'
path: 'html'
- name: update and commit to gh-pages branch
if: ${{ matrix.doxygen == 'ON' }}
working-directory: html
run: |
rm -rf doxygen
mv ../build/html doxygen
git config --global user.name "Automatic Deployment (GitHub Action)";
git config --global user.email "[email protected]"
git add --all
git diff --quiet HEAD || git commit -m "Documentation Update"
if [[ "${GITHUB_REF}" == 'refs/heads/master' ]]; then
git push
else
git show
fi