88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.16
11+ # version: 0.19.20260331
1212#
13- # REGENDATA ("0.16 ",["github","--benchmarks-jobs= < 9.2","newtype-generics.cabal","--branches=master"])
13+ # REGENDATA ("0.19.20260331 ",["github","--benchmarks-jobs= < 9.2","newtype-generics.cabal","--branches=master"])
1414#
1515name : Haskell-CI
1616on :
2020 pull_request :
2121 branches :
2222 - master
23+ merge_group :
24+ branches :
25+ - master
26+ workflow_dispatch :
27+ {}
2328jobs :
2429 linux :
2530 name : Haskell-CI - Linux - ${{ matrix.compiler }}
26- runs-on : ubuntu-20 .04
31+ runs-on : ubuntu-24 .04
2732 timeout-minutes :
2833 60
2934 container :
30- image : buildpack-deps:bionic
35+ image : buildpack-deps:jammy
3136 continue-on-error : ${{ matrix.allow-failure }}
3237 strategy :
3338 matrix :
3439 include :
35- - compiler : ghc-9.6 .1
40+ - compiler : ghc-9.14 .1
3641 compilerKind : ghc
37- compilerVersion : 9.6 .1
42+ compilerVersion : 9.14 .1
3843 setup-method : ghcup
3944 allow-failure : false
40- - compiler : ghc-9.4.2
45+ - compiler : ghc-9.12.4
4146 compilerKind : ghc
42- compilerVersion : 9.4.2
47+ compilerVersion : 9.12.4
4348 setup-method : ghcup
4449 allow-failure : false
45- - compiler : ghc-9.2.1
50+ - compiler : ghc-9.10.3
4651 compilerKind : ghc
47- compilerVersion : 9.2.1
52+ compilerVersion : 9.10.3
4853 setup-method : ghcup
4954 allow-failure : false
50- - compiler : ghc-9.0.1
55+ - compiler : ghc-9.8.4
5156 compilerKind : ghc
52- compilerVersion : 9.0.1
53- setup-method : hvr-ppa
54- allow-failure : false
55- - compiler : ghc-8.10.4
56- compilerKind : ghc
57- compilerVersion : 8.10.4
58- setup-method : hvr-ppa
57+ compilerVersion : 9.8.4
58+ setup-method : ghcup
5959 allow-failure : false
60- - compiler : ghc-8.8.4
60+ - compiler : ghc-9.6.7
6161 compilerKind : ghc
62- compilerVersion : 8.8.4
63- setup-method : hvr-ppa
62+ compilerVersion : 9.6.7
63+ setup-method : ghcup
6464 allow-failure : false
65- - compiler : ghc-8.6.5
65+ - compiler : ghc-9.4.2
6666 compilerKind : ghc
67- compilerVersion : 8.6.5
68- setup-method : hvr-ppa
67+ compilerVersion : 9.4.2
68+ setup-method : ghcup
6969 allow-failure : false
70- - compiler : ghc-8.4.4
70+ - compiler : ghc-9.2.1
7171 compilerKind : ghc
72- compilerVersion : 8.4.4
73- setup-method : hvr-ppa
72+ compilerVersion : 9.2.1
73+ setup-method : ghcup
7474 allow-failure : false
75- - compiler : ghc-8.2.2
75+ - compiler : ghc-9.0.1
7676 compilerKind : ghc
77- compilerVersion : 8.2.2
78- setup-method : hvr-ppa
77+ compilerVersion : 9.0.1
78+ setup-method : ghcup
7979 allow-failure : false
80- - compiler : ghc-8.0.2
80+ - compiler : ghc-8.10.7
8181 compilerKind : ghc
82- compilerVersion : 8.0.2
83- setup-method : hvr-ppa
82+ compilerVersion : 8.10.7
83+ setup-method : ghcup
8484 allow-failure : false
8585 fail-fast : false
8686 steps :
87- - name : apt
87+ - name : apt-get install
8888 run : |
8989 apt-get update
9090 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91- if [ "${{ matrix.setup-method }}" = ghcup ]; then
92- mkdir -p "$HOME/.ghcup/bin"
93- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
94- chmod a+x "$HOME/.ghcup/bin/ghcup"
95- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97- else
98- apt-add-repository -y 'ppa:hvr/ghc'
99- apt-get update
100- apt-get install -y "$HCNAME"
101- mkdir -p "$HOME/.ghcup/bin"
102- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
103- chmod a+x "$HOME/.ghcup/bin/ghcup"
104- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105- fi
91+ - name : Install GHCup
92+ run : |
93+ mkdir -p "$HOME/.ghcup/bin"
94+ curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
95+ chmod a+x "$HOME/.ghcup/bin/ghcup"
96+ - name : Install cabal-install
97+ run : |
98+ "$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
100+ - name : Install GHC (GHCup)
101+ if : matrix.setup-method == 'ghcup'
102+ run : |
103+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
104+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107+ echo "HC=$HC" >> "$GITHUB_ENV"
108+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
106110 env :
107111 HCKIND : ${{ matrix.compilerKind }}
108112 HCNAME : ${{ matrix.compiler }}
@@ -113,28 +117,12 @@ jobs:
113117 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
114118 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
115119 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
116- HCDIR=/opt/$HCKIND/$HCVER
117- if [ "${{ matrix.setup-method }}" = ghcup ]; then
118- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
119- echo "HC=$HC" >> "$GITHUB_ENV"
120- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
121- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
122- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
123- else
124- HC=$HCDIR/bin/$HCKIND
125- echo "HC=$HC" >> "$GITHUB_ENV"
126- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
127- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
128- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
129- fi
130-
131120 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
132121 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
133122 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
134123 if [ $((HCNUMVER < 90200)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" ; else echo "ARG_BENCH=--disable-benchmarks" >> "$GITHUB_ENV" ; fi
135124 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
136125 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
137- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
138126 env :
139127 HCKIND : ${{ matrix.compilerKind }}
140128 HCNAME : ${{ matrix.compiler }}
@@ -184,7 +172,7 @@ jobs:
184172 chmod a+x $HOME/.cabal/bin/cabal-plan
185173 cabal-plan --version
186174 - name : checkout
187- uses : actions/checkout@v3
175+ uses : actions/checkout@v5
188176 with :
189177 path : source
190178 - name : initial cabal.project for sdist
@@ -208,19 +196,23 @@ jobs:
208196 touch cabal.project
209197 touch cabal.project.local
210198 echo "packages: ${PKGDIR_newtype_generics}" >> cabal.project
211- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package newtype-generics" >> cabal.project ; fi
212- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
199+ echo "package newtype-generics" >> cabal.project
200+ echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
201+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package newtype-generics" >> cabal.project ; fi
202+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
203+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package newtype-generics" >> cabal.project ; fi
204+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
213205 cat >> cabal.project <<EOF
214206 EOF
215- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(newtype-generics)$/; }' >> cabal.project.local
207+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(newtype-generics)$/; }' >> cabal.project.local
216208 cat cabal.project
217209 cat cabal.project.local
218210 - name : dump install plan
219211 run : |
220212 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
221213 cabal-plan
222214 - name : restore cache
223- uses : actions/cache/restore@v3
215+ uses : actions/cache/restore@v4
224216 with :
225217 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
226218 path : ~/.cabal/store
@@ -250,8 +242,8 @@ jobs:
250242 rm -f cabal.project.local
251243 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
252244 - name : save cache
253- uses : actions/cache/save@v3
254245 if : always()
246+ uses : actions/cache/save@v4
255247 with :
256248 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
257249 path : ~/.cabal/store
0 commit comments