forked from simongog/sdsl-lite
-
Notifications
You must be signed in to change notification settings - Fork 18
70 lines (60 loc) · 1.96 KB
/
ci_asan.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
name: ASAN
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:
concurrency:
group: asan-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'push' }}
env:
TZ: Europe/Berlin
defaults:
run:
shell: bash -Eexuo pipefail {0}
jobs:
build:
runs-on: ubuntu-latest
name: ${{ matrix.compiler }} ${{ matrix.cereal == '1' && 'cereal' || '' }}
if: github.repository_owner == 'xxsds' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
compiler: ["clang-18", "gcc-14"]
cereal: ["0", "1"]
container:
image: ghcr.io/seqan/${{ matrix.compiler }}
volumes:
- /home/runner:/home/runner
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Get number of processors
run: echo "NUM_THREADS=$(getconf _NPROCESSORS_ONLN)" >> "$GITHUB_ENV"
- name: Load ccache
uses: actions/cache@v4
with:
path: /home/runner/.ccache
save-always: true
key: ccache-${{ runner.os }}-${{ github.workflow }}-${{ matrix.compiler }}-${{ github.ref }}
- name: Configure tests
run: |
mkdir bbuild && cd bbuild
cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-pedantic -Wall -Wextra -Werror -std=c++23 -fsanitize=address" \
-DSDSL_CEREAL=${{ matrix.cereal }}
make -j${NUM_THREADS} gtest_build
- name: Build tests
working-directory: bbuild
run: |
ccache -z
make -k -j${NUM_THREADS} sdsl_test_targets sdsl_examples sdsl_tutorials
ccache -sv
- name: Run tests
working-directory: bbuild
run: ctest . -j${NUM_THREADS} --output-on-failure -E 'faust|moby' -R '-im'