Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMartin Hořeňovský2025-12-28 22:57:13 +0100
committerMartin Hořeňovský2026-01-03 14:30:07 +0100
commita50ac2f68117b805d94af4f760abaff10bf7092b (patch)
tree747e7cc3ca23f1d673bb4e02c50f17ada4e4d9cc
parentb81ef2aa2e76a432f2082d1788ea2e7304bfbecf (diff)
downloadcatch3-a50ac2f68117b805d94af4f760abaff10bf7092b.tar.gz
Add ASan and TSan builds on Mac
-rw-r--r--.github/workflows/mac-sanitizer-builds.yml43
1 files changed, 43 insertions, 0 deletions
diff --git a/.github/workflows/mac-sanitizer-builds.yml b/.github/workflows/mac-sanitizer-builds.yml
new file mode 100644
index 00000000..ca21aa0e
--- /dev/null
+++ b/.github/workflows/mac-sanitizer-builds.yml
@@ -0,0 +1,43 @@
+name: Mac Sanitizer Builds
+
+on: [push, pull_request]
+
+env:
+ CTEST_OUTPUT_ON_FAILURE: 1
+ CTEST_NO_TESTS_ACTION: error
+
+jobs:
+ build:
+ runs-on: ${{matrix.image}}
+ strategy:
+ fail-fast: false
+ matrix:
+ image: [macos-15, macos-15-intel]
+ build_type: [Debug]
+ std: [17]
+ sanitizer: [thread, address]
+ include:
+ - sanitizer: thread
+ preset: basic-tests
+ filter: -R ThreadSafetyTests
+ - sanitizer: address
+ preset: most-tests
+ filter:
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Configure
+
+ run: |
+ CFXXFLAGS=-fsanitize=${{matrix.sanitizer}},undefined
+ cmake --preset ${{matrix.preset}} -GNinja \
+ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
+ -DCMAKE_CXX_STANDARD=${{matrix.std}} \
+ -DCATCH_BUILD_EXTRA_TESTS=ON
+
+ - name: Build
+ run: cmake --build build
+
+ - name: Test
+ run: ctest --test-dir build ${{matrix.filter}}