-
-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (54 loc) · 1.72 KB
/
sanitizer.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
name: 'Sanitizer'
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
schedule:
- cron: '0 0 * * */5'
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
sanitizer:
- name: 'Address'
cpp_flags: '-g -O0 -fsanitize=address'
run_flags: 'ASAN_OPTIONS=verbosity=2:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1'
- name: 'Leak'
cpp_flags: '-g -O0 -fsanitize=leak'
run_flags: 'LSAN_OPTIONS=verbosity=2'
- name: 'Thread'
cpp_flags: '-g -O0 -fsanitize=thread'
run_flags: 'TSAN_OPTIONS=verbosity=2'
- name: 'Undefined'
cpp_flags: '-g -O0 -fsanitize=undefined'
run_flags: 'UBSAN_OPTIONS=verbosity=2'
name: '${{ matrix.sanitizer.name }}'
runs-on: ubuntu-latest
env:
CXXFLAGS: '${{ matrix.sanitizer.cpp_flags }}'
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- name: 'Checkout'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 'Install'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt upgrade
sudo apt install g++-13
- name: 'Configure'
env:
CXX: 'g++-13'
CC: 'gcc-13'
run: cmake -S . -B 'build'
- name: 'Build'
run: cmake --build 'build' --verbose --parallel 4
- name: 'Test'
run: ${{ matrix.sanitizer.run_flags }} ctest --test-dir 'build' --tests-regex 'kalman_(test|sample)' --verbose --parallel 4