8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.15.20230217
11
+ # version: 0.19.20240708
12
12
#
13
- # REGENDATA ("0.15.20230217 ",["github","cabal.project"])
13
+ # REGENDATA ("0.19.20240708 ",["github","cabal.project"])
14
14
#
15
15
name : Haskell-CI
16
16
on :
17
- - push
18
- - pull_request
17
+ push :
18
+ branches :
19
+ - master
20
+ pull_request :
21
+ branches :
22
+ - master
19
23
jobs :
20
24
linux :
21
25
name : Haskell-CI - Linux - ${{ matrix.compiler }}
22
26
runs-on : ubuntu-20.04
23
27
timeout-minutes :
24
28
60
25
29
container :
26
- image : buildpack-deps:bionic
30
+ image : buildpack-deps:jammy
27
31
continue-on-error : ${{ matrix.allow-failure }}
28
32
strategy :
29
33
matrix :
30
34
include :
31
- - compiler : ghc-9.4.4
35
+ - compiler : ghc-9.10.1
32
36
compilerKind : ghc
33
- compilerVersion : 9.4.4
37
+ compilerVersion : 9.10.1
34
38
setup-method : ghcup
35
39
allow-failure : false
36
- - compiler : ghc-9.2.5
40
+ - compiler : ghc-9.8.2
37
41
compilerKind : ghc
38
- compilerVersion : 9.2.5
42
+ compilerVersion : 9.8.2
39
43
setup-method : ghcup
40
44
allow-failure : false
41
- - compiler : ghc-9.0.2
45
+ - compiler : ghc-9.6.6
42
46
compilerKind : ghc
43
- compilerVersion : 9.0.2
47
+ compilerVersion : 9.6.6
44
48
setup-method : ghcup
45
49
allow-failure : false
46
- - compiler : ghc-8.10.7
50
+ - compiler : ghc-9.4.8
47
51
compilerKind : ghc
48
- compilerVersion : 8.10.7
52
+ compilerVersion : 9.4.8
53
+ setup-method : ghcup
54
+ allow-failure : false
55
+ - compiler : ghc-9.2.8
56
+ compilerKind : ghc
57
+ compilerVersion : 9.2.8
49
58
setup-method : ghcup
50
59
allow-failure : false
51
- - compiler : ghc-8.8.4
60
+ - compiler : ghc-8.10.7
52
61
compilerKind : ghc
53
- compilerVersion : 8.8.4
54
- setup-method : hvr-ppa
62
+ compilerVersion : 8.10.7
63
+ setup-method : ghcup
55
64
allow-failure : false
56
65
fail-fast : false
57
66
steps :
58
67
- name : apt
59
68
run : |
60
69
apt-get update
61
70
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
62
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
63
- mkdir -p "$HOME/.ghcup/bin"
64
- curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
65
- chmod a+x "$HOME/.ghcup/bin/ghcup"
66
- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
67
- "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
68
- "$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
69
- else
70
- apt-add-repository -y 'ppa:hvr/ghc'
71
- apt-get update
72
- apt-get install -y "$HCNAME"
73
- mkdir -p "$HOME/.ghcup/bin"
74
- curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
75
- chmod a+x "$HOME/.ghcup/bin/ghcup"
76
- "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
77
- "$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
78
- fi
71
+ mkdir -p "$HOME/.ghcup/bin"
72
+ curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
73
+ chmod a+x "$HOME/.ghcup/bin/ghcup"
74
+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
75
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
79
76
env :
80
77
HCKIND : ${{ matrix.compilerKind }}
81
78
HCNAME : ${{ matrix.compiler }}
@@ -87,20 +84,13 @@ jobs:
87
84
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
88
85
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
89
86
HCDIR=/opt/$HCKIND/$HCVER
90
- if [ "${{ matrix.setup-method }}" = ghcup ]; then
91
- HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
92
- echo "HC=$HC" >> "$GITHUB_ENV"
93
- echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
94
- echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
95
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
96
- else
97
- HC=$HCDIR/bin/$HCKIND
98
- echo "HC=$HC" >> "$GITHUB_ENV"
99
- echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
100
- echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
101
- echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
102
- fi
103
-
87
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
88
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
89
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
90
+ echo "HC=$HC" >> "$GITHUB_ENV"
91
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
92
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
93
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
104
94
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
105
95
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
106
96
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -150,14 +140,14 @@ jobs:
150
140
- name : install cabal-plan
151
141
run : |
152
142
mkdir -p $HOME/.cabal/bin
153
- 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
154
- echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
143
+ 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
144
+ echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
155
145
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
156
146
rm -f cabal-plan.xz
157
147
chmod a+x $HOME/.cabal/bin/cabal-plan
158
148
cabal-plan --version
159
149
- name : checkout
160
- uses : actions/checkout@v3
150
+ uses : actions/checkout@v4
161
151
with :
162
152
path : source
163
153
- name : initial cabal.project for sdist
@@ -185,15 +175,15 @@ jobs:
185
175
echo " ghc-options: -Werror=missing-methods" >> cabal.project
186
176
cat >> cabal.project <<EOF
187
177
EOF
188
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(json-sop)$/; }' >> cabal.project.local
178
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any. $_ installed\n" unless /^(json-sop)$/; }' >> cabal.project.local
189
179
cat cabal.project
190
180
cat cabal.project.local
191
181
- name : dump install plan
192
182
run : |
193
183
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
194
184
cabal-plan
195
185
- name : restore cache
196
- uses : actions/cache/restore@v3
186
+ uses : actions/cache/restore@v4
197
187
with :
198
188
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
199
189
path : ~/.cabal/store
@@ -223,7 +213,7 @@ jobs:
223
213
rm -f cabal.project.local
224
214
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
225
215
- name : save cache
226
- uses : actions/cache/save@v3
216
+ uses : actions/cache/save@v4
227
217
if : always()
228
218
with :
229
219
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
0 commit comments