Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify sanitizer presets
Browse files Browse the repository at this point in the history
ChrisThrasher committed Sep 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 8d2fa03 commit 7812c18
Showing 2 changed files with 5 additions and 26 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -105,28 +105,21 @@ jobs:
uses: actions/checkout@v4

- name: Configure
run: cmake --preset clang-tools
run: cmake --preset dev -DCMAKE_CXX_COMPILER=clang++

- name: Tidy
run: cmake --build build --target tidy

sanitize:
name: ${{matrix.sanitizer.name}}
name: Sanitize
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
sanitizer:
- { name: ASan, preset: asan }
- { name: UBSan, preset: ubsan }

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure
run: cmake --preset ${{matrix.sanitizer.preset}}
run: cmake --preset sanitizers

- name: Build
run: cmake --build build
18 changes: 2 additions & 16 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -32,24 +32,10 @@
}
},
{
"name": "clang-tools",
"name": "sanitizers",
"inherits": "dev",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "asan",
"inherits": "clang-tools",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-fno-omit-frame-pointer -fsanitize=address"
}
},
{
"name": "ubsan",
"inherits": "clang-tools",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-fno-omit-frame-pointer -fno-sanitize-recover=all -fsanitize=undefined"
"CMAKE_CXX_FLAGS": "-fno-omit-frame-pointer -fsanitize=address -fno-sanitize-recover=all -fsanitize=undefined"
}
}
],

0 comments on commit 7812c18

Please sign in to comment.