1
1
# This GitHub workflow config has been generated by a script via
2
2
#
3
- # haskell-ci '--hlint ' '--hlint-job' '9.4.5 ' '--haddock' 'github' 'dyre.cabal '
3
+ # haskell-ci 'github ' 'dyre.cabal ' '--haddock'
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.16.1
11
+ # version: 0.19.20250506
12
12
#
13
- # REGENDATA ("0.16.1 ",["--hlint ","--hlint-job","9.4.5 ","--haddock","github","dyre.cabal "])
13
+ # REGENDATA ("0.19.20250506 ",["github ","dyre.cabal ","--haddock"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
19
19
jobs :
20
20
linux :
21
21
name : Haskell-CI - Linux - ${{ matrix.compiler }}
22
- runs-on : ubuntu-20 .04
22
+ runs-on : ubuntu-24 .04
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 :
30
30
include :
31
- - compiler : ghc-9.6.1
31
+ - compiler : ghc-9.12.2
32
32
compilerKind : ghc
33
- compilerVersion : 9.6.1
33
+ compilerVersion : 9.12.2
34
34
setup-method : ghcup
35
35
allow-failure : false
36
- - compiler : ghc-9.4.5
36
+ - compiler : ghc-9.10.2
37
37
compilerKind : ghc
38
- compilerVersion : 9.4.5
38
+ compilerVersion : 9.10.2
39
39
setup-method : ghcup
40
40
allow-failure : false
41
- - compiler : ghc-9.2.7
41
+ - compiler : ghc-9.8.4
42
42
compilerKind : ghc
43
- compilerVersion : 9.2.7
43
+ compilerVersion : 9.8.4
44
44
setup-method : ghcup
45
45
allow-failure : false
46
- - compiler : ghc-9.0.2
46
+ - compiler : ghc-9.6.7
47
47
compilerKind : ghc
48
- compilerVersion : 9.0.2
48
+ compilerVersion : 9.6.7
49
49
setup-method : ghcup
50
50
allow-failure : false
51
- - compiler : ghc-8.10.7
52
- compilerKind : ghc
53
- compilerVersion : 8.10.7
54
- setup-method : ghcup
55
- allow-failure : false
56
- - compiler : ghc-8.8.4
57
- compilerKind : ghc
58
- compilerVersion : 8.8.4
59
- setup-method : hvr-ppa
60
- allow-failure : false
61
- - compiler : ghc-8.6.5
62
- compilerKind : ghc
63
- compilerVersion : 8.6.5
64
- setup-method : hvr-ppa
65
- allow-failure : false
66
- - compiler : ghc-8.4.4
67
- compilerKind : ghc
68
- compilerVersion : 8.4.4
69
- setup-method : hvr-ppa
70
- allow-failure : false
71
- - compiler : ghc-8.2.2
72
- compilerKind : ghc
73
- compilerVersion : 8.2.2
74
- setup-method : hvr-ppa
75
- allow-failure : false
76
- - compiler : ghc-8.0.2
77
- compilerKind : ghc
78
- compilerVersion : 8.0.2
79
- setup-method : hvr-ppa
80
- allow-failure : false
81
51
fail-fast : false
82
52
steps :
83
- - name : apt
53
+ - name : apt-get install
84
54
run : |
85
55
apt-get update
86
56
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
57
+ - name : Install GHCup
58
+ run : |
59
+ mkdir -p "$HOME/.ghcup/bin"
60
+ curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
61
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
62
+ - name : Install cabal-install
63
+ run : |
64
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
65
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
66
+ - name : Install GHC (GHCup)
67
+ if : matrix.setup-method == 'ghcup'
68
+ run : |
69
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
70
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
71
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
72
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
73
+ echo "HC=$HC" >> "$GITHUB_ENV"
74
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
75
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
102
76
env :
103
77
HCKIND : ${{ matrix.compilerKind }}
104
78
HCNAME : ${{ matrix.compiler }}
@@ -109,28 +83,12 @@ jobs:
109
83
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
110
84
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
111
85
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
-
127
86
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
128
87
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
129
88
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
130
89
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
131
90
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
132
91
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
133
- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
134
92
env :
135
93
HCKIND : ${{ matrix.compilerKind }}
136
94
HCNAME : ${{ matrix.compiler }}
@@ -170,11 +128,6 @@ jobs:
170
128
- name : update cabal index
171
129
run : |
172
130
$CABAL v2-update -v
173
- - name : cache (tools)
174
- uses : actions/cache/restore@v3
175
- with :
176
- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-6b1f90a1
177
- path : ~/.haskell-ci-tools
178
131
- name : install cabal-plan
179
132
run : |
180
133
mkdir -p $HOME/.cabal/bin
@@ -184,20 +137,8 @@ jobs:
184
137
rm -f cabal-plan.xz
185
138
chmod a+x $HOME/.cabal/bin/cabal-plan
186
139
cabal-plan --version
187
- - name : install hlint
188
- run : |
189
- 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
190
- 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
191
- 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
192
- if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
193
- - name : save cache (tools)
194
- uses : actions/cache/save@v3
195
- if : always()
196
- with :
197
- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-6b1f90a1
198
- path : ~/.haskell-ci-tools
199
140
- name : checkout
200
- uses : actions/checkout@v3
141
+ uses : actions/checkout@v4
201
142
with :
202
143
path : source
203
144
- name : initial cabal.project for sdist
@@ -221,19 +162,19 @@ jobs:
221
162
touch cabal.project
222
163
touch cabal.project.local
223
164
echo "packages: ${PKGDIR_dyre}" >> cabal.project
224
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package dyre" >> cabal.project ; fi
225
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
165
+ echo "package dyre" >> cabal.project
166
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
226
167
cat >> cabal.project <<EOF
227
168
EOF
228
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(dyre)$/; }' >> cabal.project.local
169
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(dyre)$/; }' >> cabal.project.local
229
170
cat cabal.project
230
171
cat cabal.project.local
231
172
- name : dump install plan
232
173
run : |
233
174
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
234
175
cabal-plan
235
176
- name : restore cache
236
- uses : actions/cache/restore@v3
177
+ uses : actions/cache/restore@v4
237
178
with :
238
179
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
239
180
path : ~/.cabal/store
@@ -251,9 +192,6 @@ jobs:
251
192
- name : tests
252
193
run : |
253
194
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
254
- - name : hlint
255
- run : |
256
- if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_dyre} && hlint -XHaskell2010 .) ; fi
257
195
- name : cabal check
258
196
run : |
259
197
cd ${PKGDIR_dyre} || false
@@ -266,8 +204,8 @@ jobs:
266
204
rm -f cabal.project.local
267
205
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
268
206
- name : save cache
269
- uses : actions/cache/save@v3
270
207
if : always()
208
+ uses : actions/cache/save@v4
271
209
with :
272
210
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
273
211
path : ~/.cabal/store
0 commit comments