From a79ee658fe57eddd6a255cdc6e019aa4dd847d7e Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Sun, 15 Nov 2026 17:57:39 -0800 Subject: [PATCH] Run macOS CI on Minerva for verified commits Each workflow starts with a route job that calls RISCfuture/ci-workflows minerva-route.yml at 1.1.0. It sends jobs to the Minerva self-hosted runner only for verified commits from RISCfuture and keeps the GitHub-hosted labels for forks, other actors and unverified commits. Every macOS job routes to the macOS 26 pool through the output matching its original label (macos-26): the documentation build, SwiftLint, Periphery, and the documentation deploy build. The package targets macOS 26 and no job runs a macOS 27 product, so nothing uses the macos-27 output. The build matrix routes only legs on Swift 6.4 or 6.4.2; the Swift 6.3 leg stays hosted because setup-swift needs sudo for other Swift versions. The Linux jobs are unchanged. No job calls the XCUITestKit reusable workflows. In the documentation deploy workflow, pages: write and id-token: write move from the workflow level to the deploy job that uses actions/deploy-pages. The routed build job gets contents: read only, as do the route jobs. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 13 ++++++++++--- .github/workflows/doc.yml | 14 +++++++++++--- .github/workflows/periphery.yml | 7 ++++++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5857845..3dce407 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,15 +11,20 @@ concurrency: cancel-in-progress: true jobs: + route: + uses: RISCfuture/ci-workflows/.github/workflows/minerva-route.yml@1.1.0 + permissions: + contents: read build: name: Build + needs: route strategy: fail-fast: false matrix: include: - os: macos-26 swift: "6.3" - runs-on: ${{ matrix.os }} + runs-on: ${{ (matrix.swift == '6.4' || matrix.swift == '6.4.2') && (matrix.os == 'macos-26' || matrix.os == 'macos-latest') && fromJSON(needs.route.outputs[matrix.os]) || matrix.os }} steps: - uses: actions/checkout@v7.0.1 - uses: SwiftyLab/setup-swift@v1.14.2 @@ -54,7 +59,8 @@ jobs: run: swift build -v documentation: name: Build Documentation - runs-on: macos-26 + needs: route + runs-on: ${{ fromJSON(needs.route.outputs.macos-26) }} steps: - uses: actions/checkout@v7.0.1 - uses: SwiftyLab/setup-swift@v1.14.2 @@ -76,7 +82,8 @@ jobs: --warnings-as-errors lint: name: Run SwiftLint - runs-on: macos-26 + needs: route + runs-on: ${{ fromJSON(needs.route.outputs.macos-26) }} steps: - uses: actions/checkout@v7.0.1 - name: Install SwiftLint diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index fd4b9d7..a90435b 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -7,17 +7,22 @@ on: permissions: contents: read - pages: write - id-token: write concurrency: group: pages cancel-in-progress: true jobs: + route: + uses: RISCfuture/ci-workflows/.github/workflows/minerva-route.yml@1.1.0 + permissions: + contents: read build: name: Generate Documentation - runs-on: macos-26 + needs: route + permissions: + contents: read + runs-on: ${{ fromJSON(needs.route.outputs.macos-26) }} steps: - uses: actions/checkout@v7.0.1 - uses: SwiftyLab/setup-swift@v1.14.2 @@ -68,6 +73,9 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build + permissions: + pages: write + id-token: write steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/periphery.yml b/.github/workflows/periphery.yml index cc1868d..4478386 100644 --- a/.github/workflows/periphery.yml +++ b/.github/workflows/periphery.yml @@ -4,8 +4,13 @@ on: branches: [main] pull_request: jobs: + route: + uses: RISCfuture/ci-workflows/.github/workflows/minerva-route.yml@1.1.0 + permissions: + contents: read periphery: - runs-on: macos-26 + needs: route + runs-on: ${{ fromJSON(needs.route.outputs.macos-26) }} steps: - uses: actions/checkout@v7.0.1 - uses: SwiftyLab/setup-swift@v1.14.2