Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ jobs:
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
needs: determine_changes
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
timeout-minutes: 20
# The runner above is chosen per repository; the budget must be too. A fork
# drops from the 16-core Depot machine to `ubuntu-latest` and keeps a limit
# calibrated for the larger one, so the job is killed mid-build every time.
# 40 rather than a guess: this job measured 22m04s on a fork runner once it
# was allowed to finish, so the fork budget is ~1.8x its observed cost.
timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 20 || 40 }}
env:
# Line-tables-only debug info: faster builds, backtraces still work.
CARGO_PROFILE_DEV_DEBUG: line-tables-only
Expand Down Expand Up @@ -453,7 +458,10 @@ jobs:
runs-on: ${{ matrix.platform }}
needs: determine_changes
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
timeout-minutes: 20
# Same reason as `cargo-test-linux`: the matrix above already picks a
# smaller runner for forks, so the budget has to follow it. Measured on a
# fork: 24m36s on windows-latest, 14m45s on macos-latest.
timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 20 || 40 }}
env:
# Line-tables-only debug info: faster builds, backtraces still work.
CARGO_PROFILE_DEV_DEBUG: line-tables-only
Expand Down Expand Up @@ -681,7 +689,11 @@ jobs:
needs.determine_changes.outputs.linter == 'true' ||
needs.determine_changes.outputs.formatter == 'true'
)
timeout-minutes: 20
# Same split as the `cargo test` jobs: 8-core Depot upstream, `ubuntu-latest`
# on a fork, one budget for both. It was cancelled at 20m27s on the run that
# proved the others, so >20 is measured; how much more is not, hence the
# deliberately loose 45.
timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 20 || 45 }}
env:
# Line-tables-only debug info: faster builds, backtraces still work.
CARGO_PROFILE_DEV_DEBUG: line-tables-only
Expand Down Expand Up @@ -799,7 +811,8 @@ jobs:
- determine_changes
# Only runs on pull requests, since that is the only we way we can find the base version for comparison.
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') && github.event_name == 'pull_request' && (needs.determine_changes.outputs.ty == 'true' || needs.determine_changes.outputs.py-fuzzer == 'true') }}
timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 10 || 20 }}
# Fork budget measured, not guessed: 15m14s on `ubuntu-latest`.
timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 10 || 30 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ty-ecosystem-analyzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ jobs:
matrix:
revision: [base, pr]
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'depot-ubuntu-22.04-32' || 'ubuntu-latest' }}
timeout-minutes: 5
# The widest gap in the repository: upstream builds on a 32-core Depot
# machine, a fork on `ubuntu-latest`, and both were given five minutes.
# A fork build measured 5m34s with a warm `rust-cache`; 25 leaves room for
# a cold one, which is the case the five-minute limit could never survive.
timeout-minutes: ${{ github.repository == 'astral-sh/ruff' && 5 || 25 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down
Loading