From 793ae706a0d8bec0a68f1d5b255fa32432d51eb0 Mon Sep 17 00:00:00 2001 From: Tim Morgan Date: Sun, 15 Nov 2026 17:58:10 -0800 Subject: [PATCH] Run macOS CI on Minerva for verified commits Each workflow with macOS jobs starts with a route job from RISCfuture/ci-workflows 1.1.0 (minerva-route.yml). It sends jobs to the self-hosted Minerva runner only for verified commits from RISCfuture and keeps the hosted labels for forks, other actors and unverified commits. Every macOS job uses the macOS 26 pool through the route output that matches its original label: the documentation builds in ci.yml and doc.yml, Periphery, and the macOS Swift 6.4 leg of the build and test matrix, which runs on macOS 26 for the package's macOS 26 deployment target. No job needs the macos-27 output, and no job calls an XCUITestKit workflow. The macOS Swift 6.2 matrix leg stays on its hosted label because setup-swift needs sudo for that toolchain, which Minerva does not allow. Linux jobs are unchanged. In doc.yml the workflow grants only contents: read. The build job has contents: read, and the deploy job holds pages: write and id-token: write for actions/deploy-pages. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 11 +++++++++-- .github/workflows/doc.yml | 14 +++++++++++--- .github/workflows/periphery.yml | 7 ++++++- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3778d62..44d2349 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,10 @@ concurrency: cancel-in-progress: true jobs: + route: + uses: RISCfuture/ci-workflows/.github/workflows/minerva-route.yml@1.1.0 + permissions: + contents: read tests: name: Build and Test strategy: @@ -25,7 +29,9 @@ jobs: swift: "6.3" - os: ubuntu-latest swift: "6.4" - runs-on: ${{ matrix.os }} + needs: route + # setup-swift needs sudo for Swift 6.2, so that leg stays hosted. + runs-on: ${{ (matrix.os == 'macos-26' || matrix.os == 'macos-latest') && matrix.swift == '6.4' && fromJSON(needs.route.outputs[matrix.os]) || matrix.os }} steps: - uses: actions/checkout@v7.0.1 - uses: SwiftyLab/setup-swift@v1.14.2 @@ -45,7 +51,8 @@ jobs: run: swift test -v docs: 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 diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index a186b21..0adce60 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -7,19 +7,24 @@ 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: Build Documentation # CoreLocation symbols live behind #if canImport(CoreLocation), so the # published documentation is built on macOS to include them. - runs-on: macos-26 + needs: route + runs-on: ${{ fromJSON(needs.route.outputs.macos-26) }} + permissions: + contents: read steps: - uses: actions/checkout@v7.0.1 - uses: SwiftyLab/setup-swift@v1.14.2 @@ -53,6 +58,9 @@ jobs: name: Deploy to GitHub Pages needs: build runs-on: ubuntu-latest + permissions: + pages: write + id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} diff --git a/.github/workflows/periphery.yml b/.github/workflows/periphery.yml index b911dbe..8f091df 100644 --- a/.github/workflows/periphery.yml +++ b/.github/workflows/periphery.yml @@ -6,9 +6,14 @@ on: pull_request: jobs: + route: + uses: RISCfuture/ci-workflows/.github/workflows/minerva-route.yml@1.1.0 + permissions: + contents: read periphery: name: Run Periphery - runs-on: macos-26 + needs: route + runs-on: ${{ fromJSON(needs.route.outputs.macos-26) }} if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository permissions: contents: read