Skip to content

Commit 6d39903

Browse files
committed
Raise CI job budget and bound each slow step separately
The cold `prepare-envs` install alone can run for about two hours on the slower matrix legs (uv rebuilds the local packages in every env), so the 120-minute job timeout cancelled runs before the check steps could report anything. A single job-wide limit also hides which step hung. - Raise the job timeout to 240 minutes and give the install (80), inspect (30) and audit (30) steps their own limits, so a hang in one step fails that step instead of eating the whole job budget. - Trim the uv cache whenever the install step ran, not only when it succeeded, and save it once the trim succeeded. A timed-out cold install has already built most of the wheels; discarding them made the next run pay the same two hours again.
1 parent 1c351e6 commit 6d39903

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎.github/workflows/ci-cd.yml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ jobs:
3636
runs-on: ${{ matrix.os }}
3737
# A cold `prepare-envs` over the whole workspace plus the full check suite does
3838
# not fit in 40 minutes on the slower matrix legs. The venvs cache keeps the
39-
# happy path short; this budget only covers the cold run.
40-
timeout-minutes: 120
39+
timeout-minutes: 240
4140
strategy:
4241
fail-fast: false
4342
matrix:
@@ -121,6 +120,7 @@ jobs:
121120
122121
- name: Install dependencies
123122
id: install
123+
timeout-minutes: 80
124124
run: |
125125
# CI must exercise this branch's local source, so finecode and its sibling
126126
# packages need an editable install, not a released version from PyPI — see
@@ -131,6 +131,7 @@ jobs:
131131

132132
- name: Inspect code
133133
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
134+
timeout-minutes: 30
134135
run: |
135136
source .venvs/dev_workspace/${{ matrix.venv_bin }}/activate
136137
python -m finecode run --log-level="$FINECODE_LOG_LEVEL" inspect_code
@@ -139,6 +140,7 @@ jobs:
139140

140141
- name: Audit code
141142
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
143+
timeout-minutes: 30
142144
run: |
143145
source .venvs/dev_workspace/${{ matrix.venv_bin }}/activate
144146
python -m finecode run --log-level="$FINECODE_LOG_LEVEL" audit_code
@@ -234,7 +236,7 @@ jobs:
234236
# releases — then prune dangling entries.
235237
- name: Trim uv cache to reusable entries
236238
id: uv_trim
237-
if: ${{ always() && steps.install.outcome == 'success' && steps.uv_cache.outcome == 'success' }}
239+
if: ${{ always() && steps.install.outcome != 'skipped' && steps.uv_cache.outcome == 'success' }}
238240
run: |
239241
manifest=".venvs/dev_workspace/cache/wheelhouse/manifest.json"
240242
if [ -f "$manifest" ]; then
@@ -248,7 +250,7 @@ jobs:
248250
uv cache clean finecode $names
249251
uv cache prune
250252
- name: Save uv cache
251-
if: ${{ always() && steps.install.outcome == 'success' && steps.uv_trim.outcome == 'success' }}
253+
if: ${{ always() && steps.uv_trim.outcome == 'success' }}
252254
uses: actions/cache/save@v5
253255
with:
254256
path: ${{ runner.temp }}/uv-cache

0 commit comments

Comments
 (0)