Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

develroot / .github / workflows / mac-builds.yml

1.5 KiB · Raw · Log

name: Mac Builds

# macOS runners are few and shared by every Progmasoft repository, so macOS
# gets one job: the newest macOS on Apple Silicon,
# with AddressSanitizer and UndefinedBehaviorSanitizer. The other build
# systems, the C++ standards and ThreadSanitizer run on Linux and Windows.

on:
  push:
    branches: [devel]
  pull_request:

permissions:
  contents: read

env:
  CTEST_OUTPUT_ON_FAILURE: 1
  CTEST_NO_TESTS_ACTION: error

jobs:
  build:
    name: macOS 26, C++17, AddressSanitizer and UBSan
    runs-on: macos-26
    timeout-minutes: 60

    steps:
    - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
      with:
        persist-credentials: false

    - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
      with:
        python-version: '3.14'

    - name: Install what the extra tests import
      run: python -m pip install --require-hashes --requirement requirements-tests.txt

    - name: Configure with the sanitizers
      env:
        CXXFLAGS: -fsanitize=address,undefined
        LDFLAGS: -fsanitize=address,undefined
      run: |
        cmake --preset most-tests -GNinja \
              -DCMAKE_BUILD_TYPE=Debug \
              -DCMAKE_CXX_STANDARD=17 \
              -DCATCH3_BUILD_EXAMPLES=ON \
              -DCATCH3_BUILD_EXTRA_TESTS=ON \
              -DPython3_EXECUTABLE="$(command -v python)"

    - name: Build
      run: cmake --build build

    - name: Test
      run: ctest --test-dir build -j
      env:
        CATCH3_COVERAGE_REQUIRE_MAP: 1