Skip to content

Commit c1cb947

Browse files
committed
ci: speed-up compilation using sccache
1 parent 5bcdf74 commit c1cb947

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/actions/setup-dependencies/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ runs:
1313
run: sudo ./install-deps.sh
1414
shell: bash
1515

16+
- name: Setup sccache # for speeding up Rust builds
17+
uses: mozilla-actions/sccache-action@v0.0.7
18+
with:
19+
disable_annotations: true # it is very spammy, but useful for diagnostics
20+
21+
- name: Enable sccache
22+
run: |
23+
echo SCCACHE_GHA_ENABLED=true >> $GITHUB_ENV
24+
echo RUSTC_WRAPPER=sccache >> $GITHUB_ENV
25+
shell: bash
26+
1627
- name: Install uv & Python
1728
uses: astral-sh/setup-uv@v5
1829
with:

.github/workflows/CI.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ jobs:
9292
- name: Checkout source code
9393
uses: actions/checkout@v4
9494

95+
- name: Setup sccache
96+
uses: mozilla-actions/sccache-action@v0.0.7
97+
9598
- name: Run cargo test
99+
env:
100+
SCCACHE_GHA_ENABLED: "true"
101+
RUSTC_WRAPPER: "sccache"
96102
run: cargo test
97103

98104
build_linux_wheels:

0 commit comments

Comments
 (0)