Skip to content

Commit

Permalink
cache on github runners only
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Mar 19, 2024
1 parent 23671ae commit 13eff6c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- name: Cache pip dependencies
uses: actions/cache@v4
id: cache-py
if: ${{ contains(runner.name, 'GitHub Actions') }}
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-pip-${{ steps.cp.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
Expand All @@ -58,9 +59,9 @@ jobs:
uses: julia-actions/setup-julia@v1
with:
version: ${{ steps.read_toml.outputs.value }}
show-versioninfo: 'true'
- name: Restore Julia packages
uses: actions/cache/restore@v4
if: ${{ contains(runner.name, 'GitHub Actions') }}
id: cache-julia
with:
path: |
Expand All @@ -70,13 +71,13 @@ jobs:
restore-keys: |
${{ runner.os }}-julia-${{ env.CACHE_NUM }}-
- name: Install Julia packages
if: ${{ steps.cache-julia.outputs.cache-hit != 'true' }}
if: ${{ contains(runner.name, 'GitHub Actions') && steps.cache-julia.outputs.cache-hit != 'true' }}
env:
PYTHON: ${{ env.pythonLocation }}/python
run: julia --color=yes instantiate.jl
- name: Save Julia packages
uses: actions/cache/save@v4
if: ${{ steps.cache-julia.outputs.cache-hit != 'true' }}
if: ${{ contains(runner.name, 'GitHub Actions') && steps.cache-julia.outputs.cache-hit != 'true' }}
with:
path: |
~/.julia
Expand Down

0 comments on commit 13eff6c

Please sign in to comment.