diff --git a/README.md b/README.md index 266f4fd..d5ac9b0 100644 --- a/README.md +++ b/README.md @@ -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-packages` - Whether to cache `~/.julia/packages/`. Enabled 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 diff --git a/action.yml b/action.yml index 5ab9b18..e7b377f 100644 --- a/action.yml +++ b/action.yml @@ -19,6 +19,9 @@ inputs: cache-registries: description: 'Whether to cache ~/.julia/registries/' 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: cache-hit: @@ -36,12 +39,14 @@ runs: echo "PACKAGES_PATH=$P_PATH" >> $GITHUB_ENV [ "${{ inputs.cache-registries }}" = "true" ] && R_PATH="~/.julia/registries" 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 - uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d id: cache 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') }} restore-keys: | ${{ runner.os }}-test-${{ inputs.cache-name }}-