Skip to content

Commit a801b82

Browse files
committed
Cleanup, use GHC_FOR_RELEASE also in validate-old-ghcs
1 parent 32b2c49 commit a801b82

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

.github/workflows/validate.yml

+7-20
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,9 @@ jobs:
218218

219219
strategy:
220220
matrix:
221-
ghc: ['9.4.8']
222221
extra-ghc: ['8.4.4', '8.2.2', '8.0.2']
222+
## GHC 7.10.3 does not install on ubuntu-22.04 with ghcup.
223+
## Older GHCs are not supported by ghcup in the first place.
223224
fail-fast: false
224225

225226
steps:
@@ -231,32 +232,18 @@ jobs:
231232
sudo apt-get update
232233
sudo apt-get install libncurses5 libtinfo5
233234
234-
# # See https://github.com/haskell/cabal/pull/8739
235-
# - name: Sudo chmod to permit ghcup to update its cache
236-
# run: |
237-
# sudo ls -lah /usr/local/.ghcup/cache
238-
# sudo mkdir -p /usr/local/.ghcup/cache
239-
# sudo ls -lah /usr/local/.ghcup/cache
240-
# sudo chown -R $USER /usr/local/.ghcup
241-
# sudo chmod -R 777 /usr/local/.ghcup
242-
243235
- name: Install extra compiler
244236
run: ghcup install ghc ${{ matrix.extra-ghc }}
245237

246238
- name: GHCup logs
247239
if: always()
248240
run: cat /usr/local/.ghcup/logs/*
249241

250-
# - uses: haskell-actions/setup@v2
251-
# with:
252-
# ghc-version: ${{ matrix.extra-ghc }}
253-
# cabal-version: latest
254-
# cabal-update: false
255-
256-
- uses: haskell-actions/setup@v2
242+
- name: Install primary compiler
243+
uses: haskell-actions/setup@v2
257244
id: setup-haskell
258245
with:
259-
ghc-version: ${{ matrix.ghc }}
246+
ghc-version: ${{ env.GHC_FOR_RELEASE }}
260247
cabal-version: latest
261248

262249
- name: GHC versions
@@ -272,8 +259,8 @@ jobs:
272259
path: |
273260
${{ steps.setup-haskell.outputs.cabal-store }}
274261
dist-*
275-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
276-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
262+
key: ${{ runner.os }}-${{ env.GHC_FOR_RELEASE }}-${{ github.sha }}
263+
restore-keys: ${{ runner.os }}-${{ env.GHC_FOR_RELEASE }}-
277264

278265
- name: Validate build
279266
run: sh validate.sh ${{ env.COMMON_FLAGS }} -s build

0 commit comments

Comments
 (0)