mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 09:26:53 +08:00
add cache-scratchspaces and default enabled (#63)
This commit is contained in:
@@ -22,6 +22,9 @@ inputs:
|
||||
cache-compiled:
|
||||
description: 'Whether to cache ~/.julia/compiled. USE WITH CAUTION! See https://github.com/julia-actions/cache/issues/11 for caveats.'
|
||||
default: 'false'
|
||||
cache-scratchspaces:
|
||||
description: 'Whether to cache ~/.julia/scratchspaces/'
|
||||
default: 'true'
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
@@ -41,12 +44,14 @@ runs:
|
||||
echo "registries-path=$R_PATH" >> $GITHUB_OUTPUT
|
||||
[ "${{ inputs.cache-compiled }}" = "true" ] && PCC_PATH="~/.julia/compiled"
|
||||
echo "precompilation-cache-path=$PCC_PATH" >> $GITHUB_OUTPUT
|
||||
[ "${{ inputs.cache-scratchspaces }}" = "true" ] && S_PATH="~/.julia/scratchspaces"
|
||||
echo "scratchspaces-path=$S_PATH" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
|
||||
id: cache
|
||||
with:
|
||||
path: "${{ format('{0}\n{1}\n{2}\n{3}', steps.paths.outputs.artifacts-path, steps.paths.outputs.packages-path, steps.paths.outputs.registries-path, steps.paths.outputs.precompilation-cache-path) }}"
|
||||
path: "${{ format('{0}\n{1}\n{2}\n{3}\n{4}', steps.paths.outputs.artifacts-path, steps.paths.outputs.packages-path, steps.paths.outputs.registries-path, steps.paths.outputs.precompilation-cache-path, steps.paths.outputs.scratchspaces-path) }}"
|
||||
key: ${{ runner.os }}-${{ inputs.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ inputs.cache-name }}-
|
||||
|
||||
Reference in New Issue
Block a user