ci: Prevent ~/.stack/pantry cache from being empty

When building with an LTS version that has exactly the dependencies we
need (xmonad-0.15), 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.
This commit is contained in:
Tomas Janousek
2021-05-23 23:41:02 +01:00
parent 96aae28641
commit d1a4820b55

View File

@@ -77,6 +77,12 @@ jobs:
stack-${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(matrix.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