;ci: add a date to cache ids for cache-busting
This commit is contained in:
parent
012fc416b0
commit
8da36b4397
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -50,8 +50,9 @@ jobs:
|
|||||||
# image: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
|
# image: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
|
||||||
|
|
||||||
env:
|
env:
|
||||||
stack: stack
|
stack: stack
|
||||||
ghc: 9.10.1
|
ghc: 9.10.1
|
||||||
|
cachedate: 20250615 # bump this when new caches are needed
|
||||||
|
|
||||||
# flag for skipping later steps, declared here to prevent "Context access might be invalid" warnings
|
# flag for skipping later steps, declared here to prevent "Context access might be invalid" warnings
|
||||||
do-all:
|
do-all:
|
||||||
@ -150,9 +151,9 @@ jobs:
|
|||||||
# XXX if stack.yaml is a symlink, this fails with
|
# XXX if stack.yaml is a symlink, this fails with
|
||||||
# Error: The template is not valid. .github/workflows/push.yml (Line: 103, Col: 14): hashFiles('**.yaml') failed.
|
# Error: The template is not valid. .github/workflows/push.yml (Line: 103, Col: 14): hashFiles('**.yaml') failed.
|
||||||
# Fail to hash files under directory '/home/runner/work/hledger/hledger'
|
# Fail to hash files under directory '/home/runner/work/hledger/hledger'
|
||||||
key: ${{ runner.os }}-x64-stack-global-${{ env.ghc }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-x64-stack-global-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-stack-global-${{ env.ghc }}
|
${{ runner.os }}-x64-stack-global-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
- name: Cache - stack-installed programs in ~/.local/bin
|
- name: Cache - stack-installed programs in ~/.local/bin
|
||||||
@ -160,54 +161,54 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ~/.local/bin
|
path: ~/.local/bin
|
||||||
key: ${{ runner.os }}-x64-stack-programs-${{ env.ghc }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-x64-stack-programs-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-stack-programs-${{ env.ghc }}
|
${{ runner.os }}-x64-stack-programs-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
- name: Cache - .stack-work
|
- name: Cache - .stack-work
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .stack-work
|
path: .stack-work
|
||||||
key: ${{ runner.os }}-x64-stack-work-${{ env.ghc }}-${{ hashFiles('**.yaml') }}
|
key: ${{ runner.os }}-x64-stack-work-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('**.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-stack-work-${{ env.ghc }}
|
${{ runner.os }}-x64-stack-work-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
- name: Cache - hledger-lib/.stack-work
|
- name: Cache - hledger-lib/.stack-work
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: hledger-lib/.stack-work
|
path: hledger-lib/.stack-work
|
||||||
key: ${{ runner.os }}-x64-hledger-lib-stack-work-${{ env.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
key: ${{ runner.os }}-x64-hledger-lib-stack-work-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-hledger-lib-stack-work-${{ env.ghc }}
|
${{ runner.os }}-x64-hledger-lib-stack-work-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
- name: Cache - hledger/.stack-work
|
- name: Cache - hledger/.stack-work
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: hledger/.stack-work
|
path: hledger/.stack-work
|
||||||
key: ${{ runner.os }}-x64-hledger-stack-work-${{ env.ghc }}-${{ hashFiles('hledger/package.yaml') }}
|
key: ${{ runner.os }}-x64-hledger-stack-work-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('hledger/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-hledger-stack-work-${{ env.ghc }}
|
${{ runner.os }}-x64-hledger-stack-work-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
- name: Cache - hledger-ui/.stack-work
|
- name: Cache - hledger-ui/.stack-work
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: hledger-ui/.stack-work
|
path: hledger-ui/.stack-work
|
||||||
key: ${{ runner.os }}-x64-hledger-ui-stack-work-${{ env.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
key: ${{ runner.os }}-x64-hledger-ui-stack-work-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-hledger-ui-stack-work-${{ env.ghc }}
|
${{ runner.os }}-x64-hledger-ui-stack-work-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
- name: Cache - hledger-web/.stack-work
|
- name: Cache - hledger-web/.stack-work
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: hledger-web/.stack-work
|
path: hledger-web/.stack-work
|
||||||
key: ${{ runner.os }}-x64-hledger-web-stack-work-${{ env.ghc }}-${{ hashFiles('hledger-web/package.yaml') }}
|
key: ${{ runner.os }}-x64-hledger-web-stack-work-${{ env.ghc }}-${{ env.cachedate }}-${{ hashFiles('hledger-web/package.yaml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-x64-hledger-web-stack-work-${{ env.ghc }}
|
${{ runner.os }}-x64-hledger-web-stack-work-${{ env.ghc }}-${{ env.cachedate }}
|
||||||
if: env.do-all
|
if: env.do-all
|
||||||
|
|
||||||
# Ensure the ghc version we need is installed.
|
# Ensure the ghc version we need is installed.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user