1
1
# This GitHub workflow config has been generated by a script via
2
2
#
3
- # haskell-ci 'github' '--config= cabal.haskell-ci' 'lattices.cabal '
3
+ # haskell-ci 'github' 'cabal.project '
4
4
#
5
5
# To regenerate the script (for example after adjusting tested-with) run
6
6
#
7
7
# haskell-ci regenerate
8
8
#
9
9
# For more information, see https://github.com/haskell-CI/haskell-ci
10
10
#
11
- # version: 0.19.20240708
11
+ # version: 0.19.20241223
12
12
#
13
- # REGENDATA ("0.19.20240708 ",["github","--config= cabal.haskell-ci","lattices.cabal "])
13
+ # REGENDATA ("0.19.20241223 ",["github","cabal.project "])
14
14
#
15
15
name : Haskell-CI
16
16
on :
@@ -32,19 +32,24 @@ jobs:
32
32
strategy :
33
33
matrix :
34
34
include :
35
+ - compiler : ghc-9.12.1
36
+ compilerKind : ghc
37
+ compilerVersion : 9.12.1
38
+ setup-method : ghcup
39
+ allow-failure : false
35
40
- compiler : ghc-9.10.1
36
41
compilerKind : ghc
37
42
compilerVersion : 9.10.1
38
43
setup-method : ghcup
39
44
allow-failure : false
40
- - compiler : ghc-9.8.2
45
+ - compiler : ghc-9.8.4
41
46
compilerKind : ghc
42
- compilerVersion : 9.8.2
47
+ compilerVersion : 9.8.4
43
48
setup-method : ghcup
44
49
allow-failure : false
45
- - compiler : ghc-9.6.5
50
+ - compiler : ghc-9.6.6
46
51
compilerKind : ghc
47
- compilerVersion : 9.6.5
52
+ compilerVersion : 9.6.6
48
53
setup-method : ghcup
49
54
allow-failure : false
50
55
- compiler : ghc-9.4.8
@@ -79,15 +84,29 @@ jobs:
79
84
allow-failure : false
80
85
fail-fast : false
81
86
steps :
82
- - name : apt
87
+ - name : apt-get install
83
88
run : |
84
89
apt-get update
85
90
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
91
+ - name : Install GHCup
92
+ run : |
86
93
mkdir -p "$HOME/.ghcup/bin"
87
94
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
88
95
chmod a+x "$HOME/.ghcup/bin/ghcup"
96
+ - name : Install cabal-install
97
+ run : |
98
+ "$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
99
+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
100
+ - name : Install GHC (GHCup)
101
+ if : matrix.setup-method == 'ghcup'
102
+ run : |
89
103
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
90
- "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
104
+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105
+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
106
+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
107
+ echo "HC=$HC" >> "$GITHUB_ENV"
108
+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
109
+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91
110
env :
92
111
HCKIND : ${{ matrix.compilerKind }}
93
112
HCNAME : ${{ matrix.compiler }}
@@ -98,21 +117,12 @@ jobs:
98
117
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99
118
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100
119
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
101
- HCDIR=/opt/$HCKIND/$HCVER
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.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109
120
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
110
121
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
111
122
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
112
123
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
113
124
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
114
125
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
115
- echo "GHCJSARITH=0" >> "$GITHUB_ENV"
116
126
env :
117
127
HCKIND : ${{ matrix.compilerKind }}
118
128
HCNAME : ${{ matrix.compiler }}
@@ -155,7 +165,7 @@ jobs:
155
165
- name : cache (tools)
156
166
uses : actions/cache/restore@v4
157
167
with :
158
- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-a326b3c0
168
+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-91770216
159
169
path : ~/.haskell-ci-tools
160
170
- name : install cabal-plan
161
171
run : |
@@ -180,10 +190,10 @@ jobs:
180
190
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
181
191
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --version ; fi
182
192
- name : save cache (tools)
183
- uses : actions/cache/save@v4
184
193
if : always()
194
+ uses : actions/cache/save@v4
185
195
with :
186
- key : ${{ runner.os }}-${{ matrix.compiler }}-tools-a326b3c0
196
+ key : ${{ runner.os }}-${{ matrix.compiler }}-tools-91770216
187
197
path : ~/.haskell-ci-tools
188
198
- name : checkout
189
199
uses : actions/checkout@v4
@@ -213,6 +223,8 @@ jobs:
213
223
echo "package lattices" >> cabal.project
214
224
echo " ghc-options: -Werror=missing-methods" >> cabal.project
215
225
cat >> cabal.project <<EOF
226
+ allow-newer: quickcheck-instances-0.3.32:base
227
+ allow-newer: these-1.2.1:base
216
228
EOF
217
229
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(lattices)$/; }' >> cabal.project.local
218
230
cat cabal.project
@@ -269,8 +281,8 @@ jobs:
269
281
if [ $((HCNUMVER >= 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='transformers ^>=0.6' --dependencies-only -j2 all ; fi
270
282
if [ $((HCNUMVER >= 80800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='transformers ^>=0.6' all ; fi
271
283
- name : save cache
272
- uses : actions/cache/save@v4
273
284
if : always()
285
+ uses : actions/cache/save@v4
274
286
with :
275
287
key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
276
288
path : ~/.cabal/store
0 commit comments