Skip to content

Commit bb7f0d1

Browse files
committed
ci: reuse rust-cache between different jobs on the same platform, remove cache from lint
1 parent 9195924 commit bb7f0d1

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ jobs:
4343
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
4444
- uses: Swatinem/rust-cache@v2
4545
with:
46-
workspaces: |
47-
.
48-
tests/difftests/tests
46+
add-job-id-key: "false"
47+
shared-key: "base"
4948
# Fetch dependencies in a separate step to clearly show how long each part
5049
# of the testing takes
5150
- name: cargo fetch --locked
@@ -101,9 +100,8 @@ jobs:
101100
run: cargo version
102101
- uses: Swatinem/rust-cache@v2
103102
with:
104-
workspaces: |
105-
.
106-
tests/difftests/tests
103+
add-job-id-key: "false"
104+
shared-key: "android"
107105
- name: cargo fetch --locked
108106
run: cargo fetch --locked --target ${{ matrix.target }}
109107

@@ -150,9 +148,9 @@ jobs:
150148
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
151149
- uses: Swatinem/rust-cache@v2
152150
with:
153-
workspaces: |
154-
.
155-
tests/difftests/tests
151+
add-job-id-key: "false"
152+
shared-key: "base"
153+
save-if: "false"
156154
- name: cargo fetch --locked
157155
run: cargo fetch --locked --target $TARGET
158156
- name: compiletest
@@ -190,9 +188,14 @@ jobs:
190188
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
191189
- uses: Swatinem/rust-cache@v2
192190
with:
193-
workspaces: |
194-
.
195-
tests/difftests/tests
191+
add-job-id-key: "false"
192+
shared-key: "base"
193+
save-if: "false"
194+
- uses: Swatinem/rust-cache@v2
195+
with:
196+
add-job-id-key: "false"
197+
shared-key: "difftest"
198+
workspaces: "tests/difftests/tests"
196199
- name: cargo fetch --locked
197200
run: cargo fetch --locked --target $TARGET
198201
- name: cargo fetch --locked difftests
@@ -240,11 +243,6 @@ jobs:
240243
# cargo version is a random command that forces the installation of rust-toolchain
241244
- name: install rust-toolchain
242245
run: cargo version
243-
- uses: Swatinem/rust-cache@v2
244-
with:
245-
workspaces: |
246-
.
247-
tests/difftests/tests
248246
- name: Install rustup components
249247
run: rustup component add rustfmt clippy
250248
- name: cargo fetch --locked

0 commit comments

Comments
 (0)