add suggestion to use cache action if no depot is detected (#41)

This commit is contained in:
Ian Butterworth
2024-01-05 14:39:52 -05:00
committed by GitHub
parent d4b940ea5e
commit 90dd6f23eb
2 changed files with 11 additions and 14 deletions

View File

@@ -58,18 +58,9 @@ jobs:
version: ${{ matrix.version }} version: ${{ matrix.version }}
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: ./.github/actions/julia-buildpkg - uses: ./.github/actions/julia-buildpkg
with:
ignore-no-cache: true
env: env:
JULIA_PKG_SERVER: ${{ matrix.pkg-server }} JULIA_PKG_SERVER: ${{ matrix.pkg-server }}

View File

@@ -21,6 +21,9 @@ inputs:
description: 'Determine if Pkg uses the cli git executable (Julia >= 1.7). Might be necessary for more complicated SSH setups. description: 'Determine if Pkg uses the cli git executable (Julia >= 1.7). Might be necessary for more complicated SSH setups.
Options: true | false. Default : false' Options: true | false. Default : false'
default: 'false' default: 'false'
ignore-no-cache:
description: 'Whether to ignore if there appears to be no depot caching. Silences an action notice recommending `julia-actions/cache`.'
default: 'false'
runs: runs:
using: 'composite' using: 'composite'
@@ -29,6 +32,9 @@ runs:
run: echo "JULIA_PKG_SERVER_REGISTRY_PREFERENCE=${JULIA_PKG_SERVER_REGISTRY_PREFERENCE:-eager}" >> ${GITHUB_ENV} run: echo "JULIA_PKG_SERVER_REGISTRY_PREFERENCE=${JULIA_PKG_SERVER_REGISTRY_PREFERENCE:-eager}" >> ${GITHUB_ENV}
shell: bash shell: bash
- run: | - run: |
if "${{ inputs.ignore-no-cache }}" == "false" && !isdir(DEPOT_PATH[1])
println("::notice title=[julia-buildpkg] Caching of the julia depot was not detected ::Consider using `julia-actions/cache` to speed up runs https://github.com/julia-actions/cache. To ignore, set input `ignore-no-cache: true` ")
end
import Pkg import Pkg
# Determine if Pkg uses git-cli executable instead of LibGit2 # Determine if Pkg uses git-cli executable instead of LibGit2