Skip to content

Commit da9533c

Browse files
authored
Update CI (#546)
Use GHC 9.12.4 and drop compat code for 9.12.2. Switch to my haskell-ci fork, which: - Gives modern defaults. - Removes unnecessary hard-coded values. - Introduces concurrency group. - Introduces semaphore support. Default number of jobs is now 4 since that's what GHA Linux runners for public repositories offer (and 16 GB RAM, so the 3GB heap limit was outdated as well).
1 parent d3f5072 commit da9533c

15 files changed

Lines changed: 83 additions & 103 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#
77
# haskell-ci regenerate
88
#
9-
# For more information, see https://github.com/haskell-CI/haskell-ci
9+
# For more information, see https://github.com/arybczak/haskell-ci
1010
#
11-
# version: 0.19.20260104
11+
# version: 0.19.20260721
1212
#
13-
# REGENDATA ("0.19.20260104",["github","--config=cabal.haskell-ci","cabal.project"])
13+
# REGENDATA ("0.19.20260721",["github","--config=cabal.haskell-ci","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -23,6 +23,11 @@ on:
2323
merge_group:
2424
branches:
2525
- master
26+
workflow_dispatch:
27+
{}
28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: true
2631
jobs:
2732
linux:
2833
name: Haskell-CI - Linux - ${{ matrix.compiler }}
@@ -40,9 +45,9 @@ jobs:
4045
compilerVersion: 9.14.1
4146
setup-method: ghcup
4247
allow-failure: false
43-
- compiler: ghc-9.12.2
48+
- compiler: ghc-9.12.4
4449
compilerKind: ghc
45-
compilerVersion: 9.12.2
50+
compilerVersion: 9.12.4
4651
setup-method: ghcup
4752
allow-failure: false
4853
- compiler: ghc-9.10.3
@@ -113,8 +118,8 @@ jobs:
113118
chmod a+x "$HOME/.ghcup/bin/ghcup"
114119
- name: Install cabal-install
115120
run: |
116-
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
121+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
118123
- name: Install GHC (GHCup)
119124
if: matrix.setup-method == 'ghcup'
120125
run: |
@@ -167,9 +172,9 @@ jobs:
167172
repository hackage.haskell.org
168173
url: http://hackage.haskell.org/
169174
EOF
175+
if [ $((! GHCJSARITH && HCNUMVER >= 90800)) -ne 0 ] ; then echo "semaphore: True" >> $CABAL_CONFIG ; fi
170176
cat >> $CABAL_CONFIG <<EOF
171-
program-default-options
172-
ghc-options: $GHCJOBS +RTS -M3G -RTS
177+
jobs: 4
173178
EOF
174179
cat $CABAL_CONFIG
175180
- name: versions
@@ -199,7 +204,7 @@ jobs:
199204
chmod a+x $HOME/.cabal/bin/cabal-docspec
200205
cabal-docspec --version
201206
- name: checkout
202-
uses: actions/checkout@v5
207+
uses: actions/checkout@v7
203208
with:
204209
path: source
205210
- name: initial cabal.project for sdist
@@ -309,9 +314,27 @@ jobs:
309314
if [ $((! GHCJSARITH && HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
310315
if [ $((! GHCJSARITH && HCNUMVER >= 90000)) -ne 0 ] ; then echo "package metametapost" >> cabal.project ; fi
311316
if [ $((! GHCJSARITH && HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
317+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package optics" >> cabal.project ; fi
318+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
319+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package optics-core" >> cabal.project ; fi
320+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
321+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package optics-extra" >> cabal.project ; fi
322+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
323+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package optics-sop" >> cabal.project ; fi
324+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
325+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package optics-th" >> cabal.project ; fi
326+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
327+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package optics-vl" >> cabal.project ; fi
328+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
329+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package indexed-profunctors" >> cabal.project ; fi
330+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
331+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package template-haskell-optics" >> cabal.project ; fi
332+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
333+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo "package metametapost" >> cabal.project ; fi
334+
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 90800)) -ne 0 ] ; then echo " ghc-options: -j4" >> cabal.project ; fi
312335
cat >> cabal.project <<EOF
313-
allow-newer: indexed-traversable:base
314336
allow-newer: indexed-traversable-instances:base
337+
allow-newer: indexed-traversable:base
315338
allow-newer: indexed-traversable:containers
316339
allow-newer: these:base
317340
EOF
@@ -323,15 +346,15 @@ jobs:
323346
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
324347
cabal-plan
325348
- name: restore cache
326-
uses: actions/cache/restore@v4
349+
uses: actions/cache/restore@v5
327350
with:
328351
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
329352
path: ~/.cabal/store
330353
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
331354
- name: install dependencies
332355
run: |
333-
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
334-
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
356+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only all
357+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only all
335358
- name: build w/o tests
336359
run: |
337360
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
@@ -374,7 +397,7 @@ jobs:
374397
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
375398
- name: save cache
376399
if: always()
377-
uses: actions/cache/save@v4
400+
uses: actions/cache/save@v5
378401
with:
379402
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
380403
path: ~/.cabal/store

cabal.haskell-ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ tests: True
55
benchmarks: True
66
jobs-selection: uniform
77

8+
distribution:jammy
9+
810
-- turn head hackage off
911
head-hackage: False

indexed-profunctors/indexed-profunctors.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
synopsis: Utilities for indexed profunctors

metametapost/metametapost.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license: BSD-3-Clause
55
license-file: LICENSE
66
build-type: Simple
77
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
8-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
8+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
99
}
1010
GHCJS == { 8.4 }
1111
maintainer: oleg@well-typed.com

optics-core/optics-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
synopsis: Optics as an abstract interface: core definitions

optics-extra/optics-extra.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Andrzej Rybczak
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
synopsis: Extra utilities and instances for optics-core

optics-sop/optics-sop.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Adam Gundry, Andres Löh, Andrzej Rybczak
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
synopsis: Optics for generics-sop, and using generics-sop

optics-th/optics-th.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Andrzej Rybczak
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
synopsis: Optics construction using TemplateHaskell

optics-vl/optics-vl.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Andrzej Rybczak
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
synopsis: Utilities for compatibility with van Laarhoven optics

optics/optics.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-type: Simple
77
maintainer: optics@well-typed.com
88
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
99
tested-with: GHC == { 8.2.2, 8.4.4, 8.6.5, 8.8.4, 8.10.7, 9.0.2, 9.2.8
10-
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.2, 9.14.1
10+
, 9.4.8, 9.6.7, 9.8.4, 9.10.3, 9.12.4, 9.14.1
1111
}
1212
GHCJS == { 8.4 }
1313
GHCJS ==8.4

0 commit comments

Comments
 (0)