mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 09:26:53 +08:00
@@ -40,6 +40,7 @@ That is why caching the registries is disabled by default.
|
|||||||
- `cache-artifacts` - Whether to cache `~/.julia/artifacts/`. Enabled by default.
|
- `cache-artifacts` - Whether to cache `~/.julia/artifacts/`. Enabled by default.
|
||||||
- `cache-packages` - Whether to cache `~/.julia/packages/`. Enabled by default.
|
- `cache-packages` - Whether to cache `~/.julia/packages/`. Enabled by default.
|
||||||
- `cache-registries` - Whether to cache `~/.julia/registries/`. Disabled by default.
|
- `cache-registries` - Whether to cache `~/.julia/registries/`. Disabled by default.
|
||||||
|
- `cache-compiled` - Whether to cache `~/.julia/compiled/`. Disabled by default. **USE ONLY IF YOU KNOW WHAT YOU'RE DOING!** See [#11](https://github.com/julia-actions/cache/issues/11).
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ inputs:
|
|||||||
cache-registries:
|
cache-registries:
|
||||||
description: 'Whether to cache ~/.julia/registries/'
|
description: 'Whether to cache ~/.julia/registries/'
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
cache-compiled:
|
||||||
|
description: 'Whether to cache ~/.julia/compiled. USE WITH CAUTION! See https://github.com/julia-actions/cache/issues/11 for caveats.'
|
||||||
|
default: 'false'
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
cache-hit:
|
cache-hit:
|
||||||
@@ -36,12 +39,14 @@ runs:
|
|||||||
echo "PACKAGES_PATH=$P_PATH" >> $GITHUB_ENV
|
echo "PACKAGES_PATH=$P_PATH" >> $GITHUB_ENV
|
||||||
[ "${{ inputs.cache-registries }}" = "true" ] && R_PATH="~/.julia/registries"
|
[ "${{ inputs.cache-registries }}" = "true" ] && R_PATH="~/.julia/registries"
|
||||||
echo "REGISTRIES_PATH=$R_PATH" >> $GITHUB_ENV
|
echo "REGISTRIES_PATH=$R_PATH" >> $GITHUB_ENV
|
||||||
|
[ "${{ inputs.cache-compiled }}" = "true" ] && PCC_PATH="~/.julia/compiled"
|
||||||
|
echo "PRECOMPILATION_CACHE_PATH=$PCC_PATH" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d
|
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: "${{ format('{0}\n{1}\n{2}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH) }}"
|
path: "${{ format('{0}\n{1}\n{2}\n{3}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH, env.PRECOMPILATION_CACHE_PATH) }}"
|
||||||
key: ${{ runner.os }}-test-${{ inputs.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
key: ${{ runner.os }}-test-${{ inputs.cache-name }}-${{ hashFiles('**/Project.toml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-test-${{ inputs.cache-name }}-
|
${{ runner.os }}-test-${{ inputs.cache-name }}-
|
||||||
|
|||||||
Reference in New Issue
Block a user