From 03d2a4f041af081166db48d41a7a04649fb4660a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 01:17:39 +0000 Subject: [PATCH 1/3] ci: clean workspace artifacts before cache upload Run `cargo clean --workspace` at the end of each cached job so that only compiled dependencies are cached, not the workspace's own build artifacts. This reduces cache size and upload/download time while keeping the expensive dependency compilation cached. https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq --- .github/workflows/benchmark.yaml | 4 ++++ .github/workflows/clippy.yaml | 5 +++++ .github/workflows/deploy.yaml | 4 ++++ .github/workflows/test.yaml | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 6eb8cee8..19b8fc97 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -115,3 +115,7 @@ jobs: - name: Check for performance regressions run: node ci/github-actions/check-for-performance-regressions.js + + - name: Clean workspace artifacts before cache + shell: bash + run: cargo clean --workspace diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml index 5842e0cb..b71712b8 100644 --- a/.github/workflows/clippy.yaml +++ b/.github/workflows/clippy.yaml @@ -58,3 +58,8 @@ jobs: BUILD: 'false' TEST: 'false' run: ./test.sh + + - name: Clean workspace artifacts before cache + if: matrix.os != 'macos-latest' + shell: bash + run: cargo clean --workspace diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 15e3c8f0..9ef589e2 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -616,3 +616,7 @@ jobs: asset_path: ./tmp.benchmark-reports.tar.gz asset_name: benchmark-reports.tar.gz asset_content_type: application/x-compressed-tar + + - name: Clean workspace artifacts before cache + shell: bash + run: cargo clean --workspace diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c942c29d..c245e08b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -73,3 +73,8 @@ jobs: BUILD_FLAGS: '--locked' TEST_FLAGS: '--no-fail-fast' run: ./test.sh --release + + - name: Clean workspace artifacts before cache + if: matrix.os != 'macos-latest' + shell: bash + run: cargo clean --workspace From e3900fb15b4f6ca70da964b367238f8be4746cca Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 01:22:51 +0000 Subject: [PATCH 2/3] ci: drop unnecessary if guards and add continue-on-error to clean steps Remove the `if: matrix.os != 'macos-latest'` condition from the clean steps in test.yaml and clippy.yaml since it's unnecessary, and add `continue-on-error: true` to all clean steps so a failure doesn't fail the CI. https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq --- .github/workflows/benchmark.yaml | 1 + .github/workflows/clippy.yaml | 2 +- .github/workflows/deploy.yaml | 1 + .github/workflows/test.yaml | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 19b8fc97..f7ffc889 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -117,5 +117,6 @@ jobs: run: node ci/github-actions/check-for-performance-regressions.js - name: Clean workspace artifacts before cache + continue-on-error: true shell: bash run: cargo clean --workspace diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml index b71712b8..620e441a 100644 --- a/.github/workflows/clippy.yaml +++ b/.github/workflows/clippy.yaml @@ -60,6 +60,6 @@ jobs: run: ./test.sh - name: Clean workspace artifacts before cache - if: matrix.os != 'macos-latest' + continue-on-error: true shell: bash run: cargo clean --workspace diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 9ef589e2..867f9fc7 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -618,5 +618,6 @@ jobs: asset_content_type: application/x-compressed-tar - name: Clean workspace artifacts before cache + continue-on-error: true shell: bash run: cargo clean --workspace diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c245e08b..72efffa5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -75,6 +75,6 @@ jobs: run: ./test.sh --release - name: Clean workspace artifacts before cache - if: matrix.os != 'macos-latest' + continue-on-error: true shell: bash run: cargo clean --workspace From 832fa8ba19fcbb7f477e2befea56452cb07bcd56 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 3 Apr 2026 01:36:09 +0000 Subject: [PATCH 3/3] ci: run clean step even on failed runs Add `if: always()` to the clean steps so workspace artifacts are trimmed before cache upload even when a prior step fails. https://claude.ai/code/session_014NgdhJMEQSguQ8yXAuTfnq --- .github/workflows/benchmark.yaml | 1 + .github/workflows/clippy.yaml | 1 + .github/workflows/deploy.yaml | 1 + .github/workflows/test.yaml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index f7ffc889..37deede6 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -117,6 +117,7 @@ jobs: run: node ci/github-actions/check-for-performance-regressions.js - name: Clean workspace artifacts before cache + if: always() continue-on-error: true shell: bash run: cargo clean --workspace diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml index 620e441a..0258427a 100644 --- a/.github/workflows/clippy.yaml +++ b/.github/workflows/clippy.yaml @@ -60,6 +60,7 @@ jobs: run: ./test.sh - name: Clean workspace artifacts before cache + if: always() continue-on-error: true shell: bash run: cargo clean --workspace diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 867f9fc7..7b05ef20 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -618,6 +618,7 @@ jobs: asset_content_type: application/x-compressed-tar - name: Clean workspace artifacts before cache + if: always() continue-on-error: true shell: bash run: cargo clean --workspace diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 72efffa5..d4fecd84 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -75,6 +75,7 @@ jobs: run: ./test.sh --release - name: Clean workspace artifacts before cache + if: always() continue-on-error: true shell: bash run: cargo clean --workspace