88#
99# For more information, see https://github.com/haskell-CI/haskell-ci
1010#
11- # version: 0.14.3
11+ # version: 0.16
1212#
13- # REGENDATA ("0.14.3 ",["github","cabal.project"])
13+ # REGENDATA ("0.16 ",["github","cabal.project"])
1414#
1515name : Haskell-CI
1616on :
2323jobs :
2424 linux :
2525 name : Haskell-CI - Linux - ${{ matrix.compiler }}
26- runs-on : ubuntu-18 .04
26+ runs-on : ubuntu-20 .04
2727 timeout-minutes :
2828 60
2929 container :
3232 strategy :
3333 matrix :
3434 include :
35- - compiler : ghc-9.2.2
35+ - compiler : ghc-9.6.1
3636 compilerKind : ghc
37- compilerVersion : 9.2.2
37+ compilerVersion : 9.6.1
38+ setup-method : ghcup
39+ allow-failure : false
40+ - compiler : ghc-9.4.4
41+ compilerKind : ghc
42+ compilerVersion : 9.4.4
43+ setup-method : ghcup
44+ allow-failure : false
45+ - compiler : ghc-9.2.7
46+ compilerKind : ghc
47+ compilerVersion : 9.2.7
3848 setup-method : ghcup
3949 allow-failure : false
4050 - compiler : ghc-9.0.2
@@ -54,10 +64,10 @@ jobs:
5464 apt-get update
5565 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
5666 mkdir -p "$HOME/.ghcup/bin"
57- curl -sL https://downloads.haskell.org/ghcup/0.1.17.5 /x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
67+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
5868 chmod a+x "$HOME/.ghcup/bin/ghcup"
59- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
60- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
69+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
70+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
6171 env :
6272 HCKIND : ${{ matrix.compilerKind }}
6373 HCNAME : ${{ matrix.compiler }}
7383 echo "HC=$HC" >> "$GITHUB_ENV"
7484 echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
7585 echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
76- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
86+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
7787 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
7888 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
7989 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -121,31 +131,37 @@ jobs:
121131 run : |
122132 $CABAL v2-update -v
123133 - name : cache (tools)
124- uses : actions/cache@v2
134+ uses : actions/cache/restore@v3
125135 with :
126- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-f9d9af4c
136+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-2ac3c456
127137 path : ~/.haskell-ci-tools
128138 - name : install cabal-plan
129139 run : |
130140 mkdir -p $HOME/.cabal/bin
131- 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
132- echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
141+ 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
142+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
133143 xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
134144 rm -f cabal-plan.xz
135145 chmod a+x $HOME/.cabal/bin/cabal-plan
136146 cabal-plan --version
137147 - name : install doctest
138148 run : |
139- $ CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.20'
140- doctest --version
149+ 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
150+ if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi
141151 - name : install hlint
142152 run : |
143- if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.3 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
144- if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
145- if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
146- if [ $((HCNUMVER >= 90200)) -ne 0 ] ; then hlint --version ; fi
153+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.3 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
154+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
155+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
156+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
157+ - name : save cache (tools)
158+ uses : actions/cache/save@v3
159+ if : always()
160+ with :
161+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-2ac3c456
162+ path : ~/.haskell-ci-tools
147163 - name : checkout
148- uses : actions/checkout@v2
164+ uses : actions/checkout@v3
149165 with :
150166 path : source
151167 - name : initial cabal.project for sdist
@@ -180,8 +196,8 @@ jobs:
180196 run : |
181197 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
182198 cabal-plan
183- - name : cache
184- uses : actions/cache@v2
199+ - name : restore cache
200+ uses : actions/cache/restore@v3
185201 with :
186202 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
187203 path : ~/.cabal/store
@@ -201,19 +217,25 @@ jobs:
201217 $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
202218 - name : doctest
203219 run : |
204- cd ${PKGDIR_typed_process_effectful} || false
205- doctest -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src
220+ if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_typed_process_effectful} || false ; fi
221+ if [ $((HCNUMVER < 90400)) -ne 0 ] ; then doctest -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src ; fi
206222 - name : hlint
207223 run : |
208- if [ $((HCNUMVER >= 90200 )) -ne 0 ] ; then (cd ${PKGDIR_typed_process_effectful} && hlint -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src) ; fi
224+ if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600 )) -ne 0 ] ; then (cd ${PKGDIR_typed_process_effectful} && hlint -XHaskell2010 -XDataKinds -XFlexibleContexts -XGADTs -XKindSignatures -XTypeOperators src) ; fi
209225 - name : cabal check
210226 run : |
211227 cd ${PKGDIR_typed_process_effectful} || false
212228 ${CABAL} -vnormal check
213229 - name : haddock
214230 run : |
215- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
231+ $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
216232 - name : unconstrained build
217233 run : |
218234 rm -f cabal.project.local
219235 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
236+ - name : save cache
237+ uses : actions/cache/save@v3
238+ if : always()
239+ with :
240+ key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
241+ path : ~/.cabal/store
0 commit comments