@@ -14,15 +14,15 @@ jobs:
1414 fail-fast : false
1515 matrix :
1616 os : [ubuntu-latest]
17- ghc-ver : [9.6.3 , 9.4.8, 9.2.8, 9.0.2, 8.10.7]
17+ ghc-ver : [9.8.1, 9.6.4 , 9.4.8, 9.2.8, 9.0.2, 8.10.7]
1818 # On ubuntu-22.04 the old versions 8.8.4, 8.6.5, 8.4.4, 8.2.2 fail due to HsOpenSSL linking errors.
1919 # They used to work under ubuntu-20.04, but it is not worth the trouble maintaining them.
2020 # Apparently, HsOpenSSL-0.11.6 and older are too old for ubuntu-22.04.
2121 include :
2222 - os : macos-latest
23- ghc-ver : 9.6.3
23+ ghc-ver : 9.6.4
2424 - os : windows-latest
25- ghc-ver : 9.6.3
25+ ghc-ver : 9.6.4
2626 env :
2727 ARGS : " --stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
2828
4646 # To work around certification problems, we need to update msys2-keyring.
4747 run : |
4848 stack exec ${{ env.ARGS }} -- pacman --noconfirm -Sy msys2-keyring
49- stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkg-config
49+ stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-pkgconf
5050 stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-brotli
5151 stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-openssl
5252
@@ -62,30 +62,32 @@ jobs:
6262 echo "STACK_VER=${STACK_VER}" >> "${GITHUB_ENV}"
6363
6464 - name : Cache dependencies (restore)
65- uses : actions/cache/restore@v3
65+ uses : actions/cache/restore@v4
6666 id : cache
6767 with :
6868 path : ${{ steps.haskell-setup.outputs.stack-root }}
69- key : ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-${{ hashFiles(format('stack-{0}.yaml', matrix.ghc-ver)) }}
69+ # Use a unique primary key (always save new cache); works if caches aren't to big or too many...
70+ key : ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-commit-${{ github.sha }}
7071 restore-keys : ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix.ghc-ver }}-
7172
7273 - name : Install dependencies
73- if : ${{ steps.cache.outputs.cache-hit != 'true' }}
74+ # if: ${{ steps.cache.outputs.cache-hit != 'true' }}
7475 run : |
7576 stack build ${{ env.ARGS }} --test --only-dependencies
7677
77- - name : Cache dependencies (save)
78- uses : actions/cache/save@v3
79- # Will fail if we already have a cache with this key (in this case, cache-hit is true).
80- if : ${{ steps.cache.outputs.cache-hit != 'true' }}
81- with :
82- path : ${{ steps.haskell-setup.outputs.stack-root }}
83- key : ${{ steps.cache.outputs.cache-primary-key }}
84-
8578 - name : Build hackage-cli
8679 run : |
8780 stack build ${{ env.ARGS }}
8881
8982 - name : Test hackage-cli
9083 run : |
9184 stack test ${{ env.ARGS }}
85+
86+ - name : Cache dependencies (save)
87+ uses : actions/cache/save@v4
88+ if : always()
89+ # # Will fail if we already have a cache with this key (in this case, cache-hit is true).
90+ # if: ${{ steps.cache.outputs.cache-hit != 'true' }}
91+ with :
92+ path : ${{ steps.haskell-setup.outputs.stack-root }}
93+ key : ${{ steps.cache.outputs.cache-primary-key }}
0 commit comments