6
6
#
7
7
# haskell-ci regenerate
8
8
#
9
- # For more information, see https://github.com/haskell-CI /haskell-ci
9
+ # For more information, see https://github.com/andreasabel /haskell-ci
10
10
#
11
- # version: 0.16.4
11
+ # version: 0.17.20230928
12
12
#
13
- # REGENDATA ("0.16.4 ",["--config=cabal.haskell-ci","github","cabal.project"])
13
+ # REGENDATA ("0.17.20230928 ",["--config=cabal.haskell-ci","github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
17
17
push :
18
18
branches :
19
19
- master
20
- - ci*
21
20
pull_request :
22
21
branches :
23
22
- master
24
- - ci*
25
23
jobs :
26
24
linux :
27
25
name : Haskell-CI - Linux - ${{ matrix.compiler }}
28
26
runs-on : ubuntu-20.04
29
27
timeout-minutes :
30
28
60
31
29
container :
32
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:focal
33
31
continue-on-error : ${{ matrix.allow-failure }}
34
32
strategy :
35
33
matrix :
36
34
include :
37
- - compiler : ghc-9.6.2
35
+ - compiler : ghc-9.8.0.20230919
38
36
compilerKind : ghc
39
- compilerVersion : 9.6.2
37
+ compilerVersion : 9.8.0.20230919
38
+ setup-method : ghcup
39
+ allow-failure : true
40
+ - compiler : ghc-9.6.3
41
+ compilerKind : ghc
42
+ compilerVersion : 9.6.3
40
43
setup-method : ghcup
41
44
allow-failure : false
42
- - compiler : ghc-9.4.5
45
+ - compiler : ghc-9.4.7
43
46
compilerKind : ghc
44
- compilerVersion : 9.4.5
47
+ compilerVersion : 9.4.7
45
48
setup-method : ghcup
46
49
allow-failure : false
47
50
- compiler : ghc-9.2.8
89
92
compilerVersion : 7.10.3
90
93
setup-method : hvr-ppa
91
94
allow-failure : false
92
- - compiler : ghc-7.8.4
93
- compilerKind : ghc
94
- compilerVersion : 7.8.4
95
- setup-method : hvr-ppa
96
- allow-failure : false
97
95
fail-fast : false
98
96
steps :
99
97
- name : apt
@@ -102,17 +100,19 @@ jobs:
102
100
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
103
101
if [ "${{ matrix.setup-method }}" = ghcup ]; then
104
102
mkdir -p "$HOME/.ghcup/bin"
105
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
103
+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
106
104
chmod a+x "$HOME/.ghcup/bin/ghcup"
105
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
107
106
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
108
107
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
109
108
else
110
109
apt-add-repository -y 'ppa:hvr/ghc'
111
110
apt-get update
112
111
apt-get install -y "$HCNAME"
113
112
mkdir -p "$HOME/.ghcup/bin"
114
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2 /x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
113
+ curl -sL https://downloads.haskell.org/ghcup/0.1.19.5 /x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
115
114
chmod a+x "$HOME/.ghcup/bin/ghcup"
115
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
116
116
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117
117
fi
118
118
env :
@@ -127,10 +127,12 @@ jobs:
127
127
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
128
128
HCDIR=/opt/$HCKIND/$HCVER
129
129
if [ "${{ matrix.setup-method }}" = ghcup ]; then
130
- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
130
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
131
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
132
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
131
133
echo "HC=$HC" >> "$GITHUB_ENV"
132
- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER " >> "$GITHUB_ENV"
133
- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER " >> "$GITHUB_ENV"
134
+ echo "HCPKG=$HCPKG " >> "$GITHUB_ENV"
135
+ echo "HADDOCK=$HADDOCK " >> "$GITHUB_ENV"
134
136
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
135
137
else
136
138
HC=$HCDIR/bin/$HCKIND
@@ -144,7 +146,7 @@ jobs:
144
146
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
145
147
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
146
148
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
147
- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
149
+ if [ $((HCNUMVER >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
148
150
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
149
151
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
150
152
env :
@@ -173,6 +175,18 @@ jobs:
173
175
repository hackage.haskell.org
174
176
url: http://hackage.haskell.org/
175
177
EOF
178
+ if $HEADHACKAGE; then
179
+ cat >> $CABAL_CONFIG <<EOF
180
+ repository head.hackage.ghc.haskell.org
181
+ url: https://ghc.gitlab.haskell.org/head.hackage/
182
+ secure: True
183
+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
184
+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
185
+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
186
+ key-threshold: 3
187
+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
188
+ EOF
189
+ fi
176
190
cat >> $CABAL_CONFIG <<EOF
177
191
program-default-options
178
192
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -196,7 +210,7 @@ jobs:
196
210
chmod a+x $HOME/.cabal/bin/cabal-plan
197
211
cabal-plan --version
198
212
- name : checkout
199
- uses : actions/checkout@v3
213
+ uses : actions/checkout@v4
200
214
with :
201
215
path : source
202
216
- name : initial cabal.project for sdist
@@ -233,7 +247,11 @@ jobs:
233
247
constraints: github-samples +openssl
234
248
constraints: operational -buildExamples
235
249
optimization: False
250
+ allow-newer: containers
236
251
EOF
252
+ if $HEADHACKAGE; then
253
+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
254
+ fi
237
255
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(github|github-samples)$/; }' >> cabal.project.local
238
256
cat cabal.project
239
257
cat cabal.project.local
@@ -273,6 +291,16 @@ jobs:
273
291
run : |
274
292
rm -f cabal.project.local
275
293
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
294
+ - name : prepare for constraint sets
295
+ run : |
296
+ rm -f cabal.project.local
297
+ - name : constraint set containers-0.7
298
+ run : |
299
+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run ; fi
300
+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
301
+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi
302
+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
303
+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
276
304
- name : save cache
277
305
uses : actions/cache/save@v3
278
306
if : always()
0 commit comments