Skip to content

Commit

Permalink
CI: fix cached LTS map not setting resolver [kick 11]
Browse files Browse the repository at this point in the history
  • Loading branch information
ulidtko committed Nov 22, 2024
1 parent e0d0b4a commit fcb6a6a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/stack-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ jobs:
- name: ~/.stack cache diagnostics
run: du -csh -t 64k ~/.stack/*

- name: Configure Stack
run: |
stack config set system-ghc true --global
stack config set install-ghc false --global
#-- for the matrix, we'll need a map GHC version -> Stack LTS resolver
- name: Cached LTS-GHC map
id: ltsmap
Expand All @@ -102,13 +97,19 @@ jobs:
run: |
timeout 50 .github/scripts/stackage-lts-map.py \
| sort -n | tee lts-resolver-map.yaml
- name: Configure Stack
run: |
#-- set resolver tag based on GHC version from the matrix
selected="$(yq '.["${{ matrix.ghc }}"]' lts-resolver-map.yaml)"
test -z $selected -o $selected == null && {
echo "Could not find LTS snapshot for GHC version ${{ matrix.ghc }}"
echo "Version map:"; cat lts-resolver-map.yaml
exit 1
} >&2
stack config set resolver $selected
stack config set system-ghc true --global
stack config set install-ghc false --global
#-- not much deps in this package; however Cabal is a large one. cache, too

Expand Down

0 comments on commit fcb6a6a

Please sign in to comment.