1
1
# This GitHub workflow config has been generated by a script via
2
2
#
3
- # haskell-ci 'github' '--hlint' '--hlint-job=9.4.8' '-- doctest' '--doctest-version=^>= 0.22' '--installed=+all -Cabal' 'cabal2spec.cabal'
3
+ # haskell-ci '-- doctest' '--doctest-version=^>= 0.22' '--installed=+all -Cabal' 'github ' 'cabal2spec.cabal'
4
4
#
5
5
# To regenerate the script (for example after adjusting tested-with) run
6
6
#
7
7
# haskell-ci regenerate
8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.19.20240316
11
+ # version: 0.19.20240708
12
12
#
13
- # REGENDATA ("0.19.20240316 ",["github","--hlint","--hlint-job=9.4.8","-- doctest","--doctest-version=^>= 0.22","--installed=+all -Cabal","cabal2spec.cabal"])
13
+ # REGENDATA ("0.19.20240708 ",["-- doctest","--doctest-version=^>= 0.22","--installed=+all -Cabal","github ","cabal2spec.cabal"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
23
23
timeout-minutes :
24
24
60
25
25
container :
26
- image : buildpack-deps:bionic
26
+ image : buildpack-deps:jammy
27
27
continue-on-error : ${{ matrix.allow-failure }}
28
28
strategy :
29
29
matrix :
@@ -55,11 +55,10 @@ jobs:
55
55
apt-get update
56
56
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
57
57
mkdir -p "$HOME/.ghcup/bin"
58
- curl -sL https://downloads.haskell.org/ghcup/0.1.20 .0/x86_64-linux-ghcup-0.1.20 .0 > "$HOME/.ghcup/bin/ghcup"
58
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30 .0/x86_64-linux-ghcup-0.1.30 .0 > "$HOME/.ghcup/bin/ghcup"
59
59
chmod a+x "$HOME/.ghcup/bin/ghcup"
60
- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
61
60
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
62
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2 .0 || (cat "$HOME"/.ghcup/logs/*.* && false)
61
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1 .0 || (cat "$HOME"/.ghcup/logs/*.* && false)
63
62
env :
64
63
HCKIND : ${{ matrix.compilerKind }}
65
64
HCNAME : ${{ matrix.compiler }}
77
76
echo "HC=$HC" >> "$GITHUB_ENV"
78
77
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
79
78
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
80
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
79
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1 .0 -vnormal+nowrap" >> "$GITHUB_ENV"
81
80
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
82
81
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
83
82
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -125,9 +124,9 @@ jobs:
125
124
run : |
126
125
$CABAL v2-update -v
127
126
- name : cache (tools)
128
- uses : actions/cache/restore@v3
127
+ uses : actions/cache/restore@v4
129
128
with :
130
- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-368d1a36
129
+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-1cf0e533
131
130
path : ~/.haskell-ci-tools
132
131
- name : install cabal-plan
133
132
run : |
@@ -142,20 +141,14 @@ jobs:
142
141
run : |
143
142
$CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22'
144
143
doctest --version
145
- - name : install hlint
146
- run : |
147
- if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
148
- 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
149
- 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
150
- if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
151
144
- name : save cache (tools)
152
- uses : actions/cache/save@v3
145
+ uses : actions/cache/save@v4
153
146
if : always()
154
147
with :
155
- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-368d1a36
148
+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-1cf0e533
156
149
path : ~/.haskell-ci-tools
157
150
- name : checkout
158
- uses : actions/checkout@v3
151
+ uses : actions/checkout@v4
159
152
with :
160
153
path : source
161
154
- name : initial cabal.project for sdist
@@ -183,15 +176,15 @@ jobs:
183
176
echo " ghc-options: -Werror=missing-methods" >> cabal.project
184
177
cat >> cabal.project <<EOF
185
178
EOF
186
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|cabal2spec)$/; }' >> cabal.project.local
179
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(Cabal|cabal2spec)$/; }' >> cabal.project.local
187
180
cat cabal.project
188
181
cat cabal.project.local
189
182
- name : dump install plan
190
183
run : |
191
184
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
192
185
cabal-plan
193
186
- name : restore cache
194
- uses : actions/cache/restore@v3
187
+ uses : actions/cache/restore@v4
195
188
with :
196
189
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
197
190
path : ~/.cabal/store
@@ -213,10 +206,6 @@ jobs:
213
206
run : |
214
207
cd ${PKGDIR_cabal2spec} || false
215
208
doctest -XHaskell2010 src
216
- - name : hlint
217
- run : |
218
- if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cabal2spec} && hlint -XHaskell2010 src) ; fi
219
- if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_cabal2spec} && hlint -XHaskell2010 cabal2spec) ; fi
220
209
- name : cabal check
221
210
run : |
222
211
cd ${PKGDIR_cabal2spec} || false
@@ -229,7 +218,7 @@ jobs:
229
218
rm -f cabal.project.local
230
219
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
231
220
- name : save cache
232
- uses : actions/cache/save@v3
221
+ uses : actions/cache/save@v4
233
222
if : always()
234
223
with :
235
224
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments