88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.15.20220826
11+ # version: 0.17.20231010
1212#
13- # REGENDATA ("0.15.20220826 ",["github","--config=cabal.haskell-ci","cabal.project"])
13+ # REGENDATA ("0.17.20231010 ",["github","--config=cabal.haskell-ci","cabal.project"])
1414#
1515name : Haskell-CI
1616on :
@@ -32,14 +32,24 @@ jobs:
3232 strategy :
3333 matrix :
3434 include :
35- - compiler : ghc-9.4.2
35+ - compiler : ghc-9.8.1
3636 compilerKind : ghc
37- compilerVersion : 9.4.2
37+ compilerVersion : 9.8.1
3838 setup-method : ghcup
3939 allow-failure : false
40- - compiler : ghc-9.2.4
40+ - compiler : ghc-9.6.3
4141 compilerKind : ghc
42- compilerVersion : 9.2.4
42+ compilerVersion : 9.6.3
43+ setup-method : ghcup
44+ allow-failure : false
45+ - compiler : ghc-9.4.7
46+ compilerKind : ghc
47+ compilerVersion : 9.4.7
48+ setup-method : ghcup
49+ allow-failure : false
50+ - compiler : ghc-9.2.8
51+ compilerKind : ghc
52+ compilerVersion : 9.2.8
4353 setup-method : ghcup
4454 allow-failure : false
4555 - compiler : ghc-9.0.2
@@ -65,18 +75,18 @@ jobs:
6575 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
6676 if [ "${{ matrix.setup-method }}" = ghcup ]; then
6777 mkdir -p "$HOME/.ghcup/bin"
68- curl -sL https://downloads.haskell.org/ghcup/0.1.18.0 /x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
78+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
6979 chmod a+x "$HOME/.ghcup/bin/ghcup"
7080 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
71- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2 .0 || (cat "$HOME"/.ghcup/logs/*.* && false)
81+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1 .0 || (cat "$HOME"/.ghcup/logs/*.* && false)
7282 else
7383 apt-add-repository -y 'ppa:hvr/ghc'
7484 apt-get update
7585 apt-get install -y "$HCNAME"
7686 mkdir -p "$HOME/.ghcup/bin"
77- curl -sL https://downloads.haskell.org/ghcup/0.1.18.0 /x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
87+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
7888 chmod a+x "$HOME/.ghcup/bin/ghcup"
79- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2 .0 || (cat "$HOME"/.ghcup/logs/*.* && false)
89+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1 .0 || (cat "$HOME"/.ghcup/logs/*.* && false)
8090 fi
8191 env :
8292 HCKIND : ${{ matrix.compilerKind }}
@@ -90,17 +100,19 @@ jobs:
90100 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
91101 HCDIR=/opt/$HCKIND/$HCVER
92102 if [ "${{ matrix.setup-method }}" = ghcup ]; then
93- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
103+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
104+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
105+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
94106 echo "HC=$HC" >> "$GITHUB_ENV"
95- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER " >> "$GITHUB_ENV"
96- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER " >> "$GITHUB_ENV"
97- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
107+ echo "HCPKG=$HCPKG " >> "$GITHUB_ENV"
108+ echo "HADDOCK=$HADDOCK " >> "$GITHUB_ENV"
109+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
98110 else
99111 HC=$HCDIR/bin/$HCKIND
100112 echo "HC=$HC" >> "$GITHUB_ENV"
101113 echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
102114 echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
103- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
115+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
104116 fi
105117
106118 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
@@ -150,25 +162,31 @@ jobs:
150162 run : |
151163 $CABAL v2-update -v
152164 - name : cache (tools)
153- uses : actions/cache@v2
165+ uses : actions/cache/restore@v3
154166 with :
155- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-c2e577c5
167+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-0f8d33a5
156168 path : ~/.haskell-ci-tools
157169 - name : install cabal-plan
158170 run : |
159171 mkdir -p $HOME/.cabal/bin
160- 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
161- echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
172+ 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
173+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
162174 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
163175 rm -f cabal-plan.xz
164176 chmod a+x $HOME/.cabal/bin/cabal-plan
165177 cabal-plan --version
166178 - name : install doctest
167179 run : |
168- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.20' ; fi
169- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi
180+ $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22'
181+ doctest --version
182+ - name : save cache (tools)
183+ uses : actions/cache/save@v3
184+ if : always()
185+ with :
186+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-0f8d33a5
187+ path : ~/.haskell-ci-tools
170188 - name : checkout
171- uses : actions/checkout@v2
189+ uses : actions/checkout@v3
172190 with :
173191 path : source
174192 - name : initial cabal.project for sdist
@@ -195,11 +213,6 @@ jobs:
195213 echo "package log-effectful" >> cabal.project
196214 echo " ghc-options: -Werror=missing-methods" >> cabal.project
197215 cat >> cabal.project <<EOF
198- source-repository-package
199- type: git
200- location: https://github.com/scrive/log
201- tag: c1dda2e1bf53cc81b07fa0cb97c665ef4af9b3d0
202- subdir: log-base
203216 EOF
204217 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(log-effectful)$/; }' >> cabal.project.local
205218 cat cabal.project
@@ -208,8 +221,8 @@ jobs:
208221 run : |
209222 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
210223 cabal-plan
211- - name : cache
212- uses : actions/cache@v2
224+ - name : restore cache
225+ uses : actions/cache/restore@v3
213226 with :
214227 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
215228 path : ~/.cabal/store
@@ -229,16 +242,22 @@ jobs:
229242 $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
230243 - name : doctest
231244 run : |
232- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_log_effectful} || false ; fi
233- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -XHaskell2010 -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XDeriveGeneric -XDerivingStrategies -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src ; fi
245+ cd ${PKGDIR_log_effectful} || false
246+ doctest -XHaskell2010 -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveFunctor -XDeriveGeneric -XDerivingStrategies -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRoleAnnotations -XScopedTypeVariables -XStandaloneDeriving -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src
234247 - name : cabal check
235248 run : |
236249 cd ${PKGDIR_log_effectful} || false
237250 ${CABAL} -vnormal check
238251 - name : haddock
239252 run : |
240- $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
253+ $CABAL v2-haddock --disable-documentation -- haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
241254 - name : unconstrained build
242255 run : |
243256 rm -f cabal.project.local
244257 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
258+ - name : save cache
259+ uses : actions/cache/save@v3
260+ if : always()
261+ with :
262+ key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
263+ path : ~/.cabal/store
0 commit comments