-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (49 loc) · 1.53 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
on:
workflow_call:
jobs:
Test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
max-parallel: 2
fail-fast: true
matrix:
build-type: [Debug, Release]
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt update
sudo apt install libczmq-dev libmpich-dev
# From https://github.com/google/sanitizers/issues/1716
sudo sysctl -w vm.mmap_rnd_bits=28
- name: Configure CMake
run: |
c_compile_flags="-Wall -Wextra -Wpedantic -Werror"
san_flags=""
if [[ ${{ matrix.build-type }} == Debug ]]; then
echo "Enabling sanitizers"
san_flags="-DQV_SANITIZE=address"
fi
cmake \
-B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
-DCMAKE_C_FLAGS="$c_compile_flags" \
-DCMAKE_CXX_FLAGS="$c_compile_flags" \
$san_flags
- name: Build Code
run: |
cmake \
--build ${{github.workspace}}/build \
--config ${{matrix.build-type}} -j
- name: Run Core Tests
working-directory: ${{github.workspace}}/build
run: |
ctest -LE mpi -C ${{matrix.build-type}} --output-on-failure
- name: Run All Tests
working-directory: ${{github.workspace}}/build
if: ${{ matrix.build-type == 'Release' }}
run: ctest -C ${{matrix.build-type}} --output-on-failure
- name: Test Packaging
working-directory: ${{github.workspace}}/build
run: make package_source