Skip to content

use !cancelled() instead of always() when caching stuff #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Save _freeze folder
id: cache-save
if: always()
if: ${{ !cancelled() }}
uses: actions/cache/save@v4
with:
path: |
Expand All @@ -67,7 +67,7 @@ jobs:

- name: Save Julia depot cache
id: julia-cache-save
if: always() && steps.julia-cache.outputs.cache-hit != 'true'
if: ${{ !cancelled() && steps.julia-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: ${{ steps.julia-cache.outputs.cache-paths }}
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
version: '1.11'

- name: Load Julia packages from cache
uses: julia-actions/cache@v2
id: julia-cache
uses: penelopeysm/julia-cache@main
with:
cache-name: julia-cache;${{ hashFiles('**/Manifest.toml') }}
delete-old-caches: false

# Note: needs resolve() to fix #518
- name: Instantiate Julia environment
Expand Down Expand Up @@ -86,12 +90,21 @@ jobs:

- name: Save _freeze folder
id: cache-save
if: ${{ !cancelled() }}
uses: actions/cache/save@v4
with:
path: |
./_freeze/
key: ${{ runner.os }}-${{ hashFiles('**/Manifest.toml') }}-${{ hashFiles('**/index.qmd') }}

- name: Save Julia depot cache
id: julia-cache-save
if: ${{ !cancelled() && steps.julia-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
with:
path: ${{ steps.julia-cache.outputs.cache-paths }}
key: ${{ steps.julia-cache.outputs.cache-key }}

- name: Fetch search_original.json from main site
run: curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/gh-pages/search_original.json

Expand Down
Loading