Skip to content

Commit

Permalink
Unify sanitizer presets
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Sep 29, 2024
1 parent 8d2fa03 commit 14b4d50
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
18 changes: 2 additions & 16 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 -fno-sanitize-recover=all -fsanitize=address,undefined"
}
}
],
Expand Down

0 comments on commit 14b4d50

Please sign in to comment.