mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 09:26:53 +08:00
Unique cache-key for job matrix objects (#88)
* Unique cache-key for job matrix objects * Update workflow to use object in job matrix * Restore key should always match startswith * fixup! Unique cache-key for job matrix objects * Debug no-matrix * Tests require overriding workflow/job * Skip generating matrix_key when no matrix is used * Install jq for self-hosted runners * fixup! Install jq for self-hosted runners * Skip install when not needed * fixup! Skip install when not needed * fixup! Skip install when not needed * Improve `cache-name` description Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com> * Update description in README * Use actions/checkout@v4 in example * add missing period --------- Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
This commit is contained in:
18
.github/workflows/CI.yml
vendored
18
.github/workflows/CI.yml
vendored
@@ -36,7 +36,13 @@ jobs:
|
||||
needs: generate-key
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
dep:
|
||||
- name: pandoc_jll
|
||||
version: "3"
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macOS-latest
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
@@ -55,7 +61,7 @@ jobs:
|
||||
@assert !isdir(dir)
|
||||
- name: Install a small binary
|
||||
shell: 'julia --color=yes {0}'
|
||||
run: 'using Pkg; Pkg.add("pandoc_jll")'
|
||||
run: 'using Pkg; Pkg.add(PackageSpec(name="${{ matrix.dep.name }}", version="${{ matrix.dep.version }}"))'
|
||||
|
||||
# Do tests with no matrix also given the matrix is auto-included in cache key
|
||||
test-save-nomatrix:
|
||||
@@ -81,7 +87,13 @@ jobs:
|
||||
needs: [generate-key, test-save]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
dep:
|
||||
- name: pandoc_jll
|
||||
version: "3"
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macOS-latest
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user