Skip to content

Commit 922018d

Browse files
committed
ci: make emscripten job only save cache on main
1 parent 478d08e commit 922018d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,12 @@ jobs:
512512
with:
513513
node-version: 18
514514
- run: python -m pip install --upgrade pip && pip install nox
515-
- uses: actions/cache@v4
515+
- uses: actions/cache/restore@v4
516516
id: cache
517517
with:
518518
path: |
519519
.nox/emscripten
520-
key: ${{ hashFiles('emscripten/*') }} - ${{ hashFiles('noxfile.py') }} - ${{ steps.setup-python.outputs.python-path }}
520+
key: emscripten-${{ hashFiles('emscripten/*') }}-${{ hashFiles('noxfile.py') }}-${{ steps.setup-python.outputs.python-path }}
521521
- uses: Swatinem/rust-cache@v2
522522
with:
523523
save-if: ${{ github.event_name != 'merge_group' }}
@@ -526,6 +526,12 @@ jobs:
526526
run: nox -s build-emscripten
527527
- name: Test
528528
run: nox -s test-emscripten
529+
- uses: actions/cache/save@v4
530+
if: ${{ github.event_name != 'merge_group' }}
531+
with:
532+
path: |
533+
.nox/emscripten
534+
key: emscripten-${{ hashFiles('emscripten/*') }}-${{ hashFiles('noxfile.py') }}-${{ steps.setup-python.outputs.python-path }}
529535

530536
test-debug:
531537
if: ${{ contains(github.event.pull_request.labels.*.name, 'CI-build-full') || github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)