Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Oct 26, 2024
1 parent 6264680 commit e8bc804
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,19 @@ jobs:
notebook-${{ steps.hash.outputs.value }}-
- name: Setup Julia
uses: julia-actions/setup-julia@v2
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' }}
with:
version: ${{ steps.read_toml.outputs.value }}
- name: Restore Julia packages
uses: actions/cache/restore@v4
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' && runner.environment == 'github-hosted'}}
if: ${{ runner.environment == 'github-hosted' }}
id: cache-julia
with:
path: ~/.julia
key: ${{ steps.hash.outputs.ver }}-${{ steps.hash.outputs.value }}
restore-keys: |
${{ steps.hash.outputs.ver }}-
- name: Install Julia packages
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' && runner.environment == 'self-hosted' || steps.cache-julia.outputs.cache-hit != 'true' }}
if: ${{ runner.environment == 'self-hosted' || steps.cache-julia.outputs.cache-hit != 'true' }}
shell: julia --color=yes {0}
env:
JUPYTER: 'jupyter'
Expand All @@ -79,14 +78,14 @@ jobs:
Pkg.instantiate()
Pkg.precompile()
- name: Clean Julia package directory
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' && runner.environment == 'github-hosted' && steps.cache-julia.outputs.cache-hit != 'true' }}
if: ${{ runner.environment == 'github-hosted' && steps.cache-julia.outputs.cache-hit != 'true' }}
shell: julia --color=yes {0}
run: |
using Pkg, Dates
Pkg.gc(collect_delay=Day(0))
- name: Save Julia packages
uses: actions/cache/save@v4
if: ${{ steps.cache-nb.outputs.cache-hit != 'true' && runner.environment == 'github-hosted' && steps.cache-julia.outputs.cache-hit != 'true' }}
if: ${{ runner.environment == 'github-hosted' && steps.cache-julia.outputs.cache-hit != 'true' }}
with:
path: ~/.julia
key: ${{ steps.cache-julia.outputs.cache-primary-key }}
Expand Down

0 comments on commit e8bc804

Please sign in to comment.