From 90c3a41bde378f7b7ff2189583e189dea825215f Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 7 Oct 2025 16:42:14 +0200 Subject: [PATCH 1/3] Run Clang sanitisers in Debug and Release mode --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f9015f..58f8cf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,11 +60,14 @@ jobs: clang-sanitisers: name: "clang-sanitisers" runs-on: ubuntu-24.04 + strategy: + matrix: + type: [Debug, Release] steps: - uses: actions/checkout@v5 - name: CMake configure - run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined,alignment,array-bounds -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined,alignment,array-bounds + run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined,alignment,array-bounds -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined,alignment,array-bounds - name: CMake build run: cmake --build build --parallel --target run-unit-test From e9c0218695a2bd26449e7cac0ff596b94aece747 Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 7 Oct 2025 16:42:30 +0200 Subject: [PATCH 2/3] Run MSVC sanitisers in Debug and Release mode --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58f8cf2..406284b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,11 +75,14 @@ jobs: msvc-sanitisers: name: "msvc-sanitisers" runs-on: windows-latest + strategy: + matrix: + type: [Debug, Release] steps: - uses: actions/checkout@v5 - name: CMake configure - run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_CXX_FLAGS="/fsanitize=address /EHsc" + run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_CXX_FLAGS="/fsanitize=address /EHsc" - name: CMake build run: cmake --build build --parallel --target run-unit-test From 1c2959284703e701189ffa816f334027a69689b4 Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Tue, 7 Oct 2025 16:57:02 +0200 Subject: [PATCH 3/3] Add GCC sanitisers --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 406284b..3f11b28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,21 @@ jobs: - name: CMake build run: cmake --build build --parallel --target run-unit-test + gcc-sanitisers: + name: "gcc-sanitisers" + runs-on: ubuntu-24.04 + strategy: + matrix: + type: [Debug, Release] + steps: + - uses: actions/checkout@v5 + + - name: CMake configure + run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined,leak -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined,leak + + - name: CMake build + run: cmake --build build --parallel --target run-unit-test + msvc-sanitisers: name: "msvc-sanitisers" runs-on: windows-latest