11# This GitHub workflow config has been generated by a script via
22#
3- # haskell-ci 'github' 'friendly. cabal'
3+ # haskell-ci 'github' 'cabal.project.ci '
44#
55# To regenerate the script (for example after adjusting tested-with) run
66#
77# haskell-ci regenerate
88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.17.20240109
11+ # version: 0.19.20250710
1212#
13- # REGENDATA ("0.17.20240109 ",["github","friendly. cabal"])
13+ # REGENDATA ("0.19.20250710 ",["github","cabal.project.ci "])
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-20 .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.8.1
35+ - compiler : ghc-9.12.2
3236 compilerKind : ghc
33- compilerVersion : 9.8.1
37+ compilerVersion : 9.12.2
3438 setup-method : ghcup
3539 allow-failure : false
36- - compiler : ghc-9.6.4
40+ - compiler : ghc-9.10.2
3741 compilerKind : ghc
38- compilerVersion : 9.6.4
42+ compilerVersion : 9.10.2
3943 setup-method : ghcup
4044 allow-failure : false
41- - compiler : ghc-9.4.8
45+ - compiler : ghc-9.8.4
4246 compilerKind : ghc
43- compilerVersion : 9.4.8
47+ compilerVersion : 9.8.4
4448 setup-method : ghcup
4549 allow-failure : false
46- - compiler : ghc-9.2.8
50+ - compiler : ghc-9.6.7
4751 compilerKind : ghc
48- compilerVersion : 9.2.8
52+ compilerVersion : 9.6.7
4953 setup-method : ghcup
5054 allow-failure : false
51- - compiler : ghc-9.0.2
55+ - compiler : ghc-9.4.8
5256 compilerKind : ghc
53- compilerVersion : 9.0.2
57+ compilerVersion : 9.4.8
5458 setup-method : ghcup
5559 allow-failure : false
56- - compiler : ghc-8.10.7
60+ - compiler : ghc-9.2.8
5761 compilerKind : ghc
58- compilerVersion : 8.10.7
62+ compilerVersion : 9.2.8
5963 setup-method : ghcup
6064 allow-failure : false
6165 fail-fast : false
6266 steps :
63- - name : apt
67+ - name : apt-get install
6468 run : |
6569 apt-get update
6670 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
71+ - name : Install GHCup
72+ run : |
6773 mkdir -p "$HOME/.ghcup/bin"
68- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0 /x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
74+ curl -sL https://downloads.haskell.org/ghcup/0.1.50.1 /x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
6975 chmod a+x "$HOME/.ghcup/bin/ghcup"
76+ - name : Install cabal-install
77+ run : |
78+ "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
79+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
80+ - name : Install GHC (GHCup)
81+ if : matrix.setup-method == 'ghcup'
82+ run : |
7083 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
71- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
84+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
85+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
86+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
87+ echo "HC=$HC" >> "$GITHUB_ENV"
88+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
89+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
7290 env :
7391 HCKIND : ${{ matrix.compilerKind }}
7492 HCNAME : ${{ matrix.compiler }}
@@ -79,21 +97,12 @@ jobs:
7997 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
8098 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
8199 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
82- HCDIR=/opt/$HCKIND/$HCVER
83- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
84- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
85- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
86- echo "HC=$HC" >> "$GITHUB_ENV"
87- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
88- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
89- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
90100 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
91101 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
92102 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
93103 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
94104 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
95105 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
96- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
97106 env :
98107 HCKIND : ${{ matrix.compilerKind }}
99108 HCNAME : ${{ matrix.compiler }}
@@ -143,7 +152,7 @@ jobs:
143152 chmod a+x $HOME/.cabal/bin/cabal-plan
144153 cabal-plan --version
145154 - name : checkout
146- uses : actions/checkout@v3
155+ uses : actions/checkout@v4
147156 with :
148157 path : source
149158 - name : initial cabal.project for sdist
@@ -168,18 +177,24 @@ jobs:
168177 touch cabal.project.local
169178 echo "packages: ${PKGDIR_friendly}" >> cabal.project
170179 echo "package friendly" >> cabal.project
171- echo " ghc-options: -Werror=missing-methods" >> cabal.project
180+ echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
181+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package friendly" >> cabal.project ; fi
182+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
183+ echo "package friendly" >> cabal.project
184+ echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project
172185 cat >> cabal.project <<EOF
186+ package friendly
187+ ghc-options: -Werror
173188 EOF
174- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(friendly)$/; }' >> cabal.project.local
189+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(friendly)$/; }' >> cabal.project.local
175190 cat cabal.project
176191 cat cabal.project.local
177192 - name : dump install plan
178193 run : |
179194 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
180195 cabal-plan
181196 - name : restore cache
182- uses : actions/cache/restore@v3
197+ uses : actions/cache/restore@v4
183198 with :
184199 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
185200 path : ~/.cabal/store
@@ -206,8 +221,8 @@ jobs:
206221 rm -f cabal.project.local
207222 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
208223 - name : save cache
209- uses : actions/cache/save@v3
210224 if : always()
225+ uses : actions/cache/save@v4
211226 with :
212227 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
213228 path : ~/.cabal/store
0 commit comments