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

Simplify macOS CI jobs

Commit
c17d69f813fb0f11ea410c2dd62894bcbbbd2018
Author
Chris Thrasher ·
Parents
4c93a595a1d9

Files · Download .tar.gz

Changes

 .github/workflows/mac-builds-m1.yml | 43 -------------------------------------
 .github/workflows/mac-builds.yml    | 37 +++++++++++--------------------
 2 files changed, 12 insertions(+), 68 deletions(-)

diff --git a/.github/workflows/mac-builds-m1.yml b/.github/workflows/mac-builds-m1.yml
deleted file mode 100644
index f65e6c76..00000000
--- a/.github/workflows/mac-builds-m1.yml
+++ /dev/null
@@ -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
diff --git a/.github/workflows/mac-builds.yml b/.github/workflows/mac-builds.yml
index 9c4183e3..05429a0e 100644
--- a/.github/workflows/mac-builds.yml
+++ b/.github/workflows/mac-builds.yml
@@ -1,47 +1,34 @@
-name: Intel Mac builds
+name: Mac Builds
 
 on: [push, pull_request]
 
 jobs:
   build:
     # 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
-    # Intel MacOS CI, and there don't seem to be any plans to keep providing
-    # the Intel based images for free to OSS projects.
-    runs-on: macos-13
+    # and not Intel based.
+    runs-on: ${{matrix.image}}
     strategy:
       fail-fast: false
       matrix:
-        cxx:
-          - clang++
+        image: [macos-13, macos-14, macos-15]
         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}}
+    - name: Configure
       run: |
-        cmake -Bbuild -S$GITHUB_WORKSPACE \
+        cmake -Bbuild -GNinja \
               -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}}
+              -DCATCH_BUILD_EXAMPLES=ON \
+              -DCATCH_BUILD_EXTRA_TESTS=ON
 
-    - name: Build tests + lib
-      working-directory: ${{runner.workspace}}/build
-      run: make -j `sysctl -n hw.ncpu`
+    - name: Build
+      run: cmake --build build
 
-    - name: Run tests
-      working-directory: ${{runner.workspace}}/build
-      run: ctest -C ${{matrix.build_type}} -j `sysctl -n hw.ncpu` --output-on-failure
+    - name: Test
+      run: ctest --test-dir build -j --output-on-failure