88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.19.20240708
11+ # version: 0.19.20250722
1212#
13- # REGENDATA ("0.19.20240708 ",["github","cabal.project"])
13+ # REGENDATA ("0.19.20250722 ",["github","cabal.project"])
1414#
1515name : Haskell-CI
1616on :
2323jobs :
2424 linux :
2525 name : Haskell-CI - Linux - ${{ matrix.compiler }}
26- runs-on : ubuntu-20 .04
26+ runs-on : ubuntu-24 .04
2727 timeout-minutes :
2828 60
2929 container :
@@ -38,19 +38,24 @@ jobs:
3838 strategy :
3939 matrix :
4040 include :
41- - compiler : ghc-9.10.1
41+ - compiler : ghc-9.12.2
4242 compilerKind : ghc
43- compilerVersion : 9.10.1
43+ compilerVersion : 9.12.2
4444 setup-method : ghcup
4545 allow-failure : false
46- - compiler : ghc-9.8 .2
46+ - compiler : ghc-9.10 .2
4747 compilerKind : ghc
48- compilerVersion : 9.8 .2
48+ compilerVersion : 9.10 .2
4949 setup-method : ghcup
5050 allow-failure : false
51- - compiler : ghc-9.6.6
51+ - compiler : ghc-9.8.4
5252 compilerKind : ghc
53- compilerVersion : 9.6.6
53+ compilerVersion : 9.8.4
54+ setup-method : ghcup
55+ allow-failure : false
56+ - compiler : ghc-9.6.7
57+ compilerKind : ghc
58+ compilerVersion : 9.6.7
5459 setup-method : ghcup
5560 allow-failure : false
5661 - compiler : ghc-9.4.8
@@ -85,15 +90,29 @@ jobs:
8590 allow-failure : false
8691 fail-fast : false
8792 steps :
88- - name : apt
93+ - name : apt-get install
8994 run : |
9095 apt-get update
9196 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
97+ - name : Install GHCup
98+ run : |
9299 mkdir -p "$HOME/.ghcup/bin"
93- curl -sL https://downloads.haskell.org/ghcup/0.1.30.0 /x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
100+ curl -sL https://downloads.haskell.org/ghcup/0.1.50.1 /x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
94101 chmod a+x "$HOME/.ghcup/bin/ghcup"
102+ - name : Install cabal-install
103+ run : |
104+ "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
106+ - name : Install GHC (GHCup)
107+ if : matrix.setup-method == 'ghcup'
108+ run : |
95109 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96- "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
110+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
111+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
112+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
113+ echo "HC=$HC" >> "$GITHUB_ENV"
114+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
115+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
97116 env :
98117 HCKIND : ${{ matrix.compilerKind }}
99118 HCNAME : ${{ matrix.compiler }}
@@ -104,21 +123,12 @@ jobs:
104123 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
105124 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
106125 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
107- HCDIR=/opt/$HCKIND/$HCVER
108- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
109- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
110- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
111- echo "HC=$HC" >> "$GITHUB_ENV"
112- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
113- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
114- echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115126 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
116127 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
117128 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
118129 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
119130 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
120131 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
121- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
122132 env :
123133 HCKIND : ${{ matrix.compilerKind }}
124134 HCNAME : ${{ matrix.compiler }}
@@ -193,7 +203,11 @@ jobs:
193203 touch cabal.project.local
194204 echo "packages: ${PKGDIR_postgresql_simple}" >> cabal.project
195205 echo "package postgresql-simple" >> cabal.project
196- echo " ghc-options: -Werror=missing-methods" >> cabal.project
206+ echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
207+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package postgresql-simple" >> cabal.project ; fi
208+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
209+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package postgresql-simple" >> cabal.project ; fi
210+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
197211 cat >> cabal.project <<EOF
198212 EOF
199213 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(postgresql-simple)$/; }' >> cabal.project.local
@@ -234,8 +248,8 @@ jobs:
234248 rm -f cabal.project.local
235249 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
236250 - name : save cache
237- uses : actions/cache/save@v4
238251 if : always()
252+ uses : actions/cache/save@v4
239253 with :
240254 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
241255 path : ~/.cabal/store
0 commit comments