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.20240708
12
12
#
13
- # REGENDATA ("0.17.20231010 ",["github","fgl.cabal"])
13
+ # REGENDATA ("0.19.20240708 ",["github","fgl.cabal"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
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 :
@@ -61,74 +61,39 @@ jobs:
61
61
- compiler : ghc-8.8.2
62
62
compilerKind : ghc
63
63
compilerVersion : 8.8.2
64
- setup-method : hvr-ppa
64
+ setup-method : ghcup
65
65
allow-failure : false
66
66
- compiler : ghc-8.6.2
67
67
compilerKind : ghc
68
68
compilerVersion : 8.6.2
69
- setup-method : hvr-ppa
69
+ setup-method : ghcup
70
70
allow-failure : false
71
71
- compiler : ghc-8.4.3
72
72
compilerKind : ghc
73
73
compilerVersion : 8.4.3
74
- setup-method : hvr-ppa
74
+ setup-method : ghcup
75
75
allow-failure : false
76
76
- compiler : ghc-8.2.2
77
77
compilerKind : ghc
78
78
compilerVersion : 8.2.2
79
- setup-method : hvr-ppa
79
+ setup-method : ghcup
80
80
allow-failure : false
81
81
- compiler : ghc-8.0.2
82
82
compilerKind : ghc
83
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
90
- allow-failure : false
91
- - compiler : ghc-7.8.4
92
- compilerKind : ghc
93
- compilerVersion : 7.8.4
94
- setup-method : hvr-ppa
95
- allow-failure : false
96
- - compiler : ghc-7.6.3
97
- compilerKind : ghc
98
- compilerVersion : 7.6.3
99
- setup-method : hvr-ppa
100
- allow-failure : false
101
- - compiler : ghc-7.4.2
102
- compilerKind : ghc
103
- compilerVersion : 7.4.2
104
- setup-method : hvr-ppa
105
- allow-failure : false
106
- - compiler : ghc-7.2.2
107
- compilerKind : ghc
108
- compilerVersion : 7.2.2
109
- setup-method : hvr-ppa
84
+ setup-method : ghcup
110
85
allow-failure : false
111
86
fail-fast : false
112
87
steps :
113
88
- name : apt
114
89
run : |
115
90
apt-get update
116
91
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.5/x86_64-linux-ghcup-0.1.19.5 > "$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.5/x86_64-linux-ghcup-0.1.19.5 > "$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
92
+ mkdir -p "$HOME/.ghcup/bin"
93
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
94
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
95
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
132
97
env :
133
98
HCKIND : ${{ matrix.compilerKind }}
134
99
HCNAME : ${{ matrix.compiler }}
@@ -140,22 +105,13 @@ jobs:
140
105
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
141
106
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
142
107
HCDIR=/opt/$HCKIND/$HCVER
143
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
144
- HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
145
- HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
146
- HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
147
- echo "HC=$HC" >> "$GITHUB_ENV"
148
- echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
149
- echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
150
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
151
- else
152
- HC=$HCDIR/bin/$HCKIND
153
- echo "HC=$HC" >> "$GITHUB_ENV"
154
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
155
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
156
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
157
- fi
158
-
108
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
109
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
110
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
111
+ echo "HC=$HC" >> "$GITHUB_ENV"
112
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
113
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
114
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
159
115
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
160
116
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
161
117
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -212,7 +168,7 @@ jobs:
212
168
chmod a+x $HOME/.cabal/bin/cabal-plan
213
169
cabal-plan --version
214
170
- name : checkout
215
- uses : actions/checkout@v3
171
+ uses : actions/checkout@v4
216
172
with :
217
173
path : source
218
174
- name : initial cabal.project for sdist
@@ -240,15 +196,15 @@ jobs:
240
196
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
241
197
cat >> cabal.project <<EOF
242
198
EOF
243
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(fgl)$/; }' >> cabal.project.local
199
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(fgl)$/; }' >> cabal.project.local
244
200
cat cabal.project
245
201
cat cabal.project.local
246
202
- name : dump install plan
247
203
run : |
248
204
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
249
205
cabal-plan
250
206
- name : restore cache
251
- uses : actions/cache/restore@v3
207
+ uses : actions/cache/restore@v4
252
208
with :
253
209
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
254
210
path : ~/.cabal/store
@@ -278,7 +234,7 @@ jobs:
278
234
rm -f cabal.project.local
279
235
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
280
236
- name : save cache
281
- uses : actions/cache/save@v3
237
+ uses : actions/cache/save@v4
282
238
if : always()
283
239
with :
284
240
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments