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