Skip to content

Commit 3f0d9a1

Browse files
committed
CI: no need to restore cache before setup-haskell
undo 6bd17fc from #8844; the change was made in response to an issue that was later fixed on the haskell/action side
1 parent dc501bb commit 3f0d9a1

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

.github/workflows/validate.yml

+22-24
Original file line numberDiff line numberDiff line change
@@ -206,19 +206,6 @@ jobs:
206206

207207
- uses: actions/checkout@v3
208208

209-
# See the following link for a breakdown of the following step
210-
# https://github.com/haskell/actions/issues/7#issuecomment-745697160
211-
#
212-
# See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
213-
- uses: actions/cache@v3
214-
with:
215-
# validate.sh uses a special build dir
216-
path: |
217-
${{ steps.setup-haskell.outputs.cabal-store }}
218-
dist-*
219-
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
220-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
221-
222209
# See https://github.com/haskell/cabal/pull/8739
223210
- name: Sudo chmod to permit ghcup to update its cache
224211
run: |
@@ -244,6 +231,17 @@ jobs:
244231
run: |
245232
git config --global protocol.file.allow always
246233
234+
# See the following link for a breakdown of the following step
235+
# https://github.com/haskell/actions/issues/7#issuecomment-745697160
236+
- uses: actions/cache@v3
237+
with:
238+
# validate.sh uses a special build dir
239+
path: |
240+
${{ steps.setup-haskell.outputs.cabal-store }}
241+
dist-*
242+
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
243+
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
244+
247245
# The '+exe' constraint below is important, otherwise cabal-install
248246
# might decide to build the library but not the executable which is
249247
# what we need.
@@ -347,17 +345,6 @@ jobs:
347345
git fetch origin $GITHUB_SHA:temporary-ci-branch
348346
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
349347
350-
# As we are reusing the cached build dir from the previous step
351-
# the generated artifacts are available here,
352-
# including the cabal executable and the test suite
353-
- uses: actions/cache@v3
354-
with:
355-
path: |
356-
${{ steps.setup-haskell.outputs.cabal-store }}
357-
dist-*
358-
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
359-
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
360-
361348
- name: Install extra compiler
362349
run: |
363350
apt-get update
@@ -369,6 +356,17 @@ jobs:
369356
ghc-version: ${{ matrix.ghc }}
370357
cabal-version: latest # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133
371358

359+
# As we are reusing the cached build dir from the previous step
360+
# the generated artifacts are available here,
361+
# including the cabal executable and the test suite
362+
- uses: actions/cache@v3
363+
with:
364+
path: |
365+
${{ steps.setup-haskell.outputs.cabal-store }}
366+
dist-*
367+
key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
368+
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
369+
372370
- name: Install cabal-plan
373371
run: |
374372
cd $(mktemp -d)

0 commit comments

Comments
 (0)