Skip to content

Commit ed91ac2

Browse files
committed
ci: add rust-cache action after toolchain install
1 parent 61d20c0 commit ed91ac2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ jobs:
4141
# figure out native target triple while we're at it
4242
- name: install rust-toolchain
4343
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
44+
- uses: Swatinem/rust-cache@v2
45+
with:
46+
workspaces: |
47+
.
48+
tests/difftests/tests
4449
# Fetch dependencies in a separate step to clearly show how long each part
4550
# of the testing takes
4651
- name: cargo fetch --locked
@@ -94,6 +99,11 @@ jobs:
9499
stripdown: true
95100
- name: install rust-toolchain
96101
run: cargo version
102+
- uses: Swatinem/rust-cache@v2
103+
with:
104+
workspaces: |
105+
.
106+
tests/difftests/tests
97107
- name: cargo fetch --locked
98108
run: cargo fetch --locked --target ${{ matrix.target }}
99109

@@ -138,6 +148,11 @@ jobs:
138148
stripdown: true
139149
- name: install rust-toolchain
140150
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
151+
- uses: Swatinem/rust-cache@v2
152+
with:
153+
workspaces: |
154+
.
155+
tests/difftests/tests
141156
- name: cargo fetch --locked
142157
run: cargo fetch --locked --target $TARGET
143158
- name: compiletest
@@ -173,6 +188,11 @@ jobs:
173188
sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
174189
- name: install rust-toolchain
175190
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
191+
- uses: Swatinem/rust-cache@v2
192+
with:
193+
workspaces: |
194+
.
195+
tests/difftests/tests
176196
- name: cargo fetch --locked
177197
run: cargo fetch --locked --target $TARGET
178198
- name: cargo fetch --locked difftests
@@ -220,6 +240,11 @@ jobs:
220240
# cargo version is a random command that forces the installation of rust-toolchain
221241
- name: install rust-toolchain
222242
run: cargo version
243+
- uses: Swatinem/rust-cache@v2
244+
with:
245+
workspaces: |
246+
.
247+
tests/difftests/tests
223248
- name: Install rustup components
224249
run: rustup component add rustfmt clippy
225250
- name: cargo fetch --locked

0 commit comments

Comments
 (0)