Skip to content

Commit e5ef48e

Browse files
committed
try clear cache
1 parent b0c215e commit e5ef48e

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
id: jobs
7070
job:
7171
name: ${{ matrix.full_name }}
72-
needs: [ calculate_matrix ]
72+
needs: [calculate_matrix]
7373
runs-on: "${{ matrix.os }}"
7474
timeout-minutes: 360
7575
# The bors environment contains secrets required for elevated workflows (try and auto builds),
@@ -117,31 +117,43 @@ jobs:
117117
with:
118118
fetch-depth: 2
119119

120+
# Clear cargo cache between runs to avoid cache effects
121+
- name: clear cargo cache
122+
run: rm -rf ~/.cargo/registry ~/.cargo/git /tmp/cargo-install*
123+
120124
- name: install typos-cli 0
121125
run: time RUSTFLAGS="-Copt-level=0" cargo install [email protected] --force --quiet --locked
122126

123127
- name: run typos-cli 0
124128
run: time typos compiler library src/bootstrap src/librustdoc
125129

130+
- name: clear cargo cache
131+
run: rm -rf ~/.cargo/registry ~/.cargo/git /tmp/cargo-install*
132+
126133
- name: install typos-cli 1
127134
run: time RUSTFLAGS="-Copt-level=1" cargo install [email protected] --force --quiet --locked
128135

129136
- name: run typos-cli 1
130137
run: time typos compiler library src/bootstrap src/librustdoc
131138

139+
- name: clear cargo cache
140+
run: rm -rf ~/.cargo/registry ~/.cargo/git /tmp/cargo-install*
141+
132142
- name: install typos-cli 2
133143
run: time RUSTFLAGS="-Copt-level=2" cargo install [email protected] --force --quiet --locked
134144

135145
- name: run typos-cli 2
136146
run: time typos compiler library src/bootstrap src/librustdoc
137147

148+
- name: clear cargo cache
149+
run: rm -rf ~/.cargo/registry ~/.cargo/git /tmp/cargo-install*
150+
138151
- name: install typos-cli 3 (default)
139-
run: time cargo install [email protected] --force --quiet --locked
152+
run: time RUSTFLAGS="-Copt-level=3" cargo install [email protected] --force --quiet --locked
140153

141154
- name: run typos-cli 3
142155
run: time typos compiler library src/bootstrap src/librustdoc
143156

144-
145157
# Free up disk space on Linux by removing preinstalled components that
146158
# we do not need. We do this to enable some of the less resource
147159
# intensive jobs to run on free runners, which however also have
@@ -333,7 +345,7 @@ jobs:
333345
outcome:
334346
name: bors build finished
335347
runs-on: ubuntu-24.04
336-
needs: [ calculate_matrix, job ]
348+
needs: [calculate_matrix, job]
337349
# !cancelled() executes the job regardless of whether the previous jobs passed or failed
338350
if: ${{ !cancelled() && contains(fromJSON('["auto", "try"]'), needs.calculate_matrix.outputs.run_type) }}
339351
steps:

0 commit comments

Comments
 (0)