mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
ci: Workaround for stack/pantry caching of github archives
Turns out `commit: master` doesn't really mean latest master, because it's cached. It sometimes works, because when the GHA cache comes from a job that depended on xmonad-0.15, then the master archive isn't cached and is fetched. When the cache comes from a job that previously fetched master, it's not fetched again. The least ugly way to fix it I found is to use the `[<refname>]@{<date>}` git revision format, and substitute current date/time before invoking stack. To make stack-master.yaml valid without the substitution, we use `master@{today}` which is a valid git revision that GitHub understands.
This commit is contained in:
parent
cef324795e
commit
17ef2b95db
4
.github/workflows/stack.yml
vendored
4
.github/workflows/stack.yml
vendored
@ -96,6 +96,10 @@ jobs:
|
|||||||
- name: Build and test
|
- name: Build and test
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
# workaround for stack/pantry caching of github archives
|
||||||
|
sed -e "s/@{today}/@{$(date -u --iso-8601=seconds)}/" -i ${{ matrix.yaml }}
|
||||||
|
|
||||||
stack test \
|
stack test \
|
||||||
--fast --no-terminal \
|
--fast --no-terminal \
|
||||||
--stack-yaml=${{ matrix.yaml }} \
|
--stack-yaml=${{ matrix.yaml }} \
|
||||||
|
@ -8,4 +8,4 @@ packages:
|
|||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- github: xmonad/xmonad
|
- github: xmonad/xmonad
|
||||||
commit: master
|
commit: master@{today}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user