71
71
python-version : " 3.12"
72
72
- uses : Swatinem/rust-cache@v2
73
73
with :
74
- save-if : ${{ github.event_name != 'merge_group' }}
74
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
75
75
- run : python -m pip install --upgrade pip && pip install nox
76
76
# This is a smoke test to confirm that CI will run on MSRV (including dev dependencies)
77
77
- name : Check with MSRV package versions
@@ -157,7 +157,7 @@ jobs:
157
157
architecture : ${{ matrix.platform.python-architecture }}
158
158
- uses : Swatinem/rust-cache@v2
159
159
with :
160
- save-if : ${{ github.event_name != 'merge_group' }}
160
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
161
161
- run : python -m pip install --upgrade pip && pip install nox
162
162
- run : nox -s clippy-all
163
163
env :
@@ -413,7 +413,7 @@ jobs:
413
413
python-version : " 3.12.4"
414
414
- uses : Swatinem/rust-cache@v2
415
415
with :
416
- save-if : ${{ github.event_name != 'merge_group' }}
416
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
417
417
- uses : dtolnay/rust-toolchain@stable
418
418
- uses : taiki-e/install-action@valgrind
419
419
- run : python -m pip install --upgrade pip && pip install nox
@@ -434,7 +434,7 @@ jobs:
434
434
python-version : " 3.12"
435
435
- uses : Swatinem/rust-cache@v2
436
436
with :
437
- save-if : ${{ github.event_name != 'merge_group' }}
437
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
438
438
- uses : dtolnay/rust-toolchain@nightly
439
439
with :
440
440
components : rust-src
@@ -456,7 +456,7 @@ jobs:
456
456
python-version : " 3.12"
457
457
- uses : Swatinem/rust-cache@v2
458
458
with :
459
- save-if : ${{ github.event_name != 'merge_group' }}
459
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
460
460
- uses : dtolnay/rust-toolchain@nightly
461
461
with :
462
462
components : rust-src
@@ -477,7 +477,7 @@ jobs:
477
477
python-version : " 3.12"
478
478
- uses : Swatinem/rust-cache@v2
479
479
with :
480
- save-if : ${{ github.event_name != 'merge_group' }}
480
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
481
481
- uses : dtolnay/rust-toolchain@stable
482
482
with :
483
483
components : llvm-tools-preview,rust-src
@@ -520,14 +520,14 @@ jobs:
520
520
key : emscripten-${{ hashFiles('emscripten/*') }}-${{ hashFiles('noxfile.py') }}-${{ steps.setup-python.outputs.python-path }}
521
521
- uses : Swatinem/rust-cache@v2
522
522
with :
523
- save-if : ${{ github.event_name != 'merge_group' }}
523
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
524
524
- name : Build
525
525
if : steps.cache.outputs.cache-hit != 'true'
526
526
run : nox -s build-emscripten
527
527
- name : Test
528
528
run : nox -s test-emscripten
529
529
- uses : actions/cache/save@v4
530
- if : ${{ github.event_name != 'merge_group' }}
530
+ if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
531
531
with :
532
532
path : |
533
533
.nox/emscripten
@@ -541,7 +541,7 @@ jobs:
541
541
- uses : actions/checkout@v4
542
542
- uses : Swatinem/rust-cache@v2
543
543
with :
544
- save-if : ${{ github.event_name != 'merge_group' }}
544
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
545
545
- uses : dtolnay/rust-toolchain@stable
546
546
with :
547
547
components : rust-src
@@ -588,7 +588,7 @@ jobs:
588
588
- uses : actions/checkout@v4
589
589
- uses : Swatinem/rust-cache@v2
590
590
with :
591
- save-if : ${{ github.event_name != 'merge_group' }}
591
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
592
592
- uses : dtolnay/rust-toolchain@stable
593
593
with :
594
594
components : rust-src
@@ -625,7 +625,7 @@ jobs:
625
625
python-version : " 3.12"
626
626
- uses : Swatinem/rust-cache@v2
627
627
with :
628
- save-if : ${{ github.event_name != 'merge_group' }}
628
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
629
629
- uses : dtolnay/rust-toolchain@stable
630
630
- run : python3 -m pip install --upgrade pip && pip install nox
631
631
- run : python3 -m nox -s test-version-limits
@@ -649,7 +649,7 @@ jobs:
649
649
python-version : " 3.12"
650
650
- uses : Swatinem/rust-cache@v2
651
651
with :
652
- save-if : ${{ github.event_name != 'merge_group' }}
652
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
653
653
- uses : dtolnay/rust-toolchain@master
654
654
with :
655
655
toolchain : stable
@@ -701,7 +701,7 @@ jobs:
701
701
- uses : Swatinem/rust-cache@v2
702
702
with :
703
703
workspaces : examples/maturin-starter
704
- save-if : ${{ github.event_name != 'merge_group' }}
704
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
705
705
key : ${{ matrix.target }}
706
706
- name : Setup cross-compiler
707
707
if : ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
@@ -731,7 +731,7 @@ jobs:
731
731
- uses : Swatinem/rust-cache@v2
732
732
with :
733
733
workspaces : examples/maturin-starter
734
- save-if : ${{ github.event_name != 'merge_group' }}
734
+ save-if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
735
735
- uses : actions/cache/restore@v4
736
736
with :
737
737
# https://github.com/PyO3/maturin/discussions/1953
0 commit comments