From d13dd61ac1e11a2a12cc0d503db06f268932ca2b Mon Sep 17 00:00:00 2001 From: Karn Date: Sun, 19 Jul 2026 03:12:37 +0530 Subject: [PATCH] maint: cache Rust builds in CI and widen the quality-gate timeout Cold CI builds now compile every dependency at opt-level 2 (dev-profile override added for detection speed) and no longer fit in 20 minutes, so pushes to main were timing out as cancelled. Add Swatinem/rust-cache (pinned, cache-on-failure so even a cancelled cold run warms the cache) and raise the timeout to 40 minutes for the cold path. Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41608a1..1747c1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,10 @@ jobs: check: name: mise run check runs-on: ubuntu-24.04 - timeout-minutes: 20 + # Cold builds compile every dependency at opt-level 2 (dev-profile override + # in the root Cargo.toml) and do not fit in 20 minutes; warm runs restored + # from the Rust cache below finish well under it. + timeout-minutes: 40 steps: - name: Check out repository @@ -31,6 +34,13 @@ jobs: version: 2026.6.1 cache: true + - name: Cache Rust build artifacts + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + with: + # Save the cache even when the quality gate fails or the job is + # cancelled, so one slow cold run still warms every later run. + cache-on-failure: true + - name: Install Rust quality components run: mise exec -- rustup component add clippy rustfmt