Skip to content

Commit 8743ca0

Browse files
committed
ci: add rust-cache action
1 parent e7e447a commit 8743ca0

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
- if: ${{ runner.os == 'Linux' }}
3939
name: Linux - Install native dependencies
4040
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
41+
- uses: Swatinem/rust-cache@v2
42+
with:
43+
workspaces: |
44+
.
45+
tests/difftests/tests
4146
# just need a random command that forces the installation of rust-toolchain
4247
# figure out native target triple while we're at it
4348
- name: install rust-toolchain
@@ -96,6 +101,11 @@ jobs:
96101
install_runtime: true
97102
cache: true
98103
stripdown: true
104+
- uses: Swatinem/rust-cache@v2
105+
with:
106+
workspaces: |
107+
.
108+
tests/difftests/tests
99109
- name: install rust-toolchain
100110
run: cargo version
101111
- name: cargo fetch --locked
@@ -140,6 +150,11 @@ jobs:
140150
install_runtime: true
141151
cache: true
142152
stripdown: true
153+
- uses: Swatinem/rust-cache@v2
154+
with:
155+
workspaces: |
156+
.
157+
tests/difftests/tests
143158
- name: install rust-toolchain
144159
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
145160
- name: cargo fetch --locked
@@ -175,6 +190,11 @@ jobs:
175190
sudo add-apt-repository ppa:kisak/turtle -y
176191
sudo apt-get update
177192
sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
193+
- uses: Swatinem/rust-cache@v2
194+
with:
195+
workspaces: |
196+
.
197+
tests/difftests/tests
178198
- name: install rust-toolchain
179199
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
180200
- name: cargo fetch --locked
@@ -223,6 +243,11 @@ jobs:
223243
install_runtime: true
224244
cache: true
225245
stripdown: true
246+
- uses: Swatinem/rust-cache@v2
247+
with:
248+
workspaces: |
249+
.
250+
tests/difftests/tests
226251
# cargo version is a random command that forces the installation of rust-toolchain
227252
- name: install rust-toolchain
228253
run: cargo version

0 commit comments

Comments
 (0)