Skip to content

Commit 77f6538

Browse files
authored
Use paid GitHub-hosted runners for Linux (#28478)
The standard Linux jobs share the organization's GitHub-hosted concurrency limit. Route them to the existing four-core GitHub-hosted larger runners, and use the two-core pool for the lightweight CI gate. Forks continue to use the standard runners, and the existing Depot, Namespace, Windows, and macOS runner choices are unchanged.
1 parent a02a6b8 commit 77f6538

17 files changed

Lines changed: 41 additions & 39 deletions

‎.github/actionlint.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ self-hosted-runner:
1313
- namespace-profile-windows-2022-x86-64-16x32
1414
- depot-ubuntu-22.04-arm-4
1515
- depot-ubuntu-24.04-arm-8
16+
- github-ubuntu-24.04-x86_64-2
17+
- github-ubuntu-24.04-x86_64-4
1618
- github-windows-2025-x86_64-8
1719
- github-windows-2025-x86_64-16
1820
- codspeed-macro

‎.github/workflows/build-docker.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ permissions:
3131
jobs:
3232
docker-build:
3333
name: Build Docker image (ghcr.io/astral-sh/ruff) for ${{ matrix.platform }}
34-
runs-on: ubuntu-latest
34+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
3535
environment:
3636
name: ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit && 'release' || '' }}
3737
strategy:
@@ -112,7 +112,7 @@ jobs:
112112

113113
docker-publish:
114114
name: Publish Docker image (ghcr.io/astral-sh/ruff)
115-
runs-on: ubuntu-latest
115+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
116116
environment:
117117
name: release
118118
needs:
@@ -182,7 +182,7 @@ jobs:
182182

183183
docker-publish-extra:
184184
name: Publish additional Docker image based on ${{ matrix.image-mapping }}
185-
runs-on: ubuntu-latest
185+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
186186
environment:
187187
name: release
188188
needs:
@@ -290,7 +290,7 @@ jobs:
290290
# This works by annotating the original digests (previously non-annotated) which triggers an update to ghcr.io
291291
docker-republish:
292292
name: Annotate Docker image (ghcr.io/astral-sh/ruff)
293-
runs-on: ubuntu-latest
293+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
294294
environment:
295295
name: release
296296
needs:

‎.github/workflows/build-wasm.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
jobs:
3232
build:
3333
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-build') }}
34-
runs-on: ubuntu-latest
34+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
3535
strategy:
3636
matrix:
3737
target: [web, bundler, nodejs]

‎.github/workflows/ci.yaml‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535
jobs:
3636
determine_changes:
3737
name: "Determine changes"
38-
runs-on: ubuntu-latest
38+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
3939
outputs:
4040
comparison_base: ${{ steps.merge_base.outputs.sha }}
4141
# Flag that is raised when any code that affects parser is changed
@@ -274,7 +274,7 @@ jobs:
274274
275275
cargo-fmt:
276276
name: "cargo fmt"
277-
runs-on: ubuntu-latest
277+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
278278
timeout-minutes: 10
279279
steps:
280280
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -286,7 +286,7 @@ jobs:
286286

287287
shellcheck:
288288
name: "shellcheck"
289-
runs-on: ubuntu-latest
289+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
290290
timeout-minutes: 5
291291
steps:
292292
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -310,7 +310,7 @@ jobs:
310310
311311
cargo-clippy:
312312
name: "cargo clippy"
313-
runs-on: ubuntu-latest
313+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
314314
needs: determine_changes
315315
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
316316
timeout-minutes: 20
@@ -332,7 +332,7 @@ jobs:
332332

333333
hawk:
334334
name: "cargo hawk"
335-
runs-on: ubuntu-latest
335+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
336336
needs: determine_changes
337337
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
338338
timeout-minutes: 15
@@ -502,7 +502,7 @@ jobs:
502502
503503
cargo-test-wasm:
504504
name: "cargo test (wasm)"
505-
runs-on: ubuntu-latest
505+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
506506
needs: determine_changes
507507
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
508508
timeout-minutes: 10
@@ -566,7 +566,7 @@ jobs:
566566

567567
cargo-fuzz-build:
568568
name: "cargo fuzz build"
569-
runs-on: ubuntu-latest
569+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
570570
needs: determine_changes
571571
if: ${{ github.ref == 'refs/heads/main' || needs.determine_changes.outputs.fuzz == 'true' || needs.determine_changes.outputs.code == 'true' }}
572572
timeout-minutes: 10
@@ -589,7 +589,7 @@ jobs:
589589

590590
fuzz-parser:
591591
name: "fuzz parser"
592-
runs-on: ubuntu-latest
592+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
593593
needs: determine_changes
594594
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.parser == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
595595
timeout-minutes: 20
@@ -630,7 +630,7 @@ jobs:
630630
631631
scripts:
632632
name: "test scripts"
633-
runs-on: ubuntu-latest
633+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
634634
needs: determine_changes
635635
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
636636
timeout-minutes: 5
@@ -845,7 +845,7 @@ jobs:
845845
846846
cargo-shear:
847847
name: "cargo shear"
848-
runs-on: ubuntu-latest
848+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
849849
needs: determine_changes
850850
if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }}
851851
steps:
@@ -886,7 +886,7 @@ jobs:
886886

887887
python-package:
888888
name: "python package"
889-
runs-on: ubuntu-latest
889+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
890890
timeout-minutes: 20
891891
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
892892
steps:
@@ -968,7 +968,7 @@ jobs:
968968
969969
docs:
970970
name: "mkdocs"
971-
runs-on: ubuntu-latest
971+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
972972
timeout-minutes: 10
973973
steps:
974974
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -995,7 +995,7 @@ jobs:
995995

996996
check-formatter-instability-and-black-similarity:
997997
name: "formatter instabilities and black similarity"
998-
runs-on: ubuntu-latest
998+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
999999
needs: determine_changes
10001000
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.formatter == 'true' || github.ref == 'refs/heads/main') }}
10011001
timeout-minutes: 10
@@ -1017,7 +1017,7 @@ jobs:
10171017

10181018
check-ruff-lsp:
10191019
name: "test ruff-lsp"
1020-
runs-on: ubuntu-latest
1020+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
10211021
timeout-minutes: 5
10221022
needs: determine_changes
10231023
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
@@ -1070,7 +1070,7 @@ jobs:
10701070
10711071
check-playground:
10721072
name: "check playground"
1073-
runs-on: ubuntu-latest
1073+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
10741074
timeout-minutes: 5
10751075
needs:
10761076
- determine_changes
@@ -1409,7 +1409,7 @@ jobs:
14091409
- prek
14101410
- docs
14111411
- python-package
1412-
runs-on: ubuntu-slim
1412+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-2' || 'ubuntu-slim' }}
14131413
steps:
14141414
- name: "Check required jobs passed"
14151415
run: |

‎.github/workflows/daily_fuzz.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
jobs:
3232
fuzz:
3333
name: Fuzz
34-
runs-on: ubuntu-latest
34+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
3535
timeout-minutes: 20
3636
# Don't run the cron job on forks:
3737
if: ${{ github.repository == 'astral-sh/ruff' || github.event_name != 'schedule' }}
@@ -67,7 +67,7 @@ jobs:
6767
6868
create-issue-on-failure:
6969
name: Create an issue if the daily fuzz surfaced any bugs
70-
runs-on: ubuntu-latest
70+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
7171
needs: fuzz
7272
if: ${{ github.repository == 'astral-sh/ruff' && always() && github.event_name == 'schedule' && needs.fuzz.result != 'success' }}
7373
permissions:

‎.github/workflows/notify-dependents.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
name: Notify dependents
2121
environment:
2222
name: release
23-
runs-on: ubuntu-latest
23+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
2424
steps:
2525
- name: "Update pre-commit mirror"
2626
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0

‎.github/workflows/publish-crates.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
jobs:
1919
crates-publish-ruff:
2020
name: Upload Ruff to crates.io
21-
runs-on: ubuntu-latest
21+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
2222
environment:
2323
name: release
2424
permissions:

‎.github/workflows/publish-docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
mkdocs:
3131
environment:
3232
name: release
33-
runs-on: ubuntu-latest
33+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
3434
steps:
3535
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3636
with:

‎.github/workflows/publish-mirror.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818

1919
jobs:
2020
publish-mirror:
21-
runs-on: ubuntu-latest
21+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
2222
environment:
2323
name: release
2424
env:

‎.github/workflows/publish-playground.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ permissions: {}
2626

2727
jobs:
2828
build:
29-
runs-on: ubuntu-latest
29+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
3030
steps:
3131
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3232
with:
@@ -57,7 +57,7 @@ jobs:
5757

5858
publish:
5959
needs: build
60-
runs-on: ubuntu-latest
60+
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
6161
environment: release-playground
6262
env:
6363
CF_API_TOKEN_EXISTS: ${{ secrets.CF_API_TOKEN != '' }}

0 commit comments

Comments
 (0)