@@ -14,16 +14,17 @@ jobs:
1414 fail-fast : false
1515 matrix :
1616 os : [ubuntu-latest]
17- ghc-ver : [9.8.1 , 9.6.4 ]
17+ ghc-ver : [9.8, 9.6]
1818 # Snapshots for 9.4.8, 9.2.8, 9.0.2, 8.10.7 do not have a recent enough base-compat; 0.13 is needed.
1919 # 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.
2020 # They used to work under ubuntu-20.04, but it is not worth the trouble maintaining them.
2121 # Apparently, HsOpenSSL-0.11.6 and older are too old for ubuntu-22.04.
2222 include :
2323 - os : macos-latest
24- ghc-ver : 9.8.1
24+ ghc-ver : 9.8
2525 - os : windows-latest
26- ghc-ver : 9.8.1
26+ ghc-ver : 9.8
27+
2728 env :
2829 ARGS : " --stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"
2930
@@ -35,13 +36,19 @@ jobs:
3536 - uses : actions/checkout@v4
3637
3738 - uses : haskell-actions/setup@v2
38- id : haskell- setup
39+ id : setup
3940 with :
4041 ghc-version : ${{ matrix.ghc-ver }}
4142 enable-stack : true
4243
44+ - name : Set up the openssl library (MacOS)
45+ if : runner.os == 'macOS'
46+ run : |
47+ echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
48+ echo "PKG_CONFIG_PATH=$(brew --prefix)/opt/openssl/lib/pkgconfig" >> "${GITHUB_ENV}"
49+
4350 - name : Install the brotli library (Windows)
44- if : ${{ runner.os == 'Windows' }}
51+ if : runner.os == 'Windows'
4552 # Andreas Abel, 2022-02-15:
4653 # Stack is packing an old version of MSYS2.
4754 # To work around certification problems, we need to update msys2-keyring.
@@ -52,24 +59,19 @@ jobs:
5259 stack exec ${{ env.ARGS }} -- pacman --noconfirm -S mingw-w64-x86_64-openssl
5360
5461 - name : Install the brotli library (Ubuntu)
55- if : ${{ runner.os == 'Linux' }}
62+ if : runner.os == 'Linux'
5663 run : |
5764 sudo apt-get update
5865 sudo apt-get install libbrotli-dev -qq
5966
60- - name : Set environment variables based on Haskell setup
61- run : |
62- STACK_VER=$(stack --numeric-version)
63- echo "STACK_VER=${STACK_VER}" >> "${GITHUB_ENV}"
64-
6567 - name : Cache dependencies (restore)
6668 uses : actions/cache/restore@v4
6769 id : cache
6870 with :
69- path : ${{ steps.haskell- setup.outputs.stack-root }}
71+ path : ${{ steps.setup.outputs.stack-root }}
7072 # Use a unique primary key (always save new cache); works if caches aren't to big or too many...
71- key : ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix. ghc-ver }}-commit-${{ github.sha }}
72- restore-keys : ${{ runner.os }}-stack-${{ env.STACK_VER }}-ghc-${{ matrix. ghc-ver }}-
73+ key : ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs. ghc-version }}-commit-${{ github.sha }}
74+ restore-keys : ${{ runner.os }}-stack-${{ steps.setup.outputs.stack-version }}-ghc-${{ steps.setup.outputs. ghc-version }}-
7375
7476 - name : Install dependencies
7577 # if: ${{ steps.cache.outputs.cache-hit != 'true' }}
8688
8789 - name : Cache dependencies (save)
8890 uses : actions/cache/save@v4
89- if : always()
91+ if : always() && steps.cache.outputs.cache-hit != 'true'
9092 # # Will fail if we already have a cache with this key (in this case, cache-hit is true).
91- # if: ${{ steps.cache.outputs.cache-hit != 'true' }}
9293 with :
93- path : ${{ steps.haskell- setup.outputs.stack-root }}
94+ path : ${{ steps.setup.outputs.stack-root }}
9495 key : ${{ steps.cache.outputs.cache-primary-key }}
0 commit comments