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.17.20231010
11
+ # version: 0.19.20241021
12
12
#
13
- # REGENDATA ("0.17.20231010 ",["github","Diff.cabal"])
13
+ # REGENDATA ("0.19.20241021 ",["github","Diff.cabal"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
17
- - push
18
- - pull_request
17
+ push :
18
+ branches :
19
+ - master
20
+ pull_request :
21
+ branches :
22
+ - master
19
23
jobs :
20
24
linux :
21
25
name : Haskell-CI - Linux - ${{ matrix.compiler }}
22
26
runs-on : ubuntu-20.04
23
27
timeout-minutes :
24
28
60
25
29
container :
26
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:jammy
27
31
continue-on-error : ${{ matrix.allow-failure }}
28
32
strategy :
29
33
matrix :
30
34
include :
31
- - compiler : ghc-9.8.1
35
+ - compiler : ghc-9.12.20241014
32
36
compilerKind : ghc
33
- compilerVersion : 9.8.1
37
+ compilerVersion : 9.12.20241014
34
38
setup-method : ghcup
35
39
allow-failure : false
36
- - compiler : ghc-9.6.3
40
+ - compiler : ghc-9.10.1
37
41
compilerKind : ghc
38
- compilerVersion : 9.6.3
42
+ compilerVersion : 9.10.1
39
43
setup-method : ghcup
40
44
allow-failure : false
41
- - compiler : ghc-9.4.7
45
+ - compiler : ghc-9.8.2
42
46
compilerKind : ghc
43
- compilerVersion : 9.4.7
47
+ compilerVersion : 9.8.2
48
+ setup-method : ghcup
49
+ allow-failure : false
50
+ - compiler : ghc-9.6.6
51
+ compilerKind : ghc
52
+ compilerVersion : 9.6.6
53
+ setup-method : ghcup
54
+ allow-failure : false
55
+ - compiler : ghc-9.4.8
56
+ compilerKind : ghc
57
+ compilerVersion : 9.4.8
44
58
setup-method : ghcup
45
59
allow-failure : false
46
60
- compiler : ghc-9.2.8
@@ -61,54 +75,30 @@ jobs:
61
75
- compiler : ghc-8.8.4
62
76
compilerKind : ghc
63
77
compilerVersion : 8.8.4
64
- setup-method : hvr-ppa
78
+ setup-method : ghcup
65
79
allow-failure : false
66
80
- compiler : ghc-8.6.5
67
81
compilerKind : ghc
68
82
compilerVersion : 8.6.5
69
- setup-method : hvr-ppa
83
+ setup-method : ghcup
70
84
allow-failure : false
71
85
- compiler : ghc-8.4.4
72
86
compilerKind : ghc
73
87
compilerVersion : 8.4.4
74
- setup-method : hvr-ppa
75
- allow-failure : false
76
- - compiler : ghc-8.2.2
77
- compilerKind : ghc
78
- compilerVersion : 8.2.2
79
- setup-method : hvr-ppa
80
- allow-failure : false
81
- - compiler : ghc-8.0.2
82
- compilerKind : ghc
83
- compilerVersion : 8.0.2
84
- setup-method : hvr-ppa
85
- allow-failure : false
86
- - compiler : ghc-7.10.3
87
- compilerKind : ghc
88
- compilerVersion : 7.10.3
89
- setup-method : hvr-ppa
88
+ setup-method : ghcup
90
89
allow-failure : false
91
90
fail-fast : false
92
91
steps :
93
92
- name : apt
94
93
run : |
95
94
apt-get update
96
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
97
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
98
- mkdir -p "$HOME/.ghcup/bin"
99
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
100
- chmod a+x "$HOME/.ghcup/bin/ghcup"
101
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
102
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
103
- else
104
- apt-add-repository -y 'ppa:hvr/ghc'
105
- apt-get update
106
- apt-get install -y "$HCNAME"
107
- mkdir -p "$HOME/.ghcup/bin"
108
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
109
- chmod a+x "$HOME/.ghcup/bin/ghcup"
110
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
111
- fi
95
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
96
+ mkdir -p "$HOME/.ghcup/bin"
97
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
98
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
99
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
100
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
101
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
112
102
env :
113
103
HCKIND : ${{ matrix.compilerKind }}
114
104
HCNAME : ${{ matrix.compiler }}
@@ -120,27 +110,18 @@ jobs:
120
110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
121
111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
122
112
HCDIR=/opt/$HCKIND/$HCVER
123
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
124
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
125
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
126
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
127
- echo "HC=$HC" >> "$GITHUB_ENV"
128
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
129
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
130
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131
- else
132
- HC=$HCDIR/bin/$HCKIND
133
- echo "HC=$HC" >> "$GITHUB_ENV"
134
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
135
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
136
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137
- fi
138
-
113
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
114
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
115
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
116
+ echo "HC=$HC" >> "$GITHUB_ENV"
117
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
118
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
119
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
139
120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
140
121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
141
122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
142
123
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
143
- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
124
+ if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
144
125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
145
126
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
146
127
env :
@@ -169,6 +150,18 @@ jobs:
169
150
repository hackage.haskell.org
170
151
url: http://hackage.haskell.org/
171
152
EOF
153
+ if $HEADHACKAGE; then
154
+ cat >> $CABAL_CONFIG <<EOF
155
+ repository head.hackage.ghc.haskell.org
156
+ url: https://ghc.gitlab.haskell.org/head.hackage/
157
+ secure: True
158
+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
159
+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
160
+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
161
+ key-threshold: 3
162
+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
163
+ EOF
164
+ fi
172
165
cat >> $CABAL_CONFIG <<EOF
173
166
program-default-options
174
167
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -192,7 +185,7 @@ jobs:
192
185
chmod a+x $HOME/.cabal/bin/cabal-plan
193
186
cabal-plan --version
194
187
- name : checkout
195
- uses : actions/checkout@v3
188
+ uses : actions/checkout@v4
196
189
with :
197
190
path : source
198
191
- name : initial cabal.project for sdist
@@ -216,19 +209,22 @@ jobs:
216
209
touch cabal.project
217
210
touch cabal.project.local
218
211
echo "packages: ${PKGDIR_Diff}" >> cabal.project
219
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package Diff" >> cabal.project ; fi
220
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
212
+ echo "package Diff" >> cabal.project
213
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
221
214
cat >> cabal.project <<EOF
222
215
EOF
223
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Diff)$/; }' >> cabal.project.local
216
+ if $HEADHACKAGE; then
217
+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
218
+ fi
219
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Diff)$/; }' >> cabal.project.local
224
220
cat cabal.project
225
221
cat cabal.project.local
226
222
- name : dump install plan
227
223
run : |
228
224
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
229
225
cabal-plan
230
226
- name : restore cache
231
- uses : actions/cache/restore@v3
227
+ uses : actions/cache/restore@v4
232
228
with :
233
229
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
234
230
path : ~/.cabal/store
@@ -258,7 +254,7 @@ jobs:
258
254
rm -f cabal.project.local
259
255
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
260
256
- name : save cache
261
- uses : actions/cache/save@v3
257
+ uses : actions/cache/save@v4
262
258
if : always()
263
259
with :
264
260
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments