-
Notifications
You must be signed in to change notification settings - Fork 24
63 lines (53 loc) · 1.61 KB
/
check_sanitizers.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
name: Sanitizers
on:
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run_sanitizers:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Sanitizer - address",
os: ubuntu-24.04,
sanitizer: "address",
cc: clang,
cxx: clang++,
}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: apt cache
uses: actions/cache@v4
with:
path: |
/var/cache/apt/
/var/lib/apt/
key: apt-${{ runner.os }}-dev-${{ hashFiles('**/install_deps_ubuntu.sh') }}
- name: Install dependencies
id: install_deps
run: scripts/install_deps_ubuntu.sh --dev
- name: Restore build caches
uses: actions/cache@v4
with:
path: ~/.ccache
key: ${{ github.job }}-${{ matrix.config.os}}-${{ matrix.config.cxx }}-${{ matrix.config.build_type }}
- name: Build
id: run_cmake
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
BUILD_TYPE: ${{ matrix.config.build_type }}
COVERAGE: OFF
SANITIZER_TYPE: ${{ matrix.config.sanitizer }}
run: cmake --preset debug -DSC_USE_SANITIZER=${{ matrix.config.sanitizer }} && cmake --build --preset debug
- name: Run tests
id: run_tests
run: cd build/Debug && ctest -C Debug -V