diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2c63b386a4b..41673bfe424 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -206,19 +206,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 - - 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: | @@ -244,6 +231,17 @@ jobs: run: | git config --global protocol.file.allow always + # See the following link for a breakdown of the following step + # https://github.com/haskell/actions/issues/7#issuecomment-745697160 + - 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- + # The '+exe' constraint below is important, otherwise cabal-install # might decide to build the library but not the executable which is # what we need. @@ -347,17 +345,6 @@ jobs: git fetch origin $GITHUB_SHA:temporary-ci-branch git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA) - # As we are reusing the cached build dir from the previous step - # the generated artifacts are available here, - # including the cabal executable and the test suite - - uses: actions/cache@v3 - with: - path: | - ${{ steps.setup-haskell.outputs.cabal-store }} - dist-* - key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- - - name: Install extra compiler run: | apt-get update @@ -369,6 +356,17 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: latest # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133 + # As we are reusing the cached build dir from the previous step + # the generated artifacts are available here, + # including the cabal executable and the test suite + - uses: actions/cache@v3 + with: + path: | + ${{ steps.setup-haskell.outputs.cabal-store }} + dist-* + key: ${{ runner.os }}-${{ matrix.ghc }}-20220419-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-20220419- + - name: Install cabal-plan run: | cd $(mktemp -d)