@@ -135,7 +135,7 @@ jobs:
135
135
MATRIX="$(jq -c '.' <<EOF
136
136
{
137
137
# The first version in this list is the version to be used for release
138
- "ghc": ["9.8.2", "9. 10.1", "9.6.6"],
138
+ "ghc": ["9.10.1", "9.6.6"],
139
139
"cabal": ["3.12"],
140
140
"os": ["ubuntu-22.04"],
141
141
"use-freeze-file": ["false"],
@@ -153,7 +153,7 @@ jobs:
153
153
else
154
154
MATRIX="$(jq -c '.' <<EOF
155
155
{
156
- "ghc": ["9.8.2", "9. 10.1", "9.6.6"],
156
+ "ghc": ["9.10.1", "9.6.6"],
157
157
"cabal": ["3.12"],
158
158
"os": ["ubuntu-22.04"],
159
159
"use-freeze-file": ["false"],
@@ -247,9 +247,29 @@ jobs:
247
247
# done
248
248
249
249
# work around for https://github.com/haskell/actions/issues/187
250
- - name : Set permissions for .ghcup
251
- if : startsWith(matrix.os, 'ubuntu-')
252
- run : sudo chown -R $USER /usr/local/.ghcup
250
+ - uses : actions/cache/restore@v4
251
+ name : Restore ghc & cabal binaries cache
252
+ id : ghc-cabal-cache
253
+ env :
254
+ key : ${{ runner.os }}-ghc-cabal
255
+ with :
256
+ path : |
257
+ /home/runner/.ghcup
258
+ key : ${{ env.key }}-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('bin/cabal', 'bin/ghc') }}
259
+ restore-keys : ${{ env.key }}-${{ matrix.os }}-${{ matrix.ghc }}-
260
+
261
+ - uses : actions/cache/restore@v4
262
+ name : Restore dist-newstyle cache
263
+ id : cabal-dist-cache
264
+ with :
265
+ path : |
266
+ ~/.cabal/packages
267
+ ~/.cabal/store
268
+ dist-newstyle
269
+ key : ${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }}
270
+ restore-keys : |
271
+ ${{ matrix.os }}-${{ matrix.ghc }}-
272
+
253
273
- name : Install GHC and Cabal
254
274
id : setup
255
275
uses : haskell-actions/setup@v2
@@ -261,8 +281,19 @@ jobs:
261
281
echo "setup ghc-version: ${{ steps.setup.outputs.ghc-version }}"
262
282
echo "setup cabal-version: ${{ steps.setup.outputs.cabal-version }}"
263
283
echo "setup cabal-store: ${{ steps.setup.outputs.cabal-store }}"
284
+ which ghc
264
285
ghc --version
286
+ which cabal
265
287
cabal --version
288
+
289
+ - uses : actions/cache/save@v4
290
+ name : Cache ghc & cabal binaries
291
+ if : steps.ghc-cabal-cache.outputs.cache-hit != 'true'
292
+ with :
293
+ path : |
294
+ /home/runner/.ghcup
295
+ key : ${{ env.key }}-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('bin/cabal', 'bin/ghc') }}
296
+
266
297
- name : Install non-Haskell dependencies (ubuntu)
267
298
if : contains(matrix.os, 'ubuntu')
268
299
run : sudo apt-get install -y libgflags-dev liblz4-dev libzstd-dev libsnappy-dev libbz2-dev libmpfr-dev
@@ -317,15 +348,12 @@ jobs:
317
348
# dist cache
318
349
# the cache-key forces uploading of cache at least once a day, which ensures that
319
350
# upstream dependency changes are captured regularly.
320
- - uses : actions/cache@v4
321
- name : Cache dist-newstyle
351
+ - uses : actions/cache/save @v4
352
+ name : Save dist-newstyle cache
322
353
with :
323
354
path : |
324
355
dist-newstyle
325
- key : ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}-2-${{ hashFiles('cabal.*', '*.cabal', 'src/**', 'test/**') }}
326
- restore-keys : |
327
- ${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.use-freeze-file }}-2-
328
- ${{ matrix.os }}-${{ matrix.ghc }}-
356
+ key : ${{ steps.cabal-dist-cache.outputs.cache-primary-key }}
329
357
330
358
# Build
331
359
- name : Delete Freeze file if it exists
0 commit comments