@@ -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,40 +204,47 @@ 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
201
223
- name : Install Linux dependencies
202
224
uses : ./.github/actions/install-linux-deps
203
225
- name : Check Compile
204
226
run : cd examples/no_std/library && cargo check --no-default-features --features libm,critical-section --target x86_64-unknown-none
227
+ # TODO: features
205
228
206
229
build-wasm :
207
230
runs-on : ubuntu-latest
208
231
timeout-minutes : 30
209
232
needs : build
210
233
steps :
211
234
- uses : actions/checkout@v4
212
- - uses : actions/cache@v4
235
+ - uses : actions/cache/restore @v4
213
236
with :
237
+ # key won't match, will rely on restore-keys
238
+ key : ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
239
+ restore-keys : |
240
+ ${{ runner.os }}-stable-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
241
+ ${{ runner.os }}-stable-wasm32-unknown-unknown-
214
242
path : |
215
243
~/.cargo/bin/
216
244
~/.cargo/registry/index/
217
245
~/.cargo/registry/cache/
218
246
~/.cargo/git/db/
219
247
target/
220
- key : ubuntu-assets-cargo-build-wasm-stable-${{ hashFiles('**/Cargo.toml') }}
221
248
- uses : dtolnay/rust-toolchain@stable
222
249
with :
223
250
target : wasm32-unknown-unknown
@@ -230,15 +257,19 @@ jobs:
230
257
needs : build
231
258
steps :
232
259
- uses : actions/checkout@v4
233
- - uses : actions/cache@v4
260
+ - uses : actions/cache/restore @v4
234
261
with :
262
+ # key won't match, will rely on restore-keys
263
+ key : ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
264
+ restore-keys : |
265
+ ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-${{ hashFiles('**/Cargo.toml') }}-
266
+ ${{ runner.os }}-${{ env.NIGHTLY_TOOLCHAIN }}-wasm32-unknown-unknown-
235
267
path : |
236
268
~/.cargo/bin/
237
269
~/.cargo/registry/index/
238
270
~/.cargo/registry/cache/
239
271
~/.cargo/git/db/
240
272
target/
241
- key : ubuntu-assets-cargo-build-wasm-nightly-${{ hashFiles('**/Cargo.toml') }}
242
273
- uses : dtolnay/rust-toolchain@master
243
274
with :
244
275
toolchain : ${{ env.NIGHTLY_TOOLCHAIN }}
@@ -309,15 +340,19 @@ jobs:
309
340
timeout-minutes : 30
310
341
steps :
311
342
- uses : actions/checkout@v4
312
- - uses : actions/cache@v4
343
+ - uses : actions/cache/restore @v4
313
344
with :
345
+ # key won't match, will rely on restore-keys
346
+ key : ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
347
+ restore-keys : |
348
+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
349
+ ${{ runner.os }}-stable--
314
350
path : |
315
351
~/.cargo/bin/
316
352
~/.cargo/registry/index/
317
353
~/.cargo/registry/cache/
318
354
~/.cargo/git/db/
319
355
target/
320
- key : ${{ runner.os }}-check-doc-${{ hashFiles('**/Cargo.toml') }}
321
356
- uses : dtolnay/rust-toolchain@stable
322
357
- name : Install Linux dependencies
323
358
uses : ./.github/actions/install-linux-deps
@@ -412,15 +447,6 @@ jobs:
412
447
needs : build
413
448
steps :
414
449
- 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
450
- uses : dtolnay/rust-toolchain@stable
425
451
- name : get MSRV
426
452
id : msrv
@@ -430,6 +456,19 @@ jobs:
430
456
- uses : dtolnay/rust-toolchain@master
431
457
with :
432
458
toolchain : ${{ steps.msrv.outputs.msrv }}
459
+ - uses : actions/cache/restore@v4
460
+ with :
461
+ # key won't match, will rely on restore-keys
462
+ key : ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--${{ hashFiles('**/Cargo.toml') }}-
463
+ restore-keys : |
464
+ ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--${{ hashFiles('**/Cargo.toml') }}-
465
+ ${{ runner.os }}-${{ steps.msrv.outputs.msrv }}--
466
+ path : |
467
+ ~/.cargo/bin/
468
+ ~/.cargo/registry/index/
469
+ ~/.cargo/registry/cache/
470
+ ~/.cargo/git/db/
471
+ target/
433
472
- name : Install Linux dependencies
434
473
uses : ./.github/actions/install-linux-deps
435
474
- name : Run cargo check
0 commit comments