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 :
@@ -194,18 +209,6 @@ jobs:
194209 AR_aarch64_linux_android : ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
195210 CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER : ${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang
196211
197- - name : Save cache
198- if : ${{ github.ref == 'refs/heads/main' }} # only save on main
199- uses : actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
200- with :
201- path : |
202- ~/.cargo/bin/
203- ~/.cargo/registry/index/
204- ~/.cargo/registry/cache/
205- ~/.cargo/git/db/
206- target/
207- key : cargo-check-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('Cargo.lock') }}-${{ github.sha }}
208-
209212 snippets_cpython :
210213 if : ${{ !contains(github.event.pull_request.labels.*.name, 'skip:ci') }}
211214 env :
@@ -252,9 +255,19 @@ jobs:
252255
253256 - uses : dtolnay/rust-toolchain@stable
254257
255- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
258+ - name : Restore cache
259+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
256260 with :
257- save-if : ${{ github.ref == 'refs/heads/main' }}
261+ path : |
262+ ~/.cargo/bin/
263+ ~/.cargo/registry/index/
264+ ~/.cargo/registry/cache/
265+ ~/.cargo/git/db/
266+ target/
267+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
268+ restore-keys : |
269+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
270+ ${{ runner.os }}-stable--
258271
259272 - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
260273
@@ -377,7 +390,6 @@ jobs:
377390 uses : zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
378391
379392 - name : restore prek cache
380- if : ${{ github.ref != 'refs/heads/main' }} # never restore on main
381393 uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
382394 with :
383395 key : prek-${{ hashFiles('.pre-commit-config.yaml') }}
@@ -422,9 +434,18 @@ jobs:
422434 toolchain : ${{ env.NIGHTLY_CHANNEL }}
423435 components : miri
424436
425- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
437+ - name : Restore cache
438+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
426439 with :
427- save-if : ${{ github.ref == 'refs/heads/main' }}
440+ path : |
441+ ~/.cargo/bin/
442+ ~/.cargo/registry/index/
443+ ~/.cargo/registry/cache/
444+ ~/.cargo/git/db/
445+ target/
446+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
447+ restore-keys : |
448+ ${{ runner.os }}-
428449
429450 - name : Run tests under miri
430451 run : cargo +${{ env.NIGHTLY_CHANNEL }} miri test -p rustpython-vm -- miri_test
@@ -447,9 +468,20 @@ jobs:
447468 with :
448469 components : clippy
449470
450- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
471+ - name : Restore cache
472+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
451473 with :
452- save-if : ${{ github.ref == 'refs/heads/main' }}
474+ path : |
475+ ~/.cargo/bin/
476+ ~/.cargo/registry/index/
477+ ~/.cargo/registry/cache/
478+ ~/.cargo/git/db/
479+ target/
480+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
481+ restore-keys : |
482+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
483+ ${{ runner.os }}-stable--
484+ ${{ runner.os }}-
453485
454486 - name : cargo clippy
455487 run : cargo clippy --manifest-path=crates/wasm/Cargo.toml -- -Dwarnings
@@ -522,9 +554,21 @@ jobs:
522554 with :
523555 target : wasm32-wasip1
524556
525- - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
557+ - name : Restore cache
558+ uses : actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
526559 with :
527- save-if : ${{ github.ref == 'refs/heads/main' }}
560+ path : |
561+ ~/.cargo/bin/
562+ ~/.cargo/registry/index/
563+ ~/.cargo/registry/cache/
564+ ~/.cargo/git/db/
565+ target/
566+ key : ${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-
567+ restore-keys : |
568+ ${{ runner.os }}-stable-wasm32-wasip1-${{ hashFiles('**/Cargo.toml') }}-
569+ ${{ runner.os }}-stable-wasm32-wasip1-
570+ ${{ runner.os }}-stable--${{ hashFiles('**/Cargo.toml') }}-
571+ ${{ runner.os }}-stable--
528572
529573 - name : Setup Wasmer
530574 uses : wasmerio/setup-wasmer@v3
0 commit comments