What changed, and why it matters
This commit is a routine GitHub Actions CI optimization. It removes a separate 'runner selection' metadata job and instead directly decides whether to use fast internal (Warp) runners or standard GitHub-hosted runners based on the repository name. There is no security-relevant change to Bitcoin Core's code, build outputs, or secrets handling.
No security action needed. This is a CI infrastructure refactor with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change inlines runner selection into each CI job by replacing needs.runners.outputs.provider checks with direct github.repository == 'bitcoin/bitcoin' ternary expressions. It removes the runners job and the REPO_USE_WARP_RUNNERS environment variable. The logic remains functionally equivalent: the upstream bitcoin/bitcoin repo uses Warp runners, forks use GitHub-hosted runners. Cache provider parameters and a conditional file-clearing step are updated to match the new inline expressions.
Changed components
.github/workflows/ci.ymlInspect captured patch +18 / −39
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8eaa68ab..fa837b92 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,6 @@ concurrency:
env:
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error
- REPO_USE_WARP_RUNNERS: 'bitcoin/bitcoin' # Use warp runners for this repo, instead of falling back to the slow GHA runners
defaults:
run:
@@ -28,12 +27,16 @@ defaults:
shell: bash
jobs:
- runners:
- name: '[meta] determine runners'
- runs-on: ubuntu-slim
- outputs:
- provider: ${{ steps.runners.outputs.provider }}
+ test-each-commit:
+ name: 'test ancestor commits'
+ runs-on: ${{ github.repository == 'bitcoin/bitcoin' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
+ env:
+ TEST_RUNNER_PORT_MIN: "14000" # Use a larger port range to avoid colliding with other CI services.
+ if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
+ timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes.
steps:
+ - name: Determine fetch depth
+ run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
- &ANNOTATION_PR_NUMBER
name: Annotate with pull request number
# This annotation is machine-readable and can be used to assign a check
@@ -44,28 +47,6 @@ jobs:
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "::notice title=debug_pull_request_number_str::${{ github.event.number }}"
fi
- - id: runners
- run: |
- if [[ "${REPO_USE_WARP_RUNNERS}" == "${{ github.repository }}" ]]; then
- echo "provider=warp" >> "$GITHUB_OUTPUT"
- echo "::notice title=Runner Selection::Using Warp Runners"
- else
- echo "provider=gha" >> "$GITHUB_OUTPUT"
- echo "::notice title=Runner Selection::Using GitHub-hosted runners"
- fi
-
- test-each-commit:
- name: 'test ancestor commits'
- needs: runners
- runs-on: ${{ needs.runners.outputs.provider == 'warp' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
- env:
- TEST_RUNNER_PORT_MIN: "14000" # Use a larger port range to avoid colliding with other CI services.
- if: github.event_name == 'pull_request' && github.event.pull_request.commits != 1
- timeout-minutes: 360 # Use maximum time, see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes.
- steps:
- - name: Determine fetch depth
- run: echo "FETCH_DEPTH=$((${{ github.event.pull_request.commits }} + 2))" >> "$GITHUB_ENV"
- - *ANNOTATION_PR_NUMBER
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -324,8 +305,8 @@ jobs:
windows-cross:
name: 'Windows-cross to x86_64, ${{ matrix.crt }}'
- needs: [runners, record-frozen-commit]
- runs-on: ${{ needs.runners.outputs.provider == 'warp' && 'warp-ubuntu-latest-x64-4x' || 'ubuntu-latest' }}
+ needs: record-frozen-commit
+ runs-on: ${{ github.repository == 'bitcoin/bitcoin' && 'warp-ubuntu-latest-x64-4x' || 'ubuntu-latest' }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
strategy:
@@ -359,7 +340,7 @@ jobs:
id: restore-cache
uses: ./.github/actions/cache/restore
with:
- provider: ${{ needs.runners.outputs.provider }}
+ provider: ${{ github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha' }}
- name: Configure Docker
uses: ./.github/actions/configure-docker
@@ -370,7 +351,7 @@ jobs:
- name: Save caches
uses: ./.github/actions/cache/save
with:
- provider: ${{ needs.runners.outputs.provider }}
+ provider: ${{ github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha' }}
- name: Upload built executables
uses: actions/upload-artifact@v7
@@ -437,8 +418,7 @@ jobs:
ci-matrix:
name: ${{ matrix.name }}
- needs: runners
- runs-on: ${{ needs.runners.outputs.provider == 'warp' && matrix.warp-runner || matrix.fallback-runner }}
+ runs-on: ${{ github.repository == 'bitcoin/bitcoin' && matrix.warp-runner || matrix.fallback-runner }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
timeout-minutes: ${{ matrix.timeout-minutes }}
@@ -553,13 +533,13 @@ jobs:
id: restore-cache
uses: ./.github/actions/cache/restore
with:
- provider: ${{ matrix.provider || needs.runners.outputs.provider }}
+ provider: ${{ matrix.provider || (github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha') }}
- name: Configure Docker
uses: ./.github/actions/configure-docker
- name: Clear unnecessary files
- if: ${{ needs.runners.outputs.provider == 'gha' && true || false }} # Only needed on GHA runners
+ if: ${{ github.repository != 'bitcoin/bitcoin' || matrix.provider == 'gha' }} # Only needed on GHA runners
uses: ./.github/actions/clear-files
- name: Enable bpfcc script
@@ -579,12 +559,11 @@ jobs:
- name: Save caches
uses: ./.github/actions/cache/save
with:
- provider: ${{ matrix.provider || needs.runners.outputs.provider }}
+ provider: ${{ matrix.provider || (github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha') }}
lint:
name: 'lint'
- needs: runners
- runs-on: ${{ needs.runners.outputs.provider == 'warp' && 'warp-ubuntu-latest-x64-2x' || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'bitcoin/bitcoin' && 'warp-ubuntu-latest-x64-2x' || 'ubuntu-latest' }}
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
timeout-minutes: 20
env:
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.