8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.16.6
11
+ # version: 0.19.20240708
12
12
#
13
- # REGENDATA ("0.16.6 ",["github","cabal.project"])
13
+ # REGENDATA ("0.19.20240708 ",["github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -23,19 +23,29 @@ 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.6.2
31
+ - compiler : ghc-9.10.1
32
32
compilerKind : ghc
33
- compilerVersion : 9.6.2
33
+ compilerVersion : 9.10.1
34
34
setup-method : ghcup
35
35
allow-failure : false
36
- - compiler : ghc-9.4.5
36
+ - compiler : ghc-9.8.2
37
37
compilerKind : ghc
38
- compilerVersion : 9.4.5
38
+ compilerVersion : 9.8.2
39
+ setup-method : ghcup
40
+ allow-failure : false
41
+ - compiler : ghc-9.6.6
42
+ compilerKind : ghc
43
+ compilerVersion : 9.6.6
44
+ setup-method : ghcup
45
+ allow-failure : false
46
+ - compiler : ghc-9.4.8
47
+ compilerKind : ghc
48
+ compilerVersion : 9.4.8
39
49
setup-method : ghcup
40
50
allow-failure : false
41
51
- compiler : ghc-9.2.8
@@ -56,79 +66,39 @@ jobs:
56
66
- compiler : ghc-8.8.4
57
67
compilerKind : ghc
58
68
compilerVersion : 8.8.4
59
- setup-method : hvr-ppa
69
+ setup-method : ghcup
60
70
allow-failure : false
61
71
- compiler : ghc-8.6.5
62
72
compilerKind : ghc
63
73
compilerVersion : 8.6.5
64
- setup-method : hvr-ppa
74
+ setup-method : ghcup
65
75
allow-failure : false
66
76
- compiler : ghc-8.4.4
67
77
compilerKind : ghc
68
78
compilerVersion : 8.4.4
69
- setup-method : hvr-ppa
79
+ setup-method : ghcup
70
80
allow-failure : false
71
81
- compiler : ghc-8.2.2
72
82
compilerKind : ghc
73
83
compilerVersion : 8.2.2
74
- setup-method : hvr-ppa
84
+ setup-method : ghcup
75
85
allow-failure : false
76
86
- compiler : ghc-8.0.2
77
87
compilerKind : ghc
78
88
compilerVersion : 8.0.2
79
- setup-method : hvr-ppa
80
- allow-failure : false
81
- - compiler : ghc-7.10.3
82
- compilerKind : ghc
83
- compilerVersion : 7.10.3
84
- setup-method : hvr-ppa
85
- allow-failure : false
86
- - compiler : ghc-7.8.4
87
- compilerKind : ghc
88
- compilerVersion : 7.8.4
89
- setup-method : hvr-ppa
90
- allow-failure : false
91
- - compiler : ghc-7.6.3
92
- compilerKind : ghc
93
- compilerVersion : 7.6.3
94
- setup-method : hvr-ppa
95
- allow-failure : false
96
- - compiler : ghc-7.4.2
97
- compilerKind : ghc
98
- compilerVersion : 7.4.2
99
- setup-method : hvr-ppa
100
- allow-failure : false
101
- - compiler : ghc-7.2.2
102
- compilerKind : ghc
103
- compilerVersion : 7.2.2
104
- setup-method : hvr-ppa
105
- allow-failure : false
106
- - compiler : ghc-7.0.4
107
- compilerKind : ghc
108
- compilerVersion : 7.0.4
109
- setup-method : hvr-ppa
89
+ setup-method : ghcup
110
90
allow-failure : false
111
91
fail-fast : false
112
92
steps :
113
93
- name : apt
114
94
run : |
115
95
apt-get update
116
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
117
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
118
- mkdir -p "$HOME/.ghcup/bin"
119
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
120
- chmod a+x "$HOME/.ghcup/bin/ghcup"
121
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
122
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123
- else
124
- apt-add-repository -y 'ppa:hvr/ghc'
125
- apt-get update
126
- apt-get install -y "$HCNAME"
127
- mkdir -p "$HOME/.ghcup/bin"
128
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
129
- chmod a+x "$HOME/.ghcup/bin/ghcup"
130
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
131
- fi
96
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
97
+ mkdir -p "$HOME/.ghcup/bin"
98
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
99
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
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)
132
102
env :
133
103
HCKIND : ${{ matrix.compilerKind }}
134
104
HCNAME : ${{ matrix.compiler }}
@@ -140,20 +110,13 @@ jobs:
140
110
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
141
111
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
142
112
HCDIR=/opt/$HCKIND/$HCVER
143
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
144
- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
145
- echo "HC=$HC" >> "$GITHUB_ENV"
146
- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
147
- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
148
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
149
- else
150
- HC=$HCDIR/bin/$HCKIND
151
- echo "HC=$HC" >> "$GITHUB_ENV"
152
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
153
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
154
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
155
- fi
156
-
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"
157
120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
158
121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
159
122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -210,7 +173,7 @@ jobs:
210
173
chmod a+x $HOME/.cabal/bin/cabal-plan
211
174
cabal-plan --version
212
175
- name : checkout
213
- uses : actions/checkout@v3
176
+ uses : actions/checkout@v4
214
177
with :
215
178
path : source
216
179
- name : initial cabal.project for sdist
@@ -238,15 +201,15 @@ jobs:
238
201
package data-reify
239
202
flags: +tests
240
203
EOF
241
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(data-reify)$/; }' >> cabal.project.local
204
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(data-reify)$/; }' >> cabal.project.local
242
205
cat cabal.project
243
206
cat cabal.project.local
244
207
- name : dump install plan
245
208
run : |
246
209
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
247
210
cabal-plan
248
211
- name : restore cache
249
- uses : actions/cache/restore@v3
212
+ uses : actions/cache/restore@v4
250
213
with :
251
214
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
252
215
path : ~/.cabal/store
@@ -269,7 +232,7 @@ jobs:
269
232
run : |
270
233
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
271
234
- name : save cache
272
- uses : actions/cache/save@v3
235
+ uses : actions/cache/save@v4
273
236
if : always()
274
237
with :
275
238
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments