Skip to content

Commit 9b88158

Browse files
authored
Merge pull request #4178 from tgross35/ci-caching
ci: Add caching
2 parents fc3234f + af7e126 commit 9b88158

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,20 @@ jobs:
4343
- uses: actions/checkout@v4
4444
- name: Setup Rust toolchain
4545
run: ./ci/install-rust.sh
46+
47+
# FIXME(ci): These `du` statements are temporary for debugging cache
48+
- name: Target size before restoring cache
49+
run: du -sh target | sort -k 2 || true
50+
- uses: Swatinem/rust-cache@v2
51+
with:
52+
key: ${{ matrix.os }}-${{ matrix.toolchain }}
53+
- name: Target size after restoring cache
54+
run: du -sh target | sort -k 2 || true
55+
4656
- name: Execute build.sh
4757
run: ./ci/verify-build.sh
58+
- name: Target size after job completion
59+
run: du -sh target | sort -k 2
4860

4961
test_tier1:
5062
name: Test tier1
@@ -81,6 +93,9 @@ jobs:
8193
- uses: actions/checkout@v4
8294
- name: Setup Rust toolchain
8395
run: ./ci/install-rust.sh
96+
- uses: Swatinem/rust-cache@v2
97+
with:
98+
key: ${{ matrix.target }}
8499
- name: Run natively
85100
if: "!matrix.docker"
86101
run: ./ci/run.sh ${{ matrix.target }}
@@ -132,6 +147,9 @@ jobs:
132147
- uses: actions/checkout@v4
133148
- name: Setup Rust toolchain
134149
run: ./ci/install-rust.sh
150+
- uses: Swatinem/rust-cache@v2
151+
with:
152+
key: ${{ matrix.target }}
135153
- name: Execute run-docker.sh
136154
run: ./ci/run-docker.sh ${{ matrix.target }}
137155

0 commit comments

Comments
 (0)