8
8
#
9
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","vector-algorithms.cabal"])
13
+ # REGENDATA ("0.19.20241021 ",["github","vector-algorithms.cabal"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -27,11 +27,16 @@ jobs:
27
27
timeout-minutes :
28
28
60
29
29
container :
30
- image : buildpack-deps:focal
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.12.20241014
36
+ compilerKind : ghc
37
+ compilerVersion : 9.12.20241014
38
+ setup-method : ghcup
39
+ allow-failure : false
35
40
- compiler : ghc-9.10.1
36
41
compilerKind : ghc
37
42
compilerVersion : 9.10.1
42
47
compilerVersion : 9.8.2
43
48
setup-method : ghcup
44
49
allow-failure : false
45
- - compiler : ghc-9.6.5
50
+ - compiler : ghc-9.6.3
46
51
compilerKind : ghc
47
- compilerVersion : 9.6.5
52
+ compilerVersion : 9.6.3
48
53
setup-method : ghcup
49
54
allow-failure : false
50
55
- compiler : ghc-9.4.7
@@ -70,56 +75,40 @@ jobs:
70
75
- compiler : ghc-8.8.4
71
76
compilerKind : ghc
72
77
compilerVersion : 8.8.4
73
- setup-method : hvr-ppa
78
+ setup-method : ghcup
74
79
allow-failure : false
75
80
- compiler : ghc-8.6.5
76
81
compilerKind : ghc
77
82
compilerVersion : 8.6.5
78
- setup-method : hvr-ppa
83
+ setup-method : ghcup
79
84
allow-failure : false
80
85
- compiler : ghc-8.4.4
81
86
compilerKind : ghc
82
87
compilerVersion : 8.4.4
83
- setup-method : hvr-ppa
88
+ setup-method : ghcup
84
89
allow-failure : false
85
90
- compiler : ghc-8.2.2
86
91
compilerKind : ghc
87
92
compilerVersion : 8.2.2
88
- setup-method : hvr-ppa
93
+ setup-method : ghcup
89
94
allow-failure : false
90
95
- compiler : ghc-8.0.2
91
96
compilerKind : ghc
92
97
compilerVersion : 8.0.2
93
- setup-method : hvr-ppa
94
- allow-failure : false
95
- - compiler : ghc-7.10.3
96
- compilerKind : ghc
97
- compilerVersion : 7.10.3
98
- setup-method : hvr-ppa
98
+ setup-method : ghcup
99
99
allow-failure : false
100
100
fail-fast : false
101
101
steps :
102
102
- name : apt
103
103
run : |
104
104
apt-get update
105
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
106
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
111
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
112
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
113
- else
114
- apt-add-repository -y 'ppa:hvr/ghc'
115
- apt-get update
116
- apt-get install -y "$HCNAME"
117
- mkdir -p "$HOME/.ghcup/bin"
118
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
119
- chmod a+x "$HOME/.ghcup/bin/ghcup"
120
- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
121
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122
- fi
105
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
106
+ mkdir -p "$HOME/.ghcup/bin"
107
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
108
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
109
+ "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
110
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
111
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123
112
env :
124
113
HCKIND : ${{ matrix.compilerKind }}
125
114
HCNAME : ${{ matrix.compiler }}
@@ -131,27 +120,18 @@ jobs:
131
120
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
132
121
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
133
122
HCDIR=/opt/$HCKIND/$HCVER
134
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
135
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
136
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
137
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
138
- echo "HC=$HC" >> "$GITHUB_ENV"
139
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
140
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
141
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
142
- else
143
- HC=$HCDIR/bin/$HCKIND
144
- echo "HC=$HC" >> "$GITHUB_ENV"
145
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
146
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
147
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
148
- fi
149
-
123
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
124
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
125
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
126
+ echo "HC=$HC" >> "$GITHUB_ENV"
127
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
128
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
129
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
150
130
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
151
131
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
152
- if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
132
+ echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
153
133
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
154
- echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
134
+ if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE= false" >> "$GITHUB_ENV" ; fi
155
135
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
156
136
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
157
137
env :
@@ -180,6 +160,18 @@ jobs:
180
160
repository hackage.haskell.org
181
161
url: http://hackage.haskell.org/
182
162
EOF
163
+ if $HEADHACKAGE; then
164
+ cat >> $CABAL_CONFIG <<EOF
165
+ repository head.hackage.ghc.haskell.org
166
+ url: https://ghc.gitlab.haskell.org/head.hackage/
167
+ secure: True
168
+ root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
169
+ 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
170
+ f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
171
+ key-threshold: 3
172
+ active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
173
+ EOF
174
+ fi
183
175
cat >> $CABAL_CONFIG <<EOF
184
176
program-default-options
185
177
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -231,15 +223,18 @@ jobs:
231
223
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
232
224
cat >> cabal.project <<EOF
233
225
EOF
234
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(vector-algorithms)$/; }' >> cabal.project.local
226
+ if $HEADHACKAGE; then
227
+ echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
228
+ fi
229
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(vector-algorithms)$/; }' >> cabal.project.local
235
230
cat cabal.project
236
231
cat cabal.project.local
237
232
- name : dump install plan
238
233
run : |
239
234
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
240
235
cabal-plan
241
236
- name : restore cache
242
- uses : actions/cache/restore@v3
237
+ uses : actions/cache/restore@v4
243
238
with :
244
239
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
245
240
path : ~/.cabal/store
@@ -256,7 +251,7 @@ jobs:
256
251
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
257
252
- name : tests
258
253
run : |
259
- if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $ CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
254
+ $ CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
260
255
- name : cabal check
261
256
run : |
262
257
cd ${PKGDIR_vector_algorithms} || false
@@ -269,7 +264,7 @@ jobs:
269
264
rm -f cabal.project.local
270
265
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
271
266
- name : save cache
272
- uses : actions/cache/save@v3
267
+ uses : actions/cache/save@v4
273
268
if : always()
274
269
with :
275
270
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments