88# 
99#  For more information, see https://github.com/haskell-CI/haskell-ci
1010# 
11- #  version: 0.16.6 
11+ #  version: 0.19.20241202 
1212# 
13- #  REGENDATA ("0.16.6 ",["github","vty.cabal"])
13+ #  REGENDATA ("0.19.20241202 ",["github","vty.cabal"])
1414# 
1515name : Haskell-CI 
1616on :
@@ -23,19 +23,34 @@ jobs:
2323    timeout-minutes :
2424      60 
2525    container :
26-       image : buildpack-deps:bionic  
26+       image : buildpack-deps:jammy  
2727    continue-on-error : ${{ matrix.allow-failure }} 
2828    strategy :
2929      matrix :
3030        include :
31-           - compiler : ghc-9.6.2  
31+           - compiler : ghc-9.12.0.20241128  
3232            compilerKind : ghc 
33-             compilerVersion : 9.6.2 
33+             compilerVersion : 9.12.0.20241128 
34+             setup-method : ghcup-prerelease 
35+             allow-failure : false 
36+           - compiler : ghc-9.10.1 
37+             compilerKind : ghc 
38+             compilerVersion : 9.10.1 
39+             setup-method : ghcup 
40+             allow-failure : false 
41+           - compiler : ghc-9.8.4 
42+             compilerKind : ghc 
43+             compilerVersion : 9.8.4 
44+             setup-method : ghcup 
45+             allow-failure : false 
46+           - compiler : ghc-9.6.6 
47+             compilerKind : ghc 
48+             compilerVersion : 9.6.6 
3449            setup-method : ghcup 
3550            allow-failure : false 
36-           - compiler : ghc-9.4.5  
51+           - compiler : ghc-9.4.8  
3752            compilerKind : ghc 
38-             compilerVersion : 9.4.5  
53+             compilerVersion : 9.4.8  
3954            setup-method : ghcup 
4055            allow-failure : false 
4156          - compiler : ghc-9.2.8 
@@ -56,49 +71,68 @@ jobs:
5671          - compiler : ghc-8.8.4 
5772            compilerKind : ghc 
5873            compilerVersion : 8.8.4 
59-             setup-method : hvr-ppa 
74+             setup-method : ghcup 
6075            allow-failure : false 
6176          - compiler : ghc-8.6.5 
6277            compilerKind : ghc 
6378            compilerVersion : 8.6.5 
64-             setup-method : hvr-ppa 
79+             setup-method : ghcup 
6580            allow-failure : false 
6681          - compiler : ghc-8.4.3 
6782            compilerKind : ghc 
6883            compilerVersion : 8.4.3 
69-             setup-method : hvr-ppa 
84+             setup-method : ghcup 
7085            allow-failure : false 
7186          - compiler : ghc-8.2.2 
7287            compilerKind : ghc 
7388            compilerVersion : 8.2.2 
74-             setup-method : hvr-ppa 
89+             setup-method : ghcup 
7590            allow-failure : false 
7691          - compiler : ghc-8.0.2 
7792            compilerKind : ghc 
7893            compilerVersion : 8.0.2 
79-             setup-method : hvr-ppa 
94+             setup-method : ghcup 
8095            allow-failure : false 
8196      fail-fast : false 
8297    steps :
83-       - name : apt 
98+       - name : apt-get install  
8499        run : | 
85100          apt-get update 
86101          apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 
87-           if [ "${{ matrix.setup-method }}" = ghcup ]; then 
88-             mkdir -p "$HOME/.ghcup/bin" 
89-             curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" 
90-             chmod a+x "$HOME/.ghcup/bin/ghcup" 
91-             "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) 
92-             "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) 
93-           else 
94-             apt-add-repository -y 'ppa:hvr/ghc' 
95-             apt-get update 
96-             apt-get install -y "$HCNAME" 
97-             mkdir -p "$HOME/.ghcup/bin" 
98-             curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" 
99-             chmod a+x "$HOME/.ghcup/bin/ghcup" 
100-             "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) 
101-           fi 
102+ name : Install GHCup 
103+         run : | 
104+           mkdir -p "$HOME/.ghcup/bin" 
105+           curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup" 
106+           chmod a+x "$HOME/.ghcup/bin/ghcup" 
107+ name : Install cabal-install 
108+         run : | 
109+           "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) 
110+           echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" 
111+ name : Install GHC (GHCup) 
112+         if : matrix.setup-method == 'ghcup' 
113+         run : | 
114+           "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) 
115+           HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") 
116+           HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') 
117+           HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') 
118+           echo "HC=$HC" >> "$GITHUB_ENV" 
119+           echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" 
120+           echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" 
121+ env :
122+           HCKIND : ${{ matrix.compilerKind }} 
123+           HCNAME : ${{ matrix.compiler }} 
124+           HCVER : ${{ matrix.compilerVersion }} 
125+       - name : Install GHC (GHCup prerelease) 
126+         if : matrix.setup-method == 'ghcup-prerelease' 
127+         run : | 
128+           "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; 
129+           "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) 
130+           HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") 
131+           HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') 
132+           HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') 
133+           echo "HC=$HC" >> "$GITHUB_ENV" 
134+           echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" 
135+           echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" 
102136env :
103137          HCKIND : ${{ matrix.compilerKind }} 
104138          HCNAME : ${{ matrix.compiler }} 
@@ -109,28 +143,12 @@ jobs:
109143          echo "LANG=C.UTF-8" >> "$GITHUB_ENV" 
110144          echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" 
111145          echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" 
112-           HCDIR=/opt/$HCKIND/$HCVER 
113-           if [ "${{ matrix.setup-method }}" = ghcup ]; then 
114-             HC=$HOME/.ghcup/bin/$HCKIND-$HCVER 
115-             echo "HC=$HC" >> "$GITHUB_ENV" 
116-             echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" 
117-             echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" 
118-             echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" 
119-           else 
120-             HC=$HCDIR/bin/$HCKIND 
121-             echo "HC=$HC" >> "$GITHUB_ENV" 
122-             echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" 
123-             echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" 
124-             echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" 
125-           fi 
126- 
127146          HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') 
128147          echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" 
129148          echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" 
130149          echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" 
131-           echo "HEADHACKAGE=false" >> "$GITHUB_ENV" 
150+           if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then  echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi  
132151          echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" 
133-           echo "GHCJSARITH=0" >> "$GITHUB_ENV" 
134152env :
135153          HCKIND : ${{ matrix.compilerKind }} 
136154          HCNAME : ${{ matrix.compiler }} 
@@ -157,6 +175,18 @@ jobs:
157175          repository hackage.haskell.org 
158176            url: http://hackage.haskell.org/ 
159177          EOF 
178+           if $HEADHACKAGE; then 
179+           cat >> $CABAL_CONFIG <<EOF 
180+           repository head.hackage.ghc.haskell.org 
181+              url: https://ghc.gitlab.haskell.org/head.hackage/ 
182+              secure: True  
183+              root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d 
184+                         26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 
185+                         f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 
186+              key-threshold: 3 
187+           active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override 
188+           EOF 
189+           fi 
160190          cat >> $CABAL_CONFIG <<EOF 
161191          program-default-options 
162192            ghc-options: $GHCJOBS +RTS -M3G -RTS 
@@ -180,7 +210,7 @@ jobs:
180210          chmod a+x $HOME/.cabal/bin/cabal-plan 
181211          cabal-plan --version 
182212name : checkout 
183-         uses : actions/checkout@v3  
213+         uses : actions/checkout@v4  
184214        with :
185215          path : source 
186216      - name : initial cabal.project for sdist 
@@ -208,15 +238,18 @@ jobs:
208238          if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "    ghc-options: -Werror=missing-methods" >> cabal.project ; fi 
209239          cat >> cabal.project <<EOF 
210240          EOF 
211-           $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(vty)$/; }' >> cabal.project.local 
241+           if $HEADHACKAGE; then 
242+           echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project 
243+           fi 
244+           $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(vty)$/; }' >> cabal.project.local 
212245          cat cabal.project 
213246          cat cabal.project.local 
214247name : dump install plan 
215248        run : | 
216249          $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all 
217250          cabal-plan 
218251name : restore cache 
219-         uses : actions/cache/restore@v3  
252+         uses : actions/cache/restore@v4  
220253        with :
221254          key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} 
222255          path : ~/.cabal/store 
@@ -231,6 +264,10 @@ jobs:
231264name : build 
232265        run : | 
233266          $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always 
267+ name : cabal check 
268+         run : | 
269+           cd ${PKGDIR_vty} || false  
270+           ${CABAL} -vnormal check 
234271name : haddock 
235272        run : | 
236273          $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all 
@@ -239,8 +276,8 @@ jobs:
239276          rm -f cabal.project.local 
240277          $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all 
241278name : save cache 
242-         uses : actions/cache/save@v3 
243279        if : always() 
280+         uses : actions/cache/save@v4 
244281        with :
245282          key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} 
246283          path : ~/.cabal/store 
0 commit comments