Skip to content

Commit

Permalink
ci: Prevent ~/.stack/pantry cache from being empty
Browse files Browse the repository at this point in the history
When building with an LTS version that has exactly the dependencies we
need (X11-1.9.2), stack doesn't need to download the Hackage index. If
GitHub Actions cache locking chooses this job as the one that writes the
cache, then the "stack-pantry-Linux" cache entry stays empty, possibly
forever.

Force Hackage index update to prevent this from happening.

Related: xmonad/xmonad-contrib@d1a4820
  • Loading branch information
liskin committed May 24, 2021
1 parent 9e5b16e commit e8bfc5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ jobs:
stack-${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles('stack.yaml') }}-
stack-${{ runner.os }}-${{ matrix.resolver }}-
- name: Update hackage index
# always update index to prevent the shared ~/.stack/pantry cache from being empty
run: |
set -ex
stack update
- name: Build and test
run: |
set -ex
Expand Down

0 comments on commit e8bfc5b

Please sign in to comment.