@@ -30,15 +30,19 @@ jobs:
30
30
timeout-minutes : 30
31
31
steps :
32
32
- uses : actions/checkout@v4
33
- - uses : actions/cache@v4
33
+ - uses : actions/cache/restore @v4
34
34
with :
35
+ # key won't match, will rely on restore-keys
36
+ key : ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
37
+ restore-keys : |
38
+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
39
+ ${{ runner.os }}-stable--
35
40
path : |
36
41
~/.cargo/bin/
37
42
~/.cargo/registry/index/
38
43
~/.cargo/registry/cache/
39
44
~/.cargo/git/db/
40
45
target/
41
- key : ${{ runner.os }}-cargo-build-stable-${{ hashFiles('**/Cargo.toml') }}
42
46
- uses : dtolnay/rust-toolchain@stable
43
47
- name : Install Linux dependencies
44
48
uses : ./.github/actions/install-linux-deps
@@ -53,15 +57,19 @@ jobs:
53
57
timeout-minutes : 30
54
58
steps :
55
59
- uses : actions/checkout@v4
56
- - uses : actions/cache@v4
60
+ - uses : actions/cache/restore @v4
57
61
with :
62
+ # key won't match, will rely on restore-keys
63
+ key : ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
64
+ restore-keys : |
65
+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
66
+ ${{ runner.os }}-stable--
58
67
path : |
59
68
~/.cargo/bin/
60
69
~/.cargo/registry/index/
61
70
~/.cargo/registry/cache/
62
71
~/.cargo/git/db/
63
72
target/
64
- key : ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.toml') }}
65
73
- uses : dtolnay/rust-toolchain@stable
66
74
with :
67
75
components : rustfmt, clippy
@@ -79,15 +87,19 @@ jobs:
79
87
timeout-minutes : 60
80
88
steps :
81
89
- uses : actions/checkout@v4
82
- - uses : actions/cache@v4
90
+ - uses : actions/cache/restore @v4
83
91
with :
92
+ # key won't match, will rely on restore-keys
93
+ key : ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--${{ hashFiles('**/Cargo.toml') }}-
94
+ restore-keys : |
95
+ ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--${{ hashFiles('**/Cargo.toml') }}-
96
+ ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}--
84
97
path : |
85
98
~/.cargo/bin/
86
99
~/.cargo/registry/index/
87
100
~/.cargo/registry/cache/
88
101
~/.cargo/git/db/
89
102
target/
90
- key : ${{ runner.os }}-cargo-miri-${{ hashFiles('**/Cargo.toml') }}
91
103
- uses : dtolnay/rust-toolchain@master
92
104
with :
93
105
toolchain : ${{ env.NIGHTLY_TOOLCHAIN }}
@@ -110,17 +122,19 @@ jobs:
110
122
needs : ci
111
123
steps :
112
124
- uses : actions/checkout@v4
113
- - uses : actions/cache@v4
125
+ - uses : actions/cache/restore @v4
114
126
with :
127
+ # key won't match, will rely on restore-keys
128
+ key : ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
129
+ restore-keys : |
130
+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
131
+ ${{ runner.os }}-stable--
115
132
path : |
116
133
~/.cargo/bin/
117
134
~/.cargo/registry/index/
118
135
~/.cargo/registry/cache/
119
136
~/.cargo/git/db/
120
137
target/
121
- crates/bevy_ecs_compile_fail_tests/target/
122
- crates/bevy_reflect_compile_fail_tests/target/
123
- key : ${{ runner.os }}-cargo-check-compiles-${{ hashFiles('**/Cargo.toml') }}
124
138
- uses : dtolnay/rust-toolchain@stable
125
139
with :
126
140
toolchain : stable
@@ -129,47 +143,53 @@ jobs:
129
143
- name : Check Compile
130
144
# See tools/ci/src/main.rs for the commands this runs
131
145
run : cargo run -p ci -- compile
146
+
132
147
check-compiles-no-std :
133
148
runs-on : ubuntu-latest
134
149
timeout-minutes : 30
135
150
needs : ci
136
151
steps :
137
152
- uses : actions/checkout@v4
138
- - uses : actions/cache@v4
153
+ - uses : actions/cache/restore @v4
139
154
with :
155
+ # key won't match, will rely on restore-keys
156
+ key : ${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
157
+ restore-keys : |
158
+ ${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
159
+ ${{ runner.os }}-stable-x86_64-unknown-none-
140
160
path : |
141
161
~/.cargo/bin/
142
162
~/.cargo/registry/index/
143
163
~/.cargo/registry/cache/
144
164
~/.cargo/git/db/
145
165
target/
146
- crates/bevy_ecs_compile_fail_tests/target/
147
- crates/bevy_reflect_compile_fail_tests/target/
148
- key : ${{ runner.os }}-cargo-check-compiles-no-std-${{ hashFiles('**/Cargo.toml') }}
149
166
- uses : dtolnay/rust-toolchain@stable
150
167
with :
151
168
targets : x86_64-unknown-none
152
169
- name : Install Linux dependencies
153
170
uses : ./.github/actions/install-linux-deps
154
171
- name : Check Compile
155
172
run : cargo check -p bevy --no-default-features --features default_no_std --target x86_64-unknown-none
173
+
156
174
check-compiles-no-std-portable-atomic :
157
175
runs-on : ubuntu-latest
158
176
timeout-minutes : 30
159
177
needs : ci
160
178
steps :
161
179
- uses : actions/checkout@v4
162
- - uses : actions/cache@v4
180
+ - uses : actions/cache/restore @v4
163
181
with :
182
+ # key won't match, will rely on restore-keys
183
+ key : ${{ runner.os }}-stable-thumbv6m-none-eabi-${{ hashFiles('**/Cargo.toml') }}-
184
+ restore-keys : |
185
+ ${{ runner.os }}-stable-thumbv6m-none-eabi-${{ hashFiles('**/Cargo.toml') }}-
186
+ ${{ runner.os }}-stable-thumbv6m-none-eabi-
164
187
path : |
165
188
~/.cargo/bin/
166
189
~/.cargo/registry/index/
167
190
~/.cargo/registry/cache/
168
191
~/.cargo/git/db/
169
192
target/
170
- crates/bevy_ecs_compile_fail_tests/target/
171
- crates/bevy_reflect_compile_fail_tests/target/
172
- key : ${{ runner.os }}-cargo-check-compiles-no-std-portable-atomic-${{ hashFiles('**/Cargo.toml') }}
173
193
- uses : dtolnay/rust-toolchain@stable
174
194
with :
175
195
targets : thumbv6m-none-eabi
@@ -184,17 +204,19 @@ jobs:
184
204
needs : ci
185
205
steps :
186
206
- uses : actions/checkout@v4
187
- - uses : actions/cache@v4
207
+ - uses : actions/cache/restore @v4
188
208
with :
209
+ # key won't match, will rely on restore-keys
210
+ key : ${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
211
+ restore-keys : |
212
+ ${{ runner.os }}-stable-x86_64-unknown-none-${{ hashFiles('**/Cargo.toml') }}-
213
+ ${{ runner.os }}-stable-x86_64-unknown-none-
189
214
path : |
190
215
~/.cargo/bin/
191
216
~/.cargo/registry/index/
192
217
~/.cargo/registry/cache/
193
218
~/.cargo/git/db/
194
219
target/
195
- crates/bevy_ecs_compile_fail_tests/target/
196
- crates/bevy_reflect_compile_fail_tests/target/
197
- key : ${{ runner.os }}-cargo-check-compiles-no-std-examples-${{ hashFiles('**/Cargo.toml') }}
198
220
- uses : dtolnay/rust-toolchain@stable
199
221
with :
200
222
targets : x86_64-unknown-none
@@ -209,15 +231,19 @@ jobs:
209
231
needs : build
210
232
steps :
211
233
- uses : actions/checkout@v4
212
- - uses : actions/cache@v4
234
+ - uses : actions/cache/restore @v4
213
235
with :
236
+ # key won't match, will rely on restore-keys
237
+ key : ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
238
+ restore-keys : |
239
+ ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
240
+ ${{ runner.os }}-stable-wasm32-unknown-unknown-
214
241
path : |
215
242
~/.cargo/bin/
216
243
~/.cargo/registry/index/
217
244
~/.cargo/registry/cache/
218
245
~/.cargo/git/db/
219
246
target/
220
- key : ubuntu-assets-cargo-build-wasm-stable-${{ hashFiles('**/Cargo.toml') }}
221
247
- uses : dtolnay/rust-toolchain@stable
222
248
with :
223
249
target : wasm32-unknown-unknown
@@ -230,15 +256,19 @@ jobs:
230
256
needs : build
231
257
steps :
232
258
- uses : actions/checkout@v4
233
- - uses : actions/cache@v4
259
+ - uses : actions/cache/restore @v4
234
260
with :
261
+ # key won't match, will rely on restore-keys
262
+ key : ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
263
+ restore-keys : |
264
+ ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
265
+ ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-
235
266
path : |
236
267
~/.cargo/bin/
237
268
~/.cargo/registry/index/
238
269
~/.cargo/registry/cache/
239
270
~/.cargo/git/db/
240
271
target/
241
- key : ubuntu-assets-cargo-build-wasm-nightly-${{ hashFiles('**/Cargo.toml') }}
242
272
- uses : dtolnay/rust-toolchain@master
243
273
with :
244
274
toolchain : ${{ env.NIGHTLY_TOOLCHAIN }}
@@ -309,15 +339,19 @@ jobs:
309
339
timeout-minutes : 30
310
340
steps :
311
341
- uses : actions/checkout@v4
312
- - uses : actions/cache@v4
342
+ - uses : actions/cache/restore @v4
313
343
with :
344
+ # key won't match, will rely on restore-keys
345
+ key : ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
346
+ restore-keys : |
347
+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
348
+ ${{ runner.os }}-stable--
314
349
path : |
315
350
~/.cargo/bin/
316
351
~/.cargo/registry/index/
317
352
~/.cargo/registry/cache/
318
353
~/.cargo/git/db/
319
354
target/
320
- key : ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
321
355
- uses : dtolnay/rust-toolchain@stable
322
356
- name : Install Linux dependencies
323
357
uses : ./.github/actions/install-linux-deps
@@ -412,15 +446,6 @@ jobs:
412
446
needs : build
413
447
steps :
414
448
- uses : actions/checkout@v4
415
- - uses : actions/cache@v4
416
- with :
417
- path : |
418
- ~/.cargo/bin/
419
- ~/.cargo/registry/index/
420
- ~/.cargo/registry/cache/
421
- ~/.cargo/git/db/
422
- target/
423
- key : ${{ runner.os }}-cargo-msrv-${{ hashFiles('**/Cargo.toml') }}
424
449
- uses : dtolnay/rust-toolchain@stable
425
450
- name : get MSRV
426
451
id : msrv
@@ -430,6 +455,19 @@ jobs:
430
455
- uses : dtolnay/rust-toolchain@master
431
456
with :
432
457
toolchain : ${{ steps.msrv.outputs.msrv }}
458
+ - uses : actions/cache/restore@v4
459
+ with :
460
+ # key won't match, will rely on restore-keys
461
+ key : ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--${{ hashFiles('**/Cargo.toml') }}-
462
+ restore-keys : |
463
+ ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--${{ hashFiles('**/Cargo.toml') }}-
464
+ ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--
465
+ path : |
466
+ ~/.cargo/bin/
467
+ ~/.cargo/registry/index/
468
+ ~/.cargo/registry/cache/
469
+ ~/.cargo/git/db/
470
+ target/
433
471
- name : Install Linux dependencies
434
472
uses : ./.github/actions/install-linux-deps
435
473
- name : Run cargo check
0 commit comments