From 1a9c43cd03316f526476d07710924333ee86cc40 Mon Sep 17 00:00:00 2001 From: Zach Vorhies Date: Sat, 21 Nov 2026 00:49:45 -0800 Subject: [PATCH] ci: route the Linux x86 Lint call to the forge pool through pool-select A selector job runs forge-ci/ci.yml's pool-select on forge-quick and picks the self-hosted Dell pool (repository variable FORGE_POOL_LABELS, Ubuntu 24.04 lane) when it has an idle matching runner and the event is trusted (push, workflow_dispatch, or a same-repository pull request). It reads the pool's tokenless status endpoint, so the repository holds no probe secret. _lint.yml takes the choice as a new optional pool-runs-on input and keeps runs-on for cache and artifact names. Fork pull requests, an unset variable and any selector error run hosted. Ci-Attestation: {"at":1795257075,"gate":"general/linux-x64/lint","host":"linux-x86_64","key":"f58788af9e849b79b399e3bc263d9e882f6416d662d2102d44e6d0fd13487e19","lane":"lint","parents":["a52f04360994f5870c6c4f0919c41869041b03b0"],"secs":4903,"stamp":"690e4da9862646d560da66a56bbac3d2","tree":"1691de269a3cc9237e979b97d79eb1ee20829216","v":1,"via":"run"} Ci-Attestation: {"at":1795289164,"gate":"python/linux-x64/test","host":"linux-x86_64","key":"cfecc5e03d2ff1c986d574cb791aab87bf3090791759f3f58803596c7d336826","lane":"test","parents":["a52f04360994f5870c6c4f0919c41869041b03b0"],"secs":234,"stamp":"f0e87ff5fb10cc0c2e2362274ad73768","tree":"8b3c3c6e5c1b022f098a13bbe8b82b9e1e1ac37b","v":1,"via":"run"} Ci-Attestation: {"at":1795257075,"gate":"rust/all/fmt","host":"linux-x86_64","key":"f58788af9e849b79b399e3bc263d9e882f6416d662d2102d44e6d0fd13487e19","lane":"lint","parents":["a52f04360994f5870c6c4f0919c41869041b03b0"],"secs":4903,"stamp":"c934c5fa91d0aa673dc99b7fee149a89","tree":"1691de269a3cc9237e979b97d79eb1ee20829216","v":1,"via":"run"} Ci-Attestation: {"at":1795257075,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"f58788af9e849b79b399e3bc263d9e882f6416d662d2102d44e6d0fd13487e19","lane":"lint","parents":["a52f04360994f5870c6c4f0919c41869041b03b0"],"secs":4903,"stamp":"0bf5b139481336096851ab78044a6e91","tree":"1691de269a3cc9237e979b97d79eb1ee20829216","v":1,"via":"run"} Ci-Attestation: {"at":1795257075,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"f58788af9e849b79b399e3bc263d9e882f6416d662d2102d44e6d0fd13487e19","lane":"lint","parents":["a52f04360994f5870c6c4f0919c41869041b03b0"],"secs":4903,"stamp":"6d822fb6f6fe1f4bc921b72ce526cd14","tree":"1691de269a3cc9237e979b97d79eb1ee20829216","v":1,"via":"run"} Ci-Attestation: {"at":1795289164,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"cfecc5e03d2ff1c986d574cb791aab87bf3090791759f3f58803596c7d336826","lane":"test","parents":["a52f04360994f5870c6c4f0919c41869041b03b0"],"secs":234,"stamp":"dbfc10c81b06403452800150bae56c8d","tree":"8b3c3c6e5c1b022f098a13bbe8b82b9e1e1ac37b","v":1,"via":"run"} --- .github/workflows/_lint.yml | 8 ++++++- .github/workflows/linux-x86-lint.yml | 36 +++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_lint.yml b/.github/workflows/_lint.yml index efb14692..f72ff8ca 100644 --- a/.github/workflows/_lint.yml +++ b/.github/workflows/_lint.yml @@ -10,6 +10,12 @@ on: runs-on: required: true type: string + # JSON runs-on chosen by a caller's forge-pool selector (pool-select). + # Empty keeps `runs-on`, which still names caches and artifacts. + pool-runs-on: + required: false + type: string + default: "" run-dylint: required: false type: boolean @@ -17,7 +23,7 @@ on: jobs: lint: - runs-on: ${{ inputs.runs-on }} + runs-on: ${{ inputs.pool-runs-on != '' && fromJSON(inputs.pool-runs-on) || inputs.runs-on }} timeout-minutes: 30 env: SOLDR_FORCE_MANAGED_CARGO_SUBCOMMANDS: "1" diff --git a/.github/workflows/linux-x86-lint.yml b/.github/workflows/linux-x86-lint.yml index 3e65c119..bd79928f 100644 --- a/.github/workflows/linux-x86-lint.yml +++ b/.github/workflows/linux-x86-lint.yml @@ -19,6 +19,37 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: + # Runner selection for the Lint call. pool-select (forge-ci/ci.yml + # actions/pool-select) reads the forge pool's tokenless status endpoint and + # answers with the repository variable FORGE_POOL_LABELS (the self-hosted + # Dell pool, Ubuntu 24.04 image) when the pool has an idle matching runner + # and the event is trusted: push, workflow_dispatch, or a pull request from + # this repository. Fork pull requests, an unset variable, or any error give + # ubuntu-24.04. The selector itself runs on forge-quick + # (vars.FORGE_QUICK_LABELS), never for a fork pull request. Unset either + # variable to fall back to hosted. + pool: + name: Select runner + if: >- + vars.FORGE_POOL_LABELS != '' + && (github.event_name == 'push' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' + && github.event.pull_request.head.repo.full_name == github.repository)) + runs-on: ${{ vars.FORGE_QUICK_LABELS != '' && fromJSON(vars.FORGE_QUICK_LABELS) || 'ubuntu-latest' }} + timeout-minutes: 2 + permissions: {} + outputs: + runs-on: ${{ steps.select.outputs.runs-on || '"ubuntu-24.04"' }} + steps: + - name: Select pool or hosted + id: select + continue-on-error: true + uses: forge-ci/ci.yml/actions/pool-select@a36bc81ad6ada5fb17398e3e7ba38435cc67a951 + with: + labels: ${{ vars.FORGE_POOL_LABELS }} + fallback: ubuntu-24.04 + verify: name: Verify local attestations if: >- @@ -49,12 +80,15 @@ jobs: call: name: Lint (format, Clippy, Dylint) - needs: verify + needs: [verify, pool] if: ${{ !cancelled() && needs.verify.outputs.skip_call != 'true' }} uses: ./.github/workflows/_lint.yml with: source-sha: ${{ github.event_name == 'workflow_dispatch' && inputs.candidate_sha || github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} runs-on: ubuntu-24.04 + # Only a selector that ran has an answer (act passes a skipped job's + # outputs on unevaluated); otherwise runs-on above applies. + pool-runs-on: ${{ needs.pool.result == 'success' && needs.pool.outputs.runs-on || '' }} run-dylint: true unit: