8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.13.20220102
11
+ # version: 0.19.20250115
12
12
#
13
- # REGENDATA ("0.13.20220102 ",["github","cabal.project"])
13
+ # REGENDATA ("0.19.20250115 ",["github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
19
19
jobs :
20
20
linux :
21
21
name : Haskell-CI - Linux - ${{ matrix.compiler }}
22
- runs-on : ubuntu-18 .04
22
+ runs-on : ubuntu-20 .04
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.12.1
32
+ compilerKind : ghc
33
+ compilerVersion : 9.12.1
34
+ setup-method : ghcup
35
+ allow-failure : false
36
+ - compiler : ghc-9.10.1
37
+ compilerKind : ghc
38
+ compilerVersion : 9.10.1
39
+ setup-method : ghcup
40
+ allow-failure : false
41
+ - compiler : ghc-9.8.4
42
+ compilerKind : ghc
43
+ compilerVersion : 9.8.4
44
+ setup-method : ghcup
45
+ allow-failure : false
46
+ - compiler : ghc-9.6.6
47
+ compilerKind : ghc
48
+ compilerVersion : 9.6.6
49
+ setup-method : ghcup
50
+ allow-failure : false
51
+ - compiler : ghc-9.4.8
52
+ compilerKind : ghc
53
+ compilerVersion : 9.4.8
54
+ setup-method : ghcup
55
+ allow-failure : false
31
56
- compiler : ghc-9.2.1
32
57
compilerKind : ghc
33
58
compilerVersion : 9.2.1
@@ -36,64 +61,63 @@ jobs:
36
61
- compiler : ghc-9.0.1
37
62
compilerKind : ghc
38
63
compilerVersion : 9.0.1
39
- setup-method : hvr-ppa
64
+ setup-method : ghcup
40
65
allow-failure : false
41
66
- compiler : ghc-8.10.4
42
67
compilerKind : ghc
43
68
compilerVersion : 8.10.4
44
- setup-method : hvr-ppa
69
+ setup-method : ghcup
45
70
allow-failure : false
46
71
- compiler : ghc-8.8.3
47
72
compilerKind : ghc
48
73
compilerVersion : 8.8.3
49
- setup-method : hvr-ppa
74
+ setup-method : ghcup
50
75
allow-failure : false
51
76
- compiler : ghc-8.6.5
52
77
compilerKind : ghc
53
78
compilerVersion : 8.6.5
54
- setup-method : hvr-ppa
79
+ setup-method : ghcup
55
80
allow-failure : false
56
81
- compiler : ghc-8.4.4
57
82
compilerKind : ghc
58
83
compilerVersion : 8.4.4
59
- setup-method : hvr-ppa
84
+ setup-method : ghcup
60
85
allow-failure : false
61
86
- compiler : ghc-8.2.2
62
87
compilerKind : ghc
63
88
compilerVersion : 8.2.2
64
- setup-method : hvr-ppa
89
+ setup-method : ghcup
65
90
allow-failure : false
66
91
- compiler : ghc-8.0.2
67
92
compilerKind : ghc
68
93
compilerVersion : 8.0.2
69
- setup-method : hvr-ppa
70
- allow-failure : false
71
- - compiler : ghc-7.10.3
72
- compilerKind : ghc
73
- compilerVersion : 7.10.3
74
- setup-method : hvr-ppa
94
+ setup-method : ghcup
75
95
allow-failure : false
76
96
fail-fast : false
77
97
steps :
78
- - name : apt
98
+ - name : apt-get install
79
99
run : |
80
100
apt-get update
81
- apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
82
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
83
- mkdir -p "$HOME/.ghcup/bin"
84
- curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
85
- chmod a+x "$HOME/.ghcup/bin/ghcup"
86
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
87
- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
88
- else
89
- apt-add-repository -y 'ppa:hvr/ghc'
90
- apt-get update
91
- apt-get install -y "$HCNAME"
92
- mkdir -p "$HOME/.ghcup/bin"
93
- curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
94
- chmod a+x "$HOME/.ghcup/bin/ghcup"
95
- "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
96
- fi
101
+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
102
+ - name : Install GHCup
103
+ run : |
104
+ mkdir -p "$HOME/.ghcup/bin"
105
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
106
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
107
+ - name : Install cabal-install
108
+ run : |
109
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
110
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
111
+ - name : Install GHC (GHCup)
112
+ if : matrix.setup-method == 'ghcup'
113
+ run : |
114
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
115
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
116
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
117
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
118
+ echo "HC=$HC" >> "$GITHUB_ENV"
119
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
120
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
97
121
env :
98
122
HCKIND : ${{ matrix.compilerKind }}
99
123
HCNAME : ${{ matrix.compiler }}
@@ -104,28 +128,12 @@ jobs:
104
128
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
105
129
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
106
130
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
107
- HCDIR=/opt/$HCKIND/$HCVER
108
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
109
- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
110
- echo "HC=$HC" >> "$GITHUB_ENV"
111
- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
112
- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
113
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
114
- else
115
- HC=$HCDIR/bin/$HCKIND
116
- echo "HC=$HC" >> "$GITHUB_ENV"
117
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
118
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
119
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120
- fi
121
-
122
131
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
123
132
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
124
133
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
125
134
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
126
135
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
127
136
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
128
- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
129
137
env :
130
138
HCKIND : ${{ matrix.compilerKind }}
131
139
HCNAME : ${{ matrix.compiler }}
@@ -168,14 +176,14 @@ jobs:
168
176
- name : install cabal-plan
169
177
run : |
170
178
mkdir -p $HOME/.cabal/bin
171
- curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2 .0/cabal-plan-0.6.2 .0-x86_64-linux.xz > cabal-plan.xz
172
- echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
179
+ curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3 .0/cabal-plan-0.7.3 .0-x86_64-linux.xz > cabal-plan.xz
180
+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
173
181
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
174
182
rm -f cabal-plan.xz
175
183
chmod a+x $HOME/.cabal/bin/cabal-plan
176
184
cabal-plan --version
177
185
- name : checkout
178
- uses : actions/checkout@v2
186
+ uses : actions/checkout@v4
179
187
with :
180
188
path : source
181
189
- name : initial cabal.project for sdist
@@ -209,15 +217,15 @@ jobs:
209
217
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
210
218
cat >> cabal.project <<EOF
211
219
EOF
212
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(ghc-dump-core|ghc-dump-util)$/; }' >> cabal.project.local
220
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(ghc-dump-core|ghc-dump-util)$/; }' >> cabal.project.local
213
221
cat cabal.project
214
222
cat cabal.project.local
215
223
- name : dump install plan
216
224
run : |
217
225
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
218
226
cabal-plan
219
- - name : cache
220
- uses : actions/cache@v2
227
+ - name : restore cache
228
+ uses : actions/cache/restore@v4
221
229
with :
222
230
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
223
231
path : ~/.cabal/store
@@ -240,8 +248,14 @@ jobs:
240
248
${CABAL} -vnormal check
241
249
- name : haddock
242
250
run : |
243
- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
251
+ $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
244
252
- name : unconstrained build
245
253
run : |
246
254
rm -f cabal.project.local
247
255
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
256
+ - name : save cache
257
+ if : always()
258
+ uses : actions/cache/save@v4
259
+ with :
260
+ key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
261
+ path : ~/.cabal/store
0 commit comments