mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-14 01:56:54 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edf78a706c | ||
|
|
10913c2628 | ||
|
|
a364403e9b | ||
|
|
b695972eeb | ||
|
|
2ff65c9241 | ||
|
|
8618676e71 |
11
.github/workflows/CI.yml
vendored
11
.github/workflows/CI.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||||
- name: Save cache
|
- name: Save cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
id: cache
|
id: cache
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -69,11 +69,16 @@ jobs:
|
|||||||
@assert ENV["cache-hit"] == "true"
|
@assert ENV["cache-hit"] == "true"
|
||||||
env:
|
env:
|
||||||
cache-hit: ${{ steps.cache.outputs.cache-hit }}
|
cache-hit: ${{ steps.cache.outputs.cache-hit }}
|
||||||
- name: Check non-empty artifacts and packages dir
|
- name: Check existance or emptiness of affected dirs
|
||||||
shell: 'julia --color=yes {0}'
|
shell: 'julia --color=yes {0}'
|
||||||
run: |
|
run: |
|
||||||
|
# Artifacts and Packages should exist as they've been cached
|
||||||
artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts")
|
artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts")
|
||||||
@assert !isempty(readdir(artifacts_dir))
|
@assert !isempty(readdir(artifacts_dir))
|
||||||
packages_dir = joinpath(first(DEPOT_PATH), "packages")
|
packages_dir = joinpath(first(DEPOT_PATH), "packages")
|
||||||
@assert !isempty(readdir(packages_dir))
|
@assert !isempty(readdir(packages_dir))
|
||||||
|
|
||||||
|
# Caching the compiled dir is disabled by default and should not exist after restoring a cache
|
||||||
|
compiled_dir = joinpath(first(DEPOT_PATH), "compiled")
|
||||||
|
@assert !isdir(compiled_dir) || isempty(readdir(compiled_dir))
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ runs:
|
|||||||
echo "PRECOMPILATION_CACHE_PATH=$PCC_PATH" >> $GITHUB_ENV
|
echo "PRECOMPILATION_CACHE_PATH=$PCC_PATH" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/cache@4723a57e26efda3a62cbde1812113b730952852d
|
- uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0
|
||||||
id: cache
|
id: cache
|
||||||
with:
|
with:
|
||||||
path: "${{ format('{0}\n{1}\n{2}\n{3}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH, env.PRECOMPILATION_CACHE_PATH) }}"
|
path: "${{ format('{0}\n{1}\n{2}\n{3}', env.ARTIFACTS_PATH, env.PACKAGES_PATH, env.REGISTRIES_PATH, env.PRECOMPILATION_CACHE_PATH) }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user