From 1efd2691f66d4b9e57b612f83da4a5be1f3f321e Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Wed, 29 Mar 2023 14:38:47 -0400
Subject: [PATCH] Put back github actions cache restore

---
 .github/workflows/validate.yml | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index fbbbbc45b7..76534d63d9 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -57,20 +57,6 @@ jobs:
 
       - uses: actions/checkout@v3
 
-      #  See the following link for a breakdown of the following step
-      #  https://github.com/haskell/actions/issues/7#issuecomment-745697160
-      #
-      # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
-      - if: ${{ runner.os != 'Windows' }}
-        uses: actions/cache@v3
-        with:
-          # validate.sh uses a special build dir
-          path: |
-            ${{ steps.setup-haskell.outputs.cabal-store }}
-            dist-*
-          key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
-          restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
-
       # See https://github.com/haskell/cabal/pull/8739
       - name: Sudo chmod to permit ghcup to update its cache
         run: |
@@ -87,6 +73,21 @@ jobs:
           ghc-version: ${{ matrix.ghc }}
           cabal-version: '3.10.1.0'
 
+      #  actions/cache: see the following link for a breakdown of this step
+      #  https://github.com/haskell/actions/issues/7#issuecomment-745697160
+      #
+      # See https://github.com/haskell/cabal/pull/8739 for why Windows is excluded
+      #
+      - if: ${{ runner.os != 'Windows' }}
+        uses: actions/cache@v3
+        with:
+          # validate.sh uses a special build dir
+          path: |
+            ${{ steps.setup-haskell.outputs.cabal-store }}
+            dist-*
+          key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }}
+          restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419-
+
       - name: Work around git problem https://bugs.launchpad.net/ubuntu/+source/git/+bug/1993586 (cabal PR #8546)
         run: |
           git config --global protocol.file.allow always
-- 
GitLab