1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-04-29 12:03:53 +00:00

Simplify macOS CI jobs

This commit is contained in:
Chris Thrasher 2025-04-26 18:54:31 -06:00
parent 4c93a595a1
commit c17d69f813
No known key found for this signature in database
GPG Key ID: 56FB686C9DFC8E2C
2 changed files with 12 additions and 68 deletions

View File

@ -1,43 +0,0 @@
name: Arm Mac builds
on: [push, pull_request]
jobs:
build:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
cxx:
- clang++
build_type: [Debug, Release]
std: [14, 17]
include:
- build_type: Debug
examples: ON
extra_tests: ON
steps:
- uses: actions/checkout@v4
- name: Configure build
working-directory: ${{runner.workspace}}
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
cmake -Bbuild -S$GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCATCH_DEVELOPMENT_BUILD=ON \
-DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \
-DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}}
- name: Build tests + lib
working-directory: ${{runner.workspace}}/build
run: make -j `sysctl -n hw.ncpu`
- name: Run tests
working-directory: ${{runner.workspace}}/build
run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu` --output-on-failure

View File

@ -1,47 +1,34 @@
name: Intel Mac builds name: Mac Builds
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
build: build:
# From macos-14 forward, the baseline "macos-X" image is Arm based, # From macos-14 forward, the baseline "macos-X" image is Arm based,
# and not Intel based. Thus this is the newest image we can use for # and not Intel based.
# Intel MacOS CI, and there don't seem to be any plans to keep providing runs-on: ${{matrix.image}}
# the Intel based images for free to OSS projects.
runs-on: macos-13
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
cxx: image: [macos-13, macos-14, macos-15]
- clang++
build_type: [Debug, Release] build_type: [Debug, Release]
std: [14, 17] std: [14, 17]
include:
- build_type: Debug
examples: ON
extra_tests: ON
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Configure build - name: Configure
working-directory: ${{runner.workspace}}
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: | run: |
cmake -Bbuild -S$GITHUB_WORKSPACE \ cmake -Bbuild -GNinja \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \ -DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \ -DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCATCH_DEVELOPMENT_BUILD=ON \ -DCATCH_DEVELOPMENT_BUILD=ON \
-DCATCH_BUILD_EXAMPLES=${{matrix.examples}} \ -DCATCH_BUILD_EXAMPLES=ON \
-DCATCH_BUILD_EXTRA_TESTS=${{matrix.examples}} -DCATCH_BUILD_EXTRA_TESTS=ON
- name: Build tests + lib - name: Build
working-directory: ${{runner.workspace}}/build run: cmake --build build
run: make -j `sysctl -n hw.ncpu`
- name: Run tests - name: Test
working-directory: ${{runner.workspace}}/build run: ctest --test-dir build -j --output-on-failure
run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu` --output-on-failure