2929 X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR : C:\Program Files\OpenSSL\lib\VC\x64\MD
3030 X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR : C:\Program Files\OpenSSL\include
3131 CARGO_INCREMENTAL : 0
32+ CARGO_PROFILE_TEST_DEBUG : 0
33+ CARGO_PROFILE_DEV_DEBUG : 0
34+ CARGO_PROFILE_RELEASE_DEBUG : 0
3235 CARGO_TERM_COLOR : always
3336
3437jobs :
5255 with :
5356 components : clippy
5457
55- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
58+ - name : Restore cache
59+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
5660 with :
57- save-if : ${{ github.ref == 'refs/heads/main' }}
61+ path : |
62+ ~/.cargo/bin/
63+ ~/.cargo/registry/index/
64+ ~/.cargo/registry/cache/
65+ ~/.cargo/git/db/
66+ target/
67+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
68+ restore-keys : |
69+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
70+ ${{ runner.os }}-stable--
5871
5972 - name : Install macOS dependencies
6073 uses : ./.github/actions/install-macos-deps
@@ -154,7 +167,6 @@ jobs:
154167
155168 - name : Restore cache
156169 uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
157- if : ${{ github.ref != 'refs/heads/main' }} # Never restore on main
158170 with :
159171 path : |
160172 ~/.cargo/bin/
@@ -163,9 +175,12 @@ jobs:
163175 ~/.cargo/git/db/
164176 target/
165177 # key won't match, will rely on restore-keys
166- key : cargo-check- ${{ runner.os }}-${{ matrix.target }}
178+ key : ${{ runner.os }}-${{ matrix.target }}
167179 restore-keys : |
168- cargo-check-${{ runner.os }}-${{ matrix.target }}-
180+ ${{ runner.os }}-stable-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-
181+ ${{ runner.os }}-stable-${{ matrix.target }}-
182+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
183+ ${{ runner.os }}-stable--
169184
170185 - uses : dtolnay/rust-toolchain@stable
171186 with :
@@ -252,9 +267,19 @@ jobs:
252267
253268 - uses : dtolnay/rust-toolchain@stable
254269
255- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
270+ - name : Restore cache
271+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
256272 with :
257- save-if : ${{ github.ref == 'refs/heads/main' }}
273+ path : |
274+ ~/.cargo/bin/
275+ ~/.cargo/registry/index/
276+ ~/.cargo/registry/cache/
277+ ~/.cargo/git/db/
278+ target/
279+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
280+ restore-keys : |
281+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
282+ ${{ runner.os }}-stable--
258283
259284 - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
260285
@@ -377,7 +402,6 @@ jobs:
377402 uses : zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
378403
379404 - name : restore prek cache
380- if : ${{ github.ref != 'refs/heads/main' }} # never restore on main
381405 uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
382406 with :
383407 key : prek-${{ hashFiles('.pre-commit-config.yaml') }}
@@ -422,9 +446,18 @@ jobs:
422446 toolchain : ${{ env.NIGHTLY_CHANNEL }}
423447 components : miri
424448
425- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
449+ - name : Restore cache
450+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
426451 with :
427- save-if : ${{ github.ref == 'refs/heads/main' }}
452+ path : |
453+ ~/.cargo/bin/
454+ ~/.cargo/registry/index/
455+ ~/.cargo/registry/cache/
456+ ~/.cargo/git/db/
457+ target/
458+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
459+ restore-keys : |
460+ ${{ runner.os }}-
428461
429462 - name : Run tests under miri
430463 run : cargo +${{ env.NIGHTLY_CHANNEL }} miri test -p rustpython-vm -- miri_test
@@ -447,9 +480,20 @@ jobs:
447480 with :
448481 components : clippy
449482
450- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
483+ - name : Restore cache
484+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
451485 with :
452- save-if : ${{ github.ref == 'refs/heads/main' }}
486+ path : |
487+ ~/.cargo/bin/
488+ ~/.cargo/registry/index/
489+ ~/.cargo/registry/cache/
490+ ~/.cargo/git/db/
491+ target/
492+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
493+ restore-keys : |
494+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
495+ ${{ runner.os }}-stable--
496+ ${{ runner.os }}-
453497
454498 - name : cargo clippy
455499 run : cargo clippy --manifest-path=crates/wasm/Cargo.toml -- -Dwarnings
@@ -522,9 +566,21 @@ jobs:
522566 with :
523567 target : wasm32-wasip1
524568
525- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
569+ - name : Restore cache
570+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
526571 with :
527- save-if : ${{ github.ref == 'refs/heads/main' }}
572+ path : |
573+ ~/.cargo/bin/
574+ ~/.cargo/registry/index/
575+ ~/.cargo/registry/cache/
576+ ~/.cargo/git/db/
577+ target/
578+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
579+ restore-keys : |
580+ ${{ runner.os }}-stable-wasm32-wasip1-${{ hashFiles('**/Cargo.toml') }}-
581+ ${{ runner.os }}-stable-wasm32-wasip1-
582+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
583+ ${{ runner.os }}-stable--
528584
529585 - name : Setup Wasmer
530586 uses : wasmerio/setup-wasmer@v3
0 commit comments