8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.17.20231010
11
+ # version: 0.19.20241202
12
12
#
13
- # REGENDATA ("0.17.20231010 ",["github","cabal.project"])
13
+ # REGENDATA ("0.19.20241202 ",["github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -27,24 +27,39 @@ jobs:
27
27
timeout-minutes :
28
28
60
29
29
container :
30
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:jammy
31
31
continue-on-error : ${{ matrix.allow-failure }}
32
32
strategy :
33
33
matrix :
34
34
include :
35
- - compiler : ghc-9.8.1
35
+ - compiler : ghc-9.12.0.20241128
36
36
compilerKind : ghc
37
- compilerVersion : 9.8.1
37
+ compilerVersion : 9.12.0.20241128
38
38
setup-method : ghcup
39
39
allow-failure : false
40
- - compiler : ghc-9.6.3
40
+ - compiler : ghc-9.12.0.20241128
41
41
compilerKind : ghc
42
- compilerVersion : 9.6.3
42
+ compilerVersion : 9.12.0.20241128
43
+ setup-method : ghcup-prerelease
44
+ allow-failure : false
45
+ - compiler : ghc-9.10.1
46
+ compilerKind : ghc
47
+ compilerVersion : 9.10.1
48
+ setup-method : ghcup
49
+ allow-failure : false
50
+ - compiler : ghc-9.8.4
51
+ compilerKind : ghc
52
+ compilerVersion : 9.8.4
43
53
setup-method : ghcup
44
54
allow-failure : false
45
- - compiler : ghc-9.4.7
55
+ - compiler : ghc-9.6.6
46
56
compilerKind : ghc
47
- compilerVersion : 9.4.7
57
+ compilerVersion : 9.6.6
58
+ setup-method : ghcup
59
+ allow-failure : false
60
+ - compiler : ghc-9.4.8
61
+ compilerKind : ghc
62
+ compilerVersion : 9.4.8
48
63
setup-method : ghcup
49
64
allow-failure : false
50
65
- compiler : ghc-9.2.8
@@ -84,40 +99,60 @@ jobs:
84
99
allow-failure : false
85
100
fail-fast : false
86
101
steps :
87
- - name : apt
102
+ - name : apt-get install
88
103
run : |
89
104
apt-get update
90
105
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106
+ - name : Install GHCup
107
+ run : |
91
108
mkdir -p "$HOME/.ghcup/bin"
92
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
109
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0 /x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
93
110
chmod a+x "$HOME/.ghcup/bin/ghcup"
111
+ - name : Install cabal-install
112
+ run : |
113
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115
+ - name : Install GHC (GHCup)
116
+ if : matrix.setup-method == 'ghcup'
117
+ run : |
94
118
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
95
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
120
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
121
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
122
+ echo "HC=$HC" >> "$GITHUB_ENV"
123
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
124
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
96
125
env :
97
126
HCKIND : ${{ matrix.compilerKind }}
98
127
HCNAME : ${{ matrix.compiler }}
99
128
HCVER : ${{ matrix.compilerVersion }}
100
- - name : Set PATH and environment variables
129
+ - name : Install GHC (GHCup prerelease)
130
+ if : matrix.setup-method == 'ghcup-prerelease'
101
131
run : |
102
- echo "$HOME/.cabal/bin" >> $GITHUB_PATH
103
- echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
104
- echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
105
- echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
106
- HCDIR=/opt/$HCKIND/$HCVER
132
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
133
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
107
134
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
108
135
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
109
136
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
110
137
echo "HC=$HC" >> "$GITHUB_ENV"
111
138
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
112
139
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
113
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
140
+ env :
141
+ HCKIND : ${{ matrix.compilerKind }}
142
+ HCNAME : ${{ matrix.compiler }}
143
+ HCVER : ${{ matrix.compilerVersion }}
144
+ - name : Set PATH and environment variables
145
+ run : |
146
+ echo "$HOME/.cabal/bin" >> $GITHUB_PATH
147
+ echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
148
+ echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
149
+ echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
114
150
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
115
151
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
116
152
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
117
153
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
118
- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
154
+ if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
119
155
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
120
- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
121
156
env :
122
157
HCKIND : ${{ matrix.compilerKind }}
123
158
HCNAME : ${{ matrix.compiler }}
@@ -144,6 +179,18 @@ jobs:
144
179
repository hackage.haskell.org
145
180
url: http://hackage.haskell.org/
146
181
EOF
182
+ if $HEADHACKAGE; then
183
+ cat >> $CABAL_CONFIG <<EOF
184
+ repository head.hackage.ghc.haskell.org
185
+ url: https://ghc.gitlab.haskell.org/head.hackage/
186
+ secure: True
187
+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
188
+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
189
+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
190
+ key-threshold: 3
191
+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
192
+ EOF
193
+ fi
147
194
cat >> $CABAL_CONFIG <<EOF
148
195
program-default-options
149
196
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -167,7 +214,7 @@ jobs:
167
214
chmod a+x $HOME/.cabal/bin/cabal-plan
168
215
cabal-plan --version
169
216
- name : checkout
170
- uses : actions/checkout@v3
217
+ uses : actions/checkout@v4
171
218
with :
172
219
path : source
173
220
- name : initial cabal.project for sdist
@@ -194,19 +241,22 @@ jobs:
194
241
echo "package unordered-containers" >> cabal.project
195
242
echo " ghc-options: -Werror=missing-methods" >> cabal.project
196
243
cat >> cabal.project <<EOF
197
- allow-newer: nothunks:bytestring
198
- allow-newer: nothunks:text
199
- allow-newer: ChasingBottoms:base
244
+ allow-newer: hashable:base
245
+ allow-newer: splitmix:base
246
+ allow-newer: vector-stream:ghc-prim
200
247
EOF
201
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|unordered-containers)$/; }' >> cabal.project.local
248
+ if $HEADHACKAGE; then
249
+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
250
+ fi
251
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(binary|containers|unordered-containers)$/; }' >> cabal.project.local
202
252
cat cabal.project
203
253
cat cabal.project.local
204
254
- name : dump install plan
205
255
run : |
206
256
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
207
257
cabal-plan
208
258
- name : restore cache
209
- uses : actions/cache/restore@v3
259
+ uses : actions/cache/restore@v4
210
260
with :
211
261
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
212
262
path : ~/.cabal/store
@@ -246,8 +296,8 @@ jobs:
246
296
$CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all
247
297
$CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='unordered-containers +debug' all
248
298
- name : save cache
249
- uses : actions/cache/save@v3
250
299
if : always()
300
+ uses : actions/cache/save@v4
251
301
with :
252
302
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
253
303
path : ~/.cabal/store
0 commit comments