57
57
58
58
- uses : actions/checkout@v3
59
59
60
+ - uses : haskell/actions/setup@v2
61
+ id : setup-haskell
62
+ with :
63
+ ghc-version : ${{ matrix.ghc }}
64
+ cabal-version : ' 3.10.1.0'
65
+
60
66
# See the following link for a breakdown of the following step
61
67
# https://github.com/haskell/actions/issues/7#issuecomment-745697160
62
68
- uses : actions/cache@v3
68
74
key : ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
69
75
restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-20220419-
70
76
71
- - uses : haskell/actions/setup@v2
72
- id : setup-haskell
73
- with :
74
- ghc-version : ${{ matrix.ghc }}
75
- cabal-version : ' 3.10.1.0'
76
-
77
77
# The '+exe' constraint below is important, otherwise cabal-install
78
78
# might decide to build the library but not the executable which is
79
79
# what we need.
@@ -202,19 +202,6 @@ jobs:
202
202
203
203
- uses : actions/checkout@v3
204
204
205
- # See the following link for a breakdown of the following step
206
- # https://github.com/haskell/actions/issues/7#issuecomment-745697160
207
- #
208
- # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
209
- - uses : actions/cache@v3
210
- with :
211
- # validate.sh uses a special build dir
212
- path : |
213
- ${{ steps.setup-haskell.outputs.cabal-store }}
214
- dist-*
215
- key : ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
216
- restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-20220419-
217
-
218
205
# See https://github.com/haskell/cabal/pull/8739
219
206
- name : Sudo chmod to permit ghcup to update its cache
220
207
run : |
@@ -236,6 +223,19 @@ jobs:
236
223
ghc --version
237
224
cabal update
238
225
226
+ # See the following link for a breakdown of the following step
227
+ # https://github.com/haskell/actions/issues/7#issuecomment-745697160
228
+ #
229
+ # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
230
+ - uses : actions/cache@v3
231
+ with :
232
+ # validate.sh uses a special build dir
233
+ path : |
234
+ ${{ steps.setup-haskell.outputs.cabal-store }}
235
+ dist-*
236
+ key : ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
237
+ restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-20220419-
238
+
239
239
# The '+exe' constraint below is important, otherwise cabal-install
240
240
# might decide to build the library but not the executable which is
241
241
# what we need.
@@ -339,17 +339,6 @@ jobs:
339
339
git fetch origin $GITHUB_SHA:temporary-ci-branch
340
340
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
341
341
342
- # As we are reusing the cached build dir from the previous step
343
- # the generated artifacts are available here,
344
- # including the cabal executable and the test suite
345
- - uses : actions/cache@v3
346
- with :
347
- path : |
348
- ${{ steps.setup-haskell.outputs.cabal-store }}
349
- dist-*
350
- key : ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
351
- restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-20220419-
352
-
353
342
- name : Install extra compiler
354
343
run : |
355
344
apt-get update
@@ -361,6 +350,17 @@ jobs:
361
350
ghc-version : ${{ matrix.ghc }}
362
351
cabal-version : latest # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133
363
352
353
+ # As we are reusing the cached build dir from the previous step
354
+ # the generated artifacts are available here,
355
+ # including the cabal executable and the test suite
356
+ - uses : actions/cache@v3
357
+ with :
358
+ path : |
359
+ ${{ steps.setup-haskell.outputs.cabal-store }}
360
+ dist-*
361
+ key : ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
362
+ restore-keys : ${{ runner.os }}-${{ matrix.ghc }}-20220419-
363
+
364
364
- name : Install cabal-plan
365
365
run : |
366
366
cd $(mktemp -d)
0 commit comments