Skip to content

Commit 03d2a4f

Browse files
committed
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
1 parent 4ed3a27 commit 03d2a4f

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/benchmark.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,7 @@ jobs:
115115

116116
- name: Check for performance regressions
117117
run: node ci/github-actions/check-for-performance-regressions.js
118+
119+
- name: Clean workspace artifacts before cache
120+
shell: bash
121+
run: cargo clean --workspace

.github/workflows/clippy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,8 @@ jobs:
5858
BUILD: 'false'
5959
TEST: 'false'
6060
run: ./test.sh
61+
62+
- name: Clean workspace artifacts before cache
63+
if: matrix.os != 'macos-latest'
64+
shell: bash
65+
run: cargo clean --workspace

.github/workflows/deploy.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,3 +616,7 @@ jobs:
616616
asset_path: ./tmp.benchmark-reports.tar.gz
617617
asset_name: benchmark-reports.tar.gz
618618
asset_content_type: application/x-compressed-tar
619+
620+
- name: Clean workspace artifacts before cache
621+
shell: bash
622+
run: cargo clean --workspace

.github/workflows/test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ jobs:
7373
BUILD_FLAGS: '--locked'
7474
TEST_FLAGS: '--no-fail-fast'
7575
run: ./test.sh --release
76+
77+
- name: Clean workspace artifacts before cache
78+
if: matrix.os != 'macos-latest'
79+
shell: bash
80+
run: cargo clean --workspace

0 commit comments

Comments
 (0)