From cf5e92f919617457731d2e7921c57f7c87df5ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Tue, 13 Oct 2026 15:46:52 +0200 Subject: [PATCH] Save Rust CI caches only on master Every patch saved its own Rust caches, up to 3 GB per patch, which pushed the repo past GitHub's 10 GB cache limit and evicted the ones master builds rely on. Patches now restore master's caches, and line-table-only debug info keeps the builds and caches smaller. --- .github/workflows/desktop-e2e.yml | 6 ++++++ .github/workflows/desktop-lint.yml | 6 ++++++ .github/workflows/explorer-rust.yml | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index 2a40238b2..87ba5b45e 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -13,6 +13,9 @@ on: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + # Debug info is most of a target/ directory. Line tables keep file:line in + # panics and backtraces, and make builds and caches much smaller. + CARGO_PROFILE_DEV_DEBUG: line-tables-only defaults: run: @@ -48,6 +51,9 @@ jobs: - uses: Swatinem/rust-cache@v2 with: workspaces: desktop + # Only master saves, so patches share its caches instead of each + # storing their own, which pushes the repo over GitHub's 10 GB limit. + save-if: ${{ github.ref == 'refs/heads/master' }} - name: Cache heartwood binaries uses: actions/cache@v5 diff --git a/.github/workflows/desktop-lint.yml b/.github/workflows/desktop-lint.yml index a88a917af..4933531e1 100644 --- a/.github/workflows/desktop-lint.yml +++ b/.github/workflows/desktop-lint.yml @@ -13,6 +13,9 @@ on: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + # Debug info is most of a target/ directory. Line tables keep file:line in + # panics and backtraces, and make builds and caches much smaller. + CARGO_PROFILE_DEV_DEBUG: line-tables-only defaults: run: @@ -52,5 +55,8 @@ jobs: - uses: Swatinem/rust-cache@v2 with: workspaces: desktop + # Only master saves, so patches share its caches instead of each + # storing their own, which pushes the repo over GitHub's 10 GB limit. + save-if: ${{ github.ref == 'refs/heads/master' }} - run: scripts/check-rs diff --git a/.github/workflows/explorer-rust.yml b/.github/workflows/explorer-rust.yml index 4c76bf479..867c5f5b7 100644 --- a/.github/workflows/explorer-rust.yml +++ b/.github/workflows/explorer-rust.yml @@ -13,6 +13,9 @@ on: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + # Debug info is most of a target/ directory. Line tables keep file:line in + # panics and backtraces, and make builds and caches much smaller. + CARGO_PROFILE_DEV_DEBUG: line-tables-only jobs: test: @@ -24,6 +27,9 @@ jobs: - uses: Swatinem/rust-cache@v2 with: workspaces: ". -> target" + # Only master saves, so patches share its caches instead of each + # storing their own, which pushes the repo over GitHub's 10 GB limit. + save-if: ${{ github.ref == 'refs/heads/master' }} - name: Build (all features) run: cargo build --workspace --all-features env: @@ -44,6 +50,9 @@ jobs: - uses: Swatinem/rust-cache@v2 with: workspaces: ". -> target" + # Only master saves, so patches share its caches instead of each + # storing their own, which pushes the repo over GitHub's 10 GB limit. + save-if: ${{ github.ref == 'refs/heads/master' }} - name: Run clippy run: cargo clippy --workspace --all-features --tests env: