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.20240514
12
12
#
13
- # REGENDATA ("0.17.20231010 ",["github","cabal.project"])
13
+ # REGENDATA ("0.19.20240514 ",["github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -27,24 +27,29 @@ 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.10 .1
36
36
compilerKind : ghc
37
- compilerVersion : 9.8 .1
37
+ compilerVersion : 9.10 .1
38
38
setup-method : ghcup
39
39
allow-failure : false
40
- - compiler : ghc-9.6.3
40
+ - compiler : ghc-9.8.2
41
41
compilerKind : ghc
42
- compilerVersion : 9.6.3
42
+ compilerVersion : 9.8.2
43
43
setup-method : ghcup
44
44
allow-failure : false
45
- - compiler : ghc-9.4.7
45
+ - compiler : ghc-9.6.5
46
46
compilerKind : ghc
47
- compilerVersion : 9.4.7
47
+ compilerVersion : 9.6.5
48
+ setup-method : ghcup
49
+ allow-failure : false
50
+ - compiler : ghc-9.4.8
51
+ compilerKind : ghc
52
+ compilerVersion : 9.4.8
48
53
setup-method : ghcup
49
54
allow-failure : false
50
55
- compiler : ghc-9.2.8
@@ -65,69 +70,24 @@ jobs:
65
70
- compiler : ghc-8.8.4
66
71
compilerKind : ghc
67
72
compilerVersion : 8.8.4
68
- setup-method : hvr-ppa
73
+ setup-method : ghcup
69
74
allow-failure : false
70
75
- compiler : ghc-8.6.5
71
76
compilerKind : ghc
72
77
compilerVersion : 8.6.5
73
- setup-method : hvr-ppa
74
- allow-failure : false
75
- - compiler : ghc-8.4.4
76
- compilerKind : ghc
77
- compilerVersion : 8.4.4
78
- setup-method : hvr-ppa
79
- allow-failure : false
80
- - compiler : ghc-8.2.2
81
- compilerKind : ghc
82
- compilerVersion : 8.2.2
83
- setup-method : hvr-ppa
84
- allow-failure : false
85
- - compiler : ghc-8.0.2
86
- compilerKind : ghc
87
- compilerVersion : 8.0.2
88
- setup-method : hvr-ppa
89
- allow-failure : false
90
- - compiler : ghc-7.10.3
91
- compilerKind : ghc
92
- compilerVersion : 7.10.3
93
- setup-method : hvr-ppa
94
- allow-failure : false
95
- - compiler : ghc-7.8.4
96
- compilerKind : ghc
97
- compilerVersion : 7.8.4
98
- setup-method : hvr-ppa
99
- allow-failure : false
100
- - compiler : ghc-7.6.3
101
- compilerKind : ghc
102
- compilerVersion : 7.6.3
103
- setup-method : hvr-ppa
104
- allow-failure : false
105
- - compiler : ghc-7.4.2
106
- compilerKind : ghc
107
- compilerVersion : 7.4.2
108
- setup-method : hvr-ppa
78
+ setup-method : ghcup
109
79
allow-failure : false
110
80
fail-fast : false
111
81
steps :
112
82
- name : apt
113
83
run : |
114
84
apt-get update
115
85
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
116
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
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" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
121
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
122
- else
123
- apt-add-repository -y 'ppa:hvr/ghc'
124
- apt-get update
125
- apt-get install -y "$HCNAME"
126
- mkdir -p "$HOME/.ghcup/bin"
127
- curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
128
- chmod a+x "$HOME/.ghcup/bin/ghcup"
129
- "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
130
- fi
86
+ mkdir -p "$HOME/.ghcup/bin"
87
+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
88
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
89
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
131
91
env :
132
92
HCKIND : ${{ matrix.compilerKind }}
133
93
HCNAME : ${{ matrix.compiler }}
@@ -139,22 +99,13 @@ jobs:
139
99
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
140
100
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
141
101
HCDIR=/opt/$HCKIND/$HCVER
142
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
143
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
144
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
145
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
146
- echo "HC=$HC" >> "$GITHUB_ENV"
147
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
148
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
149
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
150
- else
151
- HC=$HCDIR/bin/$HCKIND
152
- echo "HC=$HC" >> "$GITHUB_ENV"
153
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
154
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
155
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
156
- fi
157
-
102
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
103
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
104
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
105
+ echo "HC=$HC" >> "$GITHUB_ENV"
106
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
107
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
108
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
158
109
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
159
110
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
160
111
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -211,7 +162,7 @@ jobs:
211
162
chmod a+x $HOME/.cabal/bin/cabal-plan
212
163
cabal-plan --version
213
164
- name : checkout
214
- uses : actions/checkout@v3
165
+ uses : actions/checkout@v4
215
166
with :
216
167
path : source
217
168
- name : initial cabal.project for sdist
@@ -235,19 +186,19 @@ jobs:
235
186
touch cabal.project
236
187
touch cabal.project.local
237
188
echo "packages: ${PKGDIR_binary_orphans}" >> cabal.project
238
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package binary-orphans" >> cabal.project ; fi
239
- if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
189
+ echo "package binary-orphans" >> cabal.project
190
+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
240
191
cat >> cabal.project <<EOF
241
192
EOF
242
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary-orphans)$/; }' >> cabal.project.local
193
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(binary-orphans)$/; }' >> cabal.project.local
243
194
cat cabal.project
244
195
cat cabal.project.local
245
196
- name : dump install plan
246
197
run : |
247
198
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
248
199
cabal-plan
249
200
- name : restore cache
250
- uses : actions/cache/restore@v3
201
+ uses : actions/cache/restore@v4
251
202
with :
252
203
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
253
204
path : ~/.cabal/store
@@ -277,7 +228,7 @@ jobs:
277
228
rm -f cabal.project.local
278
229
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
279
230
- name : save cache
280
- uses : actions/cache/save@v3
231
+ uses : actions/cache/save@v4
281
232
if : always()
282
233
with :
283
234
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments