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.20241202
12
12
#
13
- # REGENDATA ("0.19.20240316 ",["github","--config=cabal.haskell-ci","cabal.project"])
13
+ # REGENDATA ("0.19.20241202 ",["github","--config=cabal.haskell-ci","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -23,24 +23,24 @@ jobs:
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.10.0.20240313
31
+ - compiler : ghc-9.10.1
32
32
compilerKind : ghc
33
- compilerVersion : 9.10.0.20240313
33
+ compilerVersion : 9.10.1
34
34
setup-method : ghcup
35
35
allow-failure : false
36
- - compiler : ghc-9.8.2
36
+ - compiler : ghc-9.8.4
37
37
compilerKind : ghc
38
- compilerVersion : 9.8.2
38
+ compilerVersion : 9.8.4
39
39
setup-method : ghcup
40
40
allow-failure : false
41
- - compiler : ghc-9.6.4
41
+ - compiler : ghc-9.6.6
42
42
compilerKind : ghc
43
- compilerVersion : 9.6.4
43
+ compilerVersion : 9.6.6
44
44
setup-method : ghcup
45
45
allow-failure : false
46
46
- compiler : ghc-9.4.8
@@ -66,81 +66,53 @@ jobs:
66
66
- compiler : ghc-8.8.4
67
67
compilerKind : ghc
68
68
compilerVersion : 8.8.4
69
- setup-method : hvr-ppa
69
+ setup-method : ghcup
70
70
allow-failure : false
71
71
- compiler : ghc-8.6.5
72
72
compilerKind : ghc
73
73
compilerVersion : 8.6.5
74
- setup-method : hvr-ppa
74
+ setup-method : ghcup
75
75
allow-failure : false
76
76
- compiler : ghc-8.4.4
77
77
compilerKind : ghc
78
78
compilerVersion : 8.4.4
79
- setup-method : hvr-ppa
79
+ setup-method : ghcup
80
80
allow-failure : false
81
81
- compiler : ghc-8.2.2
82
82
compilerKind : ghc
83
83
compilerVersion : 8.2.2
84
- setup-method : hvr-ppa
84
+ setup-method : ghcup
85
85
allow-failure : false
86
86
- compiler : ghc-8.0.2
87
87
compilerKind : ghc
88
88
compilerVersion : 8.0.2
89
- setup-method : hvr-ppa
90
- allow-failure : false
91
- - compiler : ghc-7.10.3
92
- compilerKind : ghc
93
- compilerVersion : 7.10.3
94
- setup-method : hvr-ppa
95
- allow-failure : false
96
- - compiler : ghc-7.8.4
97
- compilerKind : ghc
98
- compilerVersion : 7.8.4
99
- setup-method : hvr-ppa
100
- allow-failure : false
101
- - compiler : ghc-7.6.3
102
- compilerKind : ghc
103
- compilerVersion : 7.6.3
104
- setup-method : hvr-ppa
105
- allow-failure : false
106
- - compiler : ghc-7.4.2
107
- compilerKind : ghc
108
- compilerVersion : 7.4.2
109
- setup-method : hvr-ppa
110
- allow-failure : false
111
- - compiler : ghc-7.2.2
112
- compilerKind : ghc
113
- compilerVersion : 7.2.2
114
- setup-method : hvr-ppa
115
- allow-failure : false
116
- - compiler : ghc-7.0.4
117
- compilerKind : ghc
118
- compilerVersion : 7.0.4
119
- setup-method : hvr-ppa
89
+ setup-method : ghcup
120
90
allow-failure : false
121
91
fail-fast : false
122
92
steps :
123
- - name : apt
93
+ - name : apt-get install
124
94
run : |
125
95
apt-get update
126
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
127
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
128
- mkdir -p "$HOME/.ghcup/bin"
129
- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
130
- chmod a+x "$HOME/.ghcup/bin/ghcup"
131
- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
132
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
133
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
134
- else
135
- apt-add-repository -y 'ppa:hvr/ghc'
136
- apt-get update
137
- apt-get install -y "$HCNAME"
138
- mkdir -p "$HOME/.ghcup/bin"
139
- curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
140
- chmod a+x "$HOME/.ghcup/bin/ghcup"
141
- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
142
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
143
- fi
96
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
97
+ - name : Install GHCup
98
+ run : |
99
+ mkdir -p "$HOME/.ghcup/bin"
100
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
101
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
102
+ - name : Install cabal-install
103
+ run : |
104
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
105
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
106
+ - name : Install GHC (GHCup)
107
+ if : matrix.setup-method == 'ghcup'
108
+ run : |
109
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
110
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
111
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
112
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
113
+ echo "HC=$HC" >> "$GITHUB_ENV"
114
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
115
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
144
116
env :
145
117
HCKIND : ${{ matrix.compilerKind }}
146
118
HCNAME : ${{ matrix.compiler }}
@@ -151,30 +123,12 @@ jobs:
151
123
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
152
124
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
153
125
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
154
- HCDIR=/opt/$HCKIND/$HCVER
155
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
156
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
157
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
158
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
159
- echo "HC=$HC" >> "$GITHUB_ENV"
160
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
161
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
162
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
163
- else
164
- HC=$HCDIR/bin/$HCKIND
165
- echo "HC=$HC" >> "$GITHUB_ENV"
166
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
167
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
168
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
169
- fi
170
-
171
126
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
172
127
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
173
128
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
174
129
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
175
- if [ $((HCNUMVER >= 91000)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
130
+ echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
176
131
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
177
- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
178
132
env :
179
133
HCKIND : ${{ matrix.compilerKind }}
180
134
HCNAME : ${{ matrix.compiler }}
@@ -201,18 +155,6 @@ jobs:
201
155
repository hackage.haskell.org
202
156
url: http://hackage.haskell.org/
203
157
EOF
204
- if $HEADHACKAGE; then
205
- cat >> $CABAL_CONFIG <<EOF
206
- repository head.hackage.ghc.haskell.org
207
- url: https://ghc.gitlab.haskell.org/head.hackage/
208
- secure: True
209
- root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
210
- 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
211
- f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
212
- key-threshold: 3
213
- active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
214
- EOF
215
- fi
216
158
cat >> $CABAL_CONFIG <<EOF
217
159
program-default-options
218
160
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -236,7 +178,7 @@ jobs:
236
178
chmod a+x $HOME/.cabal/bin/cabal-plan
237
179
cabal-plan --version
238
180
- name : checkout
239
- uses : actions/checkout@v3
181
+ uses : actions/checkout@v4
240
182
with :
241
183
path : source
242
184
- name : initial cabal.project for sdist
@@ -266,18 +208,15 @@ jobs:
266
208
package deriving-compat
267
209
ghc-options: -Werror
268
210
EOF
269
- if $HEADHACKAGE; then
270
- echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
271
- fi
272
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(deriving-compat)$/; }' >> cabal.project.local
211
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(deriving-compat)$/; }' >> cabal.project.local
273
212
cat cabal.project
274
213
cat cabal.project.local
275
214
- name : dump install plan
276
215
run : |
277
216
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
278
217
cabal-plan
279
218
- name : restore cache
280
- uses : actions/cache/restore@v3
219
+ uses : actions/cache/restore@v4
281
220
with :
282
221
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
283
222
path : ~/.cabal/store
@@ -300,8 +239,8 @@ jobs:
300
239
run : |
301
240
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
302
241
- name : save cache
303
- uses : actions/cache/save@v3
304
242
if : always()
243
+ uses : actions/cache/save@v4
305
244
with :
306
245
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
307
246
path : ~/.cabal/store
0 commit comments