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

ci(mac): run the macOS job nightly and by hand, never on pull requests

Hosted arm64 macOS runners went unacquired for whole days: since
2026-12-03 every run, on macos-26 and on macos-15 alike, waited about
20 minutes and was cancelled. Every pull request carried a red cross
that said nothing about the code. The user decided (2026-12-04) that
macOS jobs never run on pull requests or pushes in any Progmasoft
repository.

- mac-builds.yml no longer runs on push or pull_request.
- It runs on schedule at 01:23 UTC, only when devel got commits in
  the last 24 hours. A small Ubuntu job counts them through the API
  with the read-only token.
- It also runs by workflow_dispatch from the Actions tab.
- The job itself is unchanged: macOS 15, C++17, ASan and UBSan.
- It was never a required check, so branch protection does not change.

Checked with actionlint and zizmor (no findings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit
7b1de8045d7635fdcea13983f3f060ac41703c74
Author
Leitwolf11 ·
Parents
f06a1f0e25ea

Files · Download .tar.gz

Changes

 .github/workflows/mac-builds.yml | 41 ++++++++++++++++++++++++++++++----------
 1 file changed, 31 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/mac-builds.yml b/.github/workflows/mac-builds.yml
index 2c8c7282..a3995002 100644
--- a/.github/workflows/mac-builds.yml
+++ b/.github/workflows/mac-builds.yml
@@ -1,18 +1,19 @@
 name: Mac Builds
 
-# macOS runners are few and shared by every Progmasoft repository, so macOS
-# gets one job: macOS 15 on Apple Silicon,
-# with AddressSanitizer and UndefinedBehaviorSanitizer. The other build
-# systems, the C++ standards and ThreadSanitizer run on Linux and Windows.
+# macOS on Apple Silicon, with AddressSanitizer and UndefinedBehaviorSanitizer.
+# The other build systems, the C++ standards and ThreadSanitizer run on Linux
+# and Windows.
 #
-# Not macos-26: since 2026-12-03 its hosted pool has not taken a single job,
-# each run waits about 20 minutes and is cancelled, while macos-15 runs
-# Tazel's jobs as usual. Go back to it once the pool takes jobs again.
+# Never on pull requests or pushes (USER, 2026-12-04): hosted arm64 macOS
+# runners went unacquired for whole days, and every pull request waited about
+# 20 minutes for a job that was then cancelled. It runs every night when devel
+# got commits in the last day, and by hand from the Actions tab
+# (workflow_dispatch). It is not a required check.
 
 on:
-  push:
-    branches: [devel]
-  pull_request:
+  schedule:
+    - cron: '23 1 * * *'
+  workflow_dispatch:
 
 permissions:
   contents: read
@@ -22,8 +23,28 @@ env:
   CTEST_NO_TESTS_ACTION: error
 
 jobs:
+  changed:
+    name: Commits in the last day
+    if: github.event_name == 'schedule'
+    runs-on: ubuntu-26.04
+    timeout-minutes: 5
+    outputs:
+      any: ${{ steps.count.outputs.any }}
+    steps:
+      - id: count
+        env:
+          GH_TOKEN: ${{ github.token }}
+          REPOSITORY: ${{ github.repository }}
+          BRANCH: ${{ github.event.repository.default_branch }}
+        run: |
+          since=$(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ)
+          count=$(gh api "repos/$REPOSITORY/commits?sha=$BRANCH&since=$since&per_page=1" --jq length)
+          echo "any=$([ "$count" -gt 0 ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
+
   build:
     name: macOS 15, C++17, AddressSanitizer and UBSan
+    needs: changed
+    if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || needs.changed.outputs.any == 'true') }}
     runs-on: macos-15
     timeout-minutes: 60