ci: inline runner selection #35441

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:drop-determine-runners changing 1 files +18 −39
  1. willcl-ark commented at 11:38 AM on June 2, 2026: member

    We are currently sometimes backlogged on waiting for runner selection.

    Selecting Warp or GitHub-hosted runners directly from the repository context avoids serializing all CI jobs behind a metadata job. This keeps forks on public runners while allowing upstream jobs to schedule immediately on the intended runner labels.

    This will make the changes needed for "a fork also wanting to use warp runners" slightly larger, but I think that number of people is zero.

  2. ci: inline runner selection
    We are currently sometimes backlogged on waiting for runner selection.
    
    Selecting Warp or GitHub-hosted runners directly from the repository context avoids serializing all CI jobs behind a metadata job. This keeps forks on public runners while allowing upstream jobs to schedule immediately on the intended runner labels.
    726e196ef2
  3. DrahtBot added the label Tests on Jun 2, 2026
  4. DrahtBot commented at 11:38 AM on June 2, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35441.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #33593 (guix: Use UCRT runtime for Windows release binaries by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. willcl-ark commented at 11:40 AM on June 2, 2026: member

    Another option is to drop support for fork runs. I personally find this to be an annoyance in general and don't see why we should support it with so much spaghetti in ci.yml. But I would open a discussion before proposing that.

  6. maflcko commented at 11:54 AM on June 2, 2026: member

    Another option is to drop support for fork runs. I personally find this to be an annoyance in general and don't see why we should support it with so much spaghetti in ci.yml. But I would open a discussion before proposing that.

    Seems fine, too. Though, it would be nice to have a one-line (?) scripted diff to still support that somewhat. E.g. sed --regexp-extended --in-place 's/warp-(ubuntu-([^-]+))-x64-.x/\1/g' .github/workflows/ci.yml

  7. willcl-ark marked this as ready for review on Jun 2, 2026
  8. willcl-ark commented at 12:43 PM on June 2, 2026: member

    Though, it would be nice to have a one-line (?) scripted diff to still support that somewhat. E.g. sed --regexp-extended --in-place 's/warp-(ubuntu-([^-]+))-x64-.x/\1/g' .github/workflows/ci.yml

    I'm not sure how well this would work with a full simplification. For example one might propose something like the following simplification:

    <details> <summary>Diff</summary>

    diff --git a/.github/actions/cache/restore/action.yml b/.github/actions/cache/restore/action.yml
    index 2cc5b53a1e1..3f2d3bfe1a1 100644
    --- a/.github/actions/cache/restore/action.yml
    +++ b/.github/actions/cache/restore/action.yml
    @@ -9,43 +9,39 @@ runs:
       steps:
         - name: Restore Ccache cache
           id: ccache-cache
    -      uses: ./.github/actions/cache/restore/internal
    +      uses: WarpBuilds/cache/restore@v1
           with:
             path: ${{ env.CCACHE_DIR }}
             key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
             restore-keys: |
               ccache-${{ env.CONTAINER_NAME }}-
    -        provider: ${{ inputs.provider }}
     
         - name: Restore depends sources cache
           id: depends-sources
    -      uses: ./.github/actions/cache/restore/internal
    +      uses: WarpBuilds/cache/restore@v1
           with:
             path: ${{ env.SOURCES_PATH }}
             key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
             restore-keys: |
               depends-sources-${{ env.CONTAINER_NAME }}-
    -        provider: ${{ inputs.provider }}
     
         - name: Restore built depends cache
           id: depends-built
    -      uses: ./.github/actions/cache/restore/internal
    +      uses: WarpBuilds/cache/restore@v1
           with:
             path: ${{ env.BASE_CACHE }}
             key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
             restore-keys: |
               depends-built-${{ env.CONTAINER_NAME }}-
    -        provider: ${{ inputs.provider }}
     
         - name: Restore previous releases cache
           id: previous-releases
    -      uses: ./.github/actions/cache/restore/internal
    +      uses: WarpBuilds/cache/restore@v1
           with:
             path: ${{ env.PREVIOUS_RELEASES_DIR }}
             key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}
             restore-keys: |
               previous-releases-${{ env.CONTAINER_NAME }}-
    -        provider: ${{ inputs.provider }}
     
         - name: export cache hits
           shell: bash
    diff --git a/.github/actions/cache/restore/internal/action.yml b/.github/actions/cache/restore/internal/action.yml
    deleted file mode 100644
    index 43dd206345d..00000000000
    --- a/.github/actions/cache/restore/internal/action.yml
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -name: 'Cache Restore'
    -description: 'Restore a cache with WarpBuild on Warp runners and GitHub Actions cache otherwise'
    -inputs:
    -  path:
    -    description: 'A list of files, directories, and wildcard patterns to restore'
    -    required: true
    -  key:
    -    description: 'An explicit key for restoring the cache'
    -    required: true
    -  restore-keys:
    -    description: 'An ordered multiline string listing prefix-matched restore keys'
    -    required: false
    -    default: ''
    -  provider:
    -    description: 'The cache provider to use'
    -    required: true
    -outputs:
    -  cache-hit:
    -    description: 'A boolean value to indicate an exact match was found for the primary key'
    -    value: ${{ steps.warp.outputs.cache-hit || steps.gha.outputs.cache-hit }}
    -  cache-primary-key:
    -    description: 'The primary key used to restore the cache'
    -    value: ${{ steps.warp.outputs.cache-primary-key || steps.gha.outputs.cache-primary-key }}
    -runs:
    -  using: 'composite'
    -  steps:
    -    - name: Restore cache with WarpBuild
    -      id: warp
    -      if: ${{ inputs.provider == 'warp' }}
    -      uses: WarpBuilds/cache/restore@v1
    -      with:
    -        path: ${{ inputs.path }}
    -        key: ${{ inputs.key }}
    -        restore-keys: ${{ inputs.restore-keys }}
    -
    -    - name: Restore cache with GitHub Actions
    -      id: gha
    -      if: ${{ inputs.provider == 'gha' }}
    -      uses: actions/cache/restore@v5
    -      with:
    -        path: ${{ inputs.path }}
    -        key: ${{ inputs.key }}
    -        restore-keys: ${{ inputs.restore-keys }}
    diff --git a/.github/actions/cache/save/action.yml b/.github/actions/cache/save/action.yml
    index 5c543b3f9e7..f2d3c90e2f6 100644
    --- a/.github/actions/cache/save/action.yml
    +++ b/.github/actions/cache/save/action.yml
    @@ -1,9 +1,5 @@
     name: 'Save Caches'
     description: 'Save ccache, depends sources, and built depends caches'
    -inputs:
    -  provider:
    -    description: 'The cache provider to use'
    -    required: true
     runs:
       using: 'composite'
       steps:
    @@ -15,33 +11,29 @@ runs:
             echo "previous releases direct cache hit to primary key: ${{ env.previous-releases-cache-hit }}"
     
         - name: Save Ccache cache
    -      uses: ./.github/actions/cache/save/internal
    +      uses: WarpBuilds/cache/save@v1
           if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) }}
           with:
             path: ${{ env.CCACHE_DIR }}
             key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
    -        provider: ${{ inputs.provider }}
     
         - name: Save depends sources cache
    -      uses: ./.github/actions/cache/save/internal
    +      uses: WarpBuilds/cache/save@v1
           if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-sources-cache-hit != 'true') }}
           with:
             path: ${{ env.SOURCES_PATH }}
             key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
    -        provider: ${{ inputs.provider }}
     
         - name: Save built depends cache
    -      uses: ./.github/actions/cache/save/internal
    +      uses: WarpBuilds/cache/save@v1
           if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-built-cache-hit != 'true' )}}
           with:
             path: ${{ env.BASE_CACHE }}
             key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
    -        provider: ${{ inputs.provider }}
     
         - name: Save previous releases cache
    -      uses: ./.github/actions/cache/save/internal
    +      uses: WarpBuilds/cache/save@v1
           if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.previous-releases-cache-hit != 'true' )}}
           with:
             path: ${{ env.PREVIOUS_RELEASES_DIR }}
             key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}
    -        provider: ${{ inputs.provider }}
    diff --git a/.github/actions/cache/save/internal/action.yml b/.github/actions/cache/save/internal/action.yml
    deleted file mode 100644
    index 12f4156a072..00000000000
    --- a/.github/actions/cache/save/internal/action.yml
    +++ /dev/null
    @@ -1,28 +0,0 @@
    -name: 'Cache Save'
    -description: 'Save a cache with WarpBuild on Warp runners and GitHub Actions cache otherwise'
    -inputs:
    -  path:
    -    description: 'A list of files, directories, and wildcard patterns to cache'
    -    required: true
    -  key:
    -    description: 'An explicit key for saving the cache'
    -    required: true
    -  provider:
    -    description: 'The cache provider to use'
    -    required: true
    -runs:
    -  using: 'composite'
    -  steps:
    -    - name: Save cache with WarpBuild
    -      if: ${{ inputs.provider == 'warp' }}
    -      uses: WarpBuilds/cache/save@v1
    -      with:
    -        path: ${{ inputs.path }}
    -        key: ${{ inputs.key }}
    -
    -    - name: Save cache with GitHub Actions
    -      if: ${{ inputs.provider == 'gha' }}
    -      uses: actions/cache/save@v5
    -      with:
    -        path: ${{ inputs.path }}
    -        key: ${{ inputs.key }}
    diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
    index fa837b928c8..82fec71dc6e 100644
    --- a/.github/workflows/ci.yml
    +++ b/.github/workflows/ci.yml
    @@ -29,7 +29,7 @@ defaults:
     jobs:
       test-each-commit:
         name: 'test ancestor commits'
    -    runs-on: ${{ github.repository == 'bitcoin/bitcoin' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
    +    runs-on: warp-ubuntu-latest-x64-8x
         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
    @@ -306,7 +306,7 @@ jobs:
       windows-cross:
         name: 'Windows-cross to x86_64, ${{ matrix.crt }}'
         needs: record-frozen-commit
    -    runs-on: ${{ github.repository == 'bitcoin/bitcoin' && 'warp-ubuntu-latest-x64-4x' || 'ubuntu-latest' }}
    +    runs-on: warp-ubuntu-latest-x64-4x
         if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
     
         strategy:
    @@ -339,8 +339,6 @@ jobs:
           - name: Restore caches
             id: restore-cache
             uses: ./.github/actions/cache/restore
    -        with:
    -          provider: ${{ github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha' }}
     
           - name: Configure Docker
             uses: ./.github/actions/configure-docker
    @@ -350,8 +348,6 @@ jobs:
     
           - name: Save caches
             uses: ./.github/actions/cache/save
    -        with:
    -          provider: ${{ github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha' }}
     
           - name: Upload built executables
             uses: actions/upload-artifact@v7
    @@ -418,7 +414,7 @@ jobs:
     
       ci-matrix:
         name: ${{ matrix.name }}
    -    runs-on: ${{ github.repository == 'bitcoin/bitcoin' && matrix.warp-runner || matrix.fallback-runner }}
    +    runs-on: ${{ matrix.runner }}
         if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
         timeout-minutes: ${{ matrix.timeout-minutes }}
     
    @@ -431,93 +427,78 @@ jobs:
           matrix:
             include:
               - name: 'iwyu'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_iwyu.sh'
     
               - name: '32 bit ARM'
    -            warp-runner: 'ubuntu-24.04-arm' # Warp's Arm runners don't support 32-bit mode currently
    -            fallback-runner: 'ubuntu-24.04-arm'
    +            runner: 'ubuntu-24.04-arm' # Warp's Arm runners don't support 32-bit mode currently
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_arm.sh'
                 provider: 'gha'
     
               - name: 'ASan + LSan + UBSan + integer'
    -            warp-runner: 'warp-ubuntu-2404-x64-8x' # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
    -            fallback-runner: 'ubuntu-24.04'
    +            runner: 'warp-ubuntu-2404-x64-8x' # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_asan.sh'
     
               - name: 'macOS-cross to arm64'
    -            warp-runner: 'warp-ubuntu-latest-x64-4x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-4x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_mac_cross.sh'
     
               - name: 'macOS-cross to x86_64'
    -            warp-runner: 'warp-ubuntu-latest-x64-4x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-4x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_mac_cross_intel.sh'
     
               - name: 'FreeBSD Cross'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_freebsd_cross.sh'
     
               - name: 'No wallet'
    -            warp-runner: 'warp-ubuntu-latest-x64-4x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-4x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_nowallet.sh'
     
               - name: 'i686, no IPC'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_i686_no_ipc.sh'
     
               - name: 'fuzzer,address,undefined,integer'
    -            warp-runner: 'warp-ubuntu-latest-x64-16x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-16x'
                 timeout-minutes: 240
                 file-env: './ci/test/00_setup_env_native_fuzz.sh'
     
               - name: 'previous releases'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_previous_releases.sh'
     
               - name: 'Alpine (musl)'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_alpine_musl.sh'
     
               - name: 'tidy'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_tidy.sh'
     
               - name: 'TSan'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_tsan.sh'
     
               - name: 'MSan, fuzz'
    -            warp-runner: 'warp-ubuntu-latest-x64-8x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-8x'
                 timeout-minutes: 150
                 file-env: './ci/test/00_setup_env_native_fuzz_with_msan.sh'
     
               - name: 'MSan'
    -            warp-runner: 'warp-ubuntu-latest-x64-16x'
    -            fallback-runner: 'ubuntu-latest'
    +            runner: 'warp-ubuntu-latest-x64-16x'
                 timeout-minutes: 120
                 file-env: './ci/test/00_setup_env_native_msan.sh'
     
    @@ -532,14 +513,12 @@ jobs:
           - name: Restore caches
             id: restore-cache
             uses: ./.github/actions/cache/restore
    -        with:
    -          provider: ${{ matrix.provider || (github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha') }}
     
           - name: Configure Docker
             uses: ./.github/actions/configure-docker
     
           - name: Clear unnecessary files
    -        if: ${{ github.repository != 'bitcoin/bitcoin' || matrix.provider == 'gha' }} # Only needed on GHA runners
    +        if: ${{ matrix.provider == 'gha' }} # Only needed on GHA runners
             uses: ./.github/actions/clear-files
     
           - name: Enable bpfcc script
    @@ -558,12 +537,10 @@ jobs:
     
           - name: Save caches
             uses: ./.github/actions/cache/save
    -        with:
    -          provider: ${{ matrix.provider || (github.repository == 'bitcoin/bitcoin' && 'warp' || 'gha') }}
     
       lint:
         name: 'lint'
    -    runs-on: ${{ github.repository == 'bitcoin/bitcoin' && 'warp-ubuntu-latest-x64-2x' || 'ubuntu-latest' }}
    +    runs-on: warp-ubuntu-latest-x64-2x
         if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
         timeout-minutes: 20
         env:
    

    </details>

    None of the caching would work on forks, although I don't know if that's a hard or soft failure. Might still be fine...

  9. maflcko commented at 12:52 PM on June 2, 2026: member

    None of the caching would work on forks, although I don't know if that's a hard or soft failure. Might still be fine...

    I'd be fine with a soft fallback to no caching. Though, when the option is fully removed to run the CI on GHA at all, it could be harder to run one-off CI-only tests while sharing the logs. The only alternative could be to run manually locally and share the logs manually or via CDash.

    Also, it could be harder for low-frequency forks or low-frequency mono-repos to run the CI.

  10. willcl-ark commented at 9:55 AM on June 4, 2026: member

    Another example this morning: we have many runs who are blocks on GH runner selection job:

    <img width="2062" height="1519" alt="image" src="https://github.com/user-attachments/assets/a15abdce-7e6c-4438-b1dc-2ade9f8e8e80" />

  11. willcl-ark commented at 10:19 AM on June 4, 2026: member

    FWIW another approach here is to use a repo-level env var https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#vars-context

    these are the vars set in the repo UI, not in the CI yml file.

    Available contexts are

    jobs.<job_id>.runs-on	github, needs, strategy, matrix, vars, inputs	None
    

    This is why previously we used inputs, and why we can't use env.

    edit: which would look like this:

    <details> <summary>Details</summary>

    diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
    index 8eaa68ab0e2..3e57cbf77ec 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: ${{ vars.CI_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
             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: ${{ vars.CI_PROVIDER == 'warp' && '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: ${{ vars.CI_PROVIDER == 'warp' && '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: ${{ vars.CI_PROVIDER == 'warp' && '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: ${{ vars.CI_PROVIDER == 'warp' && 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 || (vars.CI_PROVIDER == 'warp' && '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: ${{ 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 || (vars.CI_PROVIDER == 'warp' && 'warp' || 'gha') }}
     
       lint:
         name: 'lint'
    -    needs: runners
    -    runs-on: ${{ needs.runners.outputs.provider == 'warp' && 'warp-ubuntu-latest-x64-2x' || 'ubuntu-latest' }}
    +    runs-on: ${{ vars.CI_PROVIDER == 'warp' && 'warp-ubuntu-latest-x64-2x' || 'ubuntu-latest' }}
         if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
         timeout-minutes: 20
         env:
    diff --git a/ci/README.md b/ci/README.md
    index 0b6a34460ca..e8a9277bfd2 100644
    --- a/ci/README.md
    +++ b/ci/README.md
    @@ -84,7 +84,8 @@ To configure the primary repository, follow these steps:
     2. Install the WarpBuild GitHub app against the GitHub organization.
     3. Enable organisation-level runners to be used in public repositories:
        1. `Org settings -> Actions -> Runner Groups -> Default -> Allow public repos`
    -4. Permit the following actions to run:
    +4. Set the `CI_PROVIDER` repository variable to `warp`.
    +5. Permit the following actions to run:
        1. actions/cache/restore@\*
        1. actions/cache/save@\*
        1. actions/github-script@\*
    @@ -97,5 +98,5 @@ To configure the primary repository, follow these steps:
     When used in a fork the CI will run on GitHub's free hosted runners by default.
     In this case, GitHub's cache size limitations may cause caches to be frequently evicted and missed, but the workflows will run (slowly).
     
    -It is also possible to use your own WarpBuild Runners in your own fork with an appropriate patch to the `REPO_USE_WARP_RUNNERS` variable in ../.github/workflows/ci.yml
    +It is also possible to use your own WarpBuild Runners in your own fork by setting the `CI_PROVIDER` repository variable to `warp`.
     NB that WarpBuild Runners only work at an organisation level, therefore in order to use your own WarpBuild Runners, *the fork must be within your own organisation*.
    
    

    </details>

  12. fanquake commented at 10:21 AM on June 4, 2026: member
  13. m3dwards commented at 3:04 PM on June 4, 2026: contributor

    Another option is to drop support for fork runs.

    Not a huge fan of that but if nobody else minds then this is fine.

    FWIW another approach here is to use a repo-level env var

    I think on balance it's fine as it is and also gives more control to PRs to be able to make changes rather than having to ask a maintainer to adjust a setting.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-07 05:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me