Skip to content

Commit 1525f7b

Browse files
authored
Merge pull request #3277 from tschneidereit/selective-rust-cache
chore(ci): Restrict use of rust-cache to longest-running jobs
2 parents 4394e4b + f8c0019 commit 1525f7b

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

.github/actions/spin-ci-dependencies/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ runs:
114114
if: ${{ inputs.rust-cache == 'true' }}
115115
with:
116116
shared-key: "${{ runner.os }}-full-${{ hashFiles('./Cargo.lock', './os-release') }}"
117+
save-if: ${{ github.ref == 'refs/heads/main' }}
117118

118119
## Install nomad
119120
- name: Install nomad

.github/workflows/build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ jobs:
4444
with:
4545
rust: true
4646
rust-wasm: true
47-
rust-cache: true
4847

4948
- name: Run lints on main code
5049
run: BUILD_SPIN_EXAMPLES=0 make lint
@@ -64,7 +63,6 @@ jobs:
6463
with:
6564
rust: true
6665
rust-wasm: true
67-
rust-cache: true
6866

6967
- name: Cargo Build
7068
run: cargo build --workspace --release --all-targets --features openssl/vendored --features all-tests
@@ -99,7 +97,6 @@ jobs:
9997
with:
10098
rust: true
10199
rust-cross: true
102-
rust-cache: true
103100

104101
- name: Cargo Build
105102
run: cross build --target ${{ matrix.config.target }} --release --features openssl/vendored
@@ -127,7 +124,7 @@ jobs:
127124
with:
128125
rust: true
129126
rust-wasm: true
130-
rust-cache: true
127+
rust-cache: "${{ matrix.os == 'windows-latest' }} || ${{ matrix.os == 'macos-13' }}"
131128
openssl-windows: "${{ matrix.os == 'windows-latest' }}"
132129

133130
- name: Cargo Build
@@ -156,7 +153,6 @@ jobs:
156153
with:
157154
rust: true
158155
rust-wasm: true
159-
rust-cache: true
160156
nomad: true
161157

162158
- name: Check disk space (Before)

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ jobs:
331331
with:
332332
rust: true
333333
rust-cross: true
334-
rust-cache: true
335334

336335
- name: Cargo Build
337336
run: cross build --target ${{ matrix.config.target }} --release --features openssl/vendored

0 commit comments

Comments
 (0)