88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.14.3
11+ # version: 0.19.20250821
1212#
13- # REGENDATA ("0.14.3 ",["github","reform-hsp.cabal"])
13+ # REGENDATA ("0.19.20250821 ",["github","reform-hsp.cabal"])
1414#
1515name : Haskell-CI
1616on :
17- - push
18- - pull_request
17+ push :
18+ branches :
19+ - master
20+ pull_request :
21+ branches :
22+ - master
1923jobs :
2024 linux :
2125 name : Haskell-CI - Linux - ${{ matrix.compiler }}
22- runs-on : ubuntu-18 .04
26+ runs-on : ubuntu-24 .04
2327 timeout-minutes :
2428 60
2529 container :
26- image : buildpack-deps:bionic
30+ image : buildpack-deps:jammy
2731 continue-on-error : ${{ matrix.allow-failure }}
2832 strategy :
2933 matrix :
3034 include :
31- - compiler : ghc-9.2.2
35+ - compiler : ghc-9.14.0.20250819
3236 compilerKind : ghc
33- compilerVersion : 9.2.2
37+ compilerVersion : 9.14.0.20250819
38+ setup-method : ghcup-prerelease
39+ allow-failure : false
40+ - compiler : ghc-9.12.2
41+ compilerKind : ghc
42+ compilerVersion : 9.12.2
43+ setup-method : ghcup
44+ allow-failure : false
45+ - compiler : ghc-9.10.2
46+ compilerKind : ghc
47+ compilerVersion : 9.10.2
48+ setup-method : ghcup
49+ allow-failure : false
50+ - compiler : ghc-9.8.4
51+ compilerKind : ghc
52+ compilerVersion : 9.8.4
53+ setup-method : ghcup
54+ allow-failure : false
55+ - compiler : ghc-9.6.7
56+ compilerKind : ghc
57+ compilerVersion : 9.6.7
58+ setup-method : ghcup
59+ allow-failure : false
60+ - compiler : ghc-9.4.8
61+ compilerKind : ghc
62+ compilerVersion : 9.4.8
63+ setup-method : ghcup
64+ allow-failure : false
65+ - compiler : ghc-9.2.8
66+ compilerKind : ghc
67+ compilerVersion : 9.2.8
3468 setup-method : ghcup
3569 allow-failure : false
3670 - compiler : ghc-9.0.2
@@ -46,64 +80,68 @@ jobs:
4680 - compiler : ghc-8.8.4
4781 compilerKind : ghc
4882 compilerVersion : 8.8.4
49- setup-method : hvr-ppa
83+ setup-method : ghcup
5084 allow-failure : false
5185 - compiler : ghc-8.6.5
5286 compilerKind : ghc
5387 compilerVersion : 8.6.5
54- setup-method : hvr-ppa
88+ setup-method : ghcup
5589 allow-failure : false
5690 - compiler : ghc-8.4.4
5791 compilerKind : ghc
5892 compilerVersion : 8.4.4
59- setup-method : hvr-ppa
93+ setup-method : ghcup
6094 allow-failure : false
6195 - compiler : ghc-8.2.2
6296 compilerKind : ghc
6397 compilerVersion : 8.2.2
64- setup-method : hvr-ppa
98+ setup-method : ghcup
6599 allow-failure : false
66100 - compiler : ghc-8.0.2
67101 compilerKind : ghc
68102 compilerVersion : 8.0.2
69- setup-method : hvr-ppa
70- allow-failure : false
71- - compiler : ghc-7.10.3
72- compilerKind : ghc
73- compilerVersion : 7.10.3
74- setup-method : hvr-ppa
75- allow-failure : false
76- - compiler : ghc-7.8.4
77- compilerKind : ghc
78- compilerVersion : 7.8.4
79- setup-method : hvr-ppa
80- allow-failure : false
81- - compiler : ghc-7.6.3
82- compilerKind : ghc
83- compilerVersion : 7.6.3
84- setup-method : hvr-ppa
103+ setup-method : ghcup
85104 allow-failure : false
86105 fail-fast : false
87106 steps :
88- - name : apt
107+ - name : apt-get install
89108 run : |
90109 apt-get update
91- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
92- if [ "${{ matrix.setup-method }}" = ghcup ]; then
93- mkdir -p "$HOME/.ghcup/bin"
94- curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
95- chmod a+x "$HOME/.ghcup/bin/ghcup"
96- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
97- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
98- else
99- apt-add-repository -y 'ppa:hvr/ghc'
100- apt-get update
101- apt-get install -y "$HCNAME"
102- mkdir -p "$HOME/.ghcup/bin"
103- curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
104- chmod a+x "$HOME/.ghcup/bin/ghcup"
105- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
106- fi
110+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
111+ - name : Install GHCup
112+ run : |
113+ mkdir -p "$HOME/.ghcup/bin"
114+ curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
115+ chmod a+x "$HOME/.ghcup/bin/ghcup"
116+ - name : Install cabal-install
117+ run : |
118+ "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120+ - name : Install GHC (GHCup)
121+ if : matrix.setup-method == 'ghcup'
122+ run : |
123+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
124+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
125+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
126+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
127+ echo "HC=$HC" >> "$GITHUB_ENV"
128+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
129+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
130+ env :
131+ HCKIND : ${{ matrix.compilerKind }}
132+ HCNAME : ${{ matrix.compiler }}
133+ HCVER : ${{ matrix.compilerVersion }}
134+ - name : Install GHC (GHCup prerelease)
135+ if : matrix.setup-method == 'ghcup-prerelease'
136+ run : |
137+ "$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
138+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
139+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
140+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
141+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
142+ echo "HC=$HC" >> "$GITHUB_ENV"
143+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
144+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
107145 env :
108146 HCKIND : ${{ matrix.compilerKind }}
109147 HCNAME : ${{ matrix.compiler }}
@@ -114,28 +152,12 @@ jobs:
114152 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
115153 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
116154 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
117- HCDIR=/opt/$HCKIND/$HCVER
118- if [ "${{ matrix.setup-method }}" = ghcup ]; then
119- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
120- echo "HC=$HC" >> "$GITHUB_ENV"
121- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
122- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
123- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
124- else
125- HC=$HCDIR/bin/$HCKIND
126- echo "HC=$HC" >> "$GITHUB_ENV"
127- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
128- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
129- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
130- fi
131-
132155 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
133156 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
134157 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
135158 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
136- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
159+ if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
137160 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
138- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
139161 env :
140162 HCKIND : ${{ matrix.compilerKind }}
141163 HCNAME : ${{ matrix.compiler }}
@@ -162,6 +184,18 @@ jobs:
162184 repository hackage.haskell.org
163185 url: http://hackage.haskell.org/
164186 EOF
187+ if $HEADHACKAGE; then
188+ cat >> $CABAL_CONFIG <<EOF
189+ repository head.hackage.ghc.haskell.org
190+ url: https://ghc.gitlab.haskell.org/head.hackage/
191+ secure: True
192+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
193+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
194+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
195+ key-threshold: 3
196+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
197+ EOF
198+ fi
165199 cat >> $CABAL_CONFIG <<EOF
166200 program-default-options
167201 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -178,14 +212,14 @@ jobs:
178212 - name : install cabal-plan
179213 run : |
180214 mkdir -p $HOME/.cabal/bin
181- curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2 .0/cabal-plan-0.6.2 .0-x86_64-linux.xz > cabal-plan.xz
182- echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
215+ curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3 .0/cabal-plan-0.7.3 .0-x86_64-linux.xz > cabal-plan.xz
216+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
183217 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
184218 rm -f cabal-plan.xz
185219 chmod a+x $HOME/.cabal/bin/cabal-plan
186220 cabal-plan --version
187221 - name : checkout
188- uses : actions/checkout@v2
222+ uses : actions/checkout@v4
189223 with :
190224 path : source
191225 - name : initial cabal.project for sdist
@@ -210,18 +244,21 @@ jobs:
210244 touch cabal.project.local
211245 echo "packages: ${PKGDIR_reform_hsp}" >> cabal.project
212246 if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package reform-hsp" >> cabal.project ; fi
213- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
247+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields " >> cabal.project ; fi
214248 cat >> cabal.project <<EOF
215249 EOF
216- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(reform-hsp)$/; }' >> cabal.project.local
250+ if $HEADHACKAGE; then
251+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
252+ fi
253+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(reform-hsp)$/; }' >> cabal.project.local
217254 cat cabal.project
218255 cat cabal.project.local
219256 - name : dump install plan
220257 run : |
221258 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
222259 cabal-plan
223- - name : cache
224- uses : actions/cache@v2
260+ - name : restore cache
261+ uses : actions/cache/restore@v4
225262 with :
226263 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
227264 path : ~/.cabal/store
@@ -242,8 +279,14 @@ jobs:
242279 ${CABAL} -vnormal check
243280 - name : haddock
244281 run : |
245- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
282+ $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
246283 - name : unconstrained build
247284 run : |
248285 rm -f cabal.project.local
249286 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
287+ - name : save cache
288+ if : always()
289+ uses : actions/cache/save@v4
290+ with :
291+ key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
292+ path : ~/.cabal/store
0 commit comments