-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (79 loc) · 3.12 KB
/
build.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
name: C/C++ CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: "ghcr.io/kamping-site/kamping-ci:2024.2"
continue-on-error: true
strategy:
matrix:
compiler:
- { name: Clang, cc: clang, cxx: clang++}
- { name: GNU, cc: gcc, cxx: g++}
build-mode: [Debug, Release]
# Exception mode has no influence on how tests are run. This only affects the examples.
exception-mode: [ON]
assertion-level: ["heavy"]
run-tests: [OFF]
include:
- compiler: { name: GNU, cc: gcc, cxx: g++}
build-mode: Debug
# Exception mode has no influence on how tests are run. This only affects the examples.
exception-mode: OFF
# Assertion level is ignored in KASSERT-Tests. This is to ensure that other tests don't rely on side effects in assertions.
assertion-level: "none"
run-tests: ON
- compiler: { name: GNU, cc: gcc, cxx: g++}
build-mode: Debug
# Exception mode has no influence on how tests are run. This only affects the examples.
exception-mode: ON
assertion-level: "heavy"
run-tests: ON
- compiler: { name: Clang, cc: clang, cxx: clang++}
build-mode: Release
# Exception mode has no influence on how tests are run. This only affects the examples.
exception-mode: ON
assertion-level: "heavy"
run-tests: ON
exclude:
- compiler: { name: GNU, cc: gcc, cxx: g++}
build-mode: Debug
exception-mode: ON
assertion-level: "heavy"
run-tests: OFF
- compiler: { name: Clang, cc: clang, cxx: clang++}
build-mode: Release
exception-mode: ON
assertion-level: "heavy"
run-tests: OFF
steps:
- uses: actions/[email protected]
with:
submodules: 'recursive'
- name: export-compiler
run: |
echo CXX=${{ matrix.compiler.cxx }} >> $GITHUB_ENV
echo CC=${{ matrix.compiler.cc }} >> $GITHUB_ENV
echo OMPI_CXX=${{ matrix.compiler.cxx }} >> $GITHUB_ENV
echo OMPI_CC=${{ matrix.compiler.cc }} >> $GITHUB_ENV
- name: print-mpirun-version
run: mpirun --version
- name: print-mpicxx-flags
run: mpicxx -show
- name: cmake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build-mode }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} -DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} -DKAMPING_WARNINGS_ARE_ERRORS=ON -DKAMPING_EXCEPTION_MODE=${{ matrix.exception-mode }} -DKAMPING_ASSERTION_LEVEL=${{ matrix.assertion-level }} -DKAMPING_TESTS_DISCOVER=OFF -DKAMPING_TEST_ENABLE_SANITIZERS=ON -DKAMPING_TEST_TIMEOUT=40
- name: build
run: cmake --build build/ --parallel 16
- name: Allow-running-mpi
run: |
echo OMPI_ALLOW_RUN_AS_ROOT=1 >> $GITHUB_ENV
echo OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 >> $GITHUB_ENV
- name: run tests
if: matrix.run-tests == 'ON'
run: make -C build/ check