Skip to content

Commit 8cfe183

Browse files
committed
Update Tested-With, run Haskell-CI
1 parent 6da2960 commit 8cfe183

File tree

2 files changed

+61
-51
lines changed

2 files changed

+61
-51
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.16.3
11+
# version: 0.19.20250115
1212
#
13-
# REGENDATA ("0.16.3",["github","servant-blaze.cabal","--allow-failures",">= 9.2","--distribution","focal"])
13+
# REGENDATA ("0.19.20250115",["github","servant-blaze.cabal","--allow-failures",">= 9.2","--distribution","focal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,19 +32,29 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.6.2
35+
- compiler: ghc-9.10.1
3636
compilerKind: ghc
37-
compilerVersion: 9.6.2
37+
compilerVersion: 9.10.1
3838
setup-method: ghcup
3939
allow-failure: true
40-
- compiler: ghc-9.4.5
40+
- compiler: ghc-9.8.4
4141
compilerKind: ghc
42-
compilerVersion: 9.4.5
42+
compilerVersion: 9.8.4
4343
setup-method: ghcup
4444
allow-failure: true
45-
- compiler: ghc-9.2.7
45+
- compiler: ghc-9.6.6
4646
compilerKind: ghc
47-
compilerVersion: 9.2.7
47+
compilerVersion: 9.6.6
48+
setup-method: ghcup
49+
allow-failure: true
50+
- compiler: ghc-9.4.8
51+
compilerKind: ghc
52+
compilerVersion: 9.4.8
53+
setup-method: ghcup
54+
allow-failure: true
55+
- compiler: ghc-9.2.8
56+
compilerKind: ghc
57+
compilerVersion: 9.2.8
4858
setup-method: ghcup
4959
allow-failure: true
5060
- compiler: ghc-9.0.2
@@ -60,34 +70,38 @@ jobs:
6070
- compiler: ghc-8.8.4
6171
compilerKind: ghc
6272
compilerVersion: 8.8.4
63-
setup-method: hvr-ppa
73+
setup-method: ghcup
6474
allow-failure: false
6575
- compiler: ghc-8.6.5
6676
compilerKind: ghc
6777
compilerVersion: 8.6.5
68-
setup-method: hvr-ppa
78+
setup-method: ghcup
6979
allow-failure: false
7080
fail-fast: false
7181
steps:
72-
- name: apt
82+
- name: apt-get install
7383
run: |
7484
apt-get update
7585
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
76-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
77-
mkdir -p "$HOME/.ghcup/bin"
78-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
79-
chmod a+x "$HOME/.ghcup/bin/ghcup"
80-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
81-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
82-
else
83-
apt-add-repository -y 'ppa:hvr/ghc'
84-
apt-get update
85-
apt-get install -y "$HCNAME"
86-
mkdir -p "$HOME/.ghcup/bin"
87-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
88-
chmod a+x "$HOME/.ghcup/bin/ghcup"
89-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
fi
86+
- name: Install GHCup
87+
run: |
88+
mkdir -p "$HOME/.ghcup/bin"
89+
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
90+
chmod a+x "$HOME/.ghcup/bin/ghcup"
91+
- name: Install cabal-install
92+
run: |
93+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
94+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
95+
- name: Install GHC (GHCup)
96+
if: matrix.setup-method == 'ghcup'
97+
run: |
98+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
99+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
100+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
101+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
102+
echo "HC=$HC" >> "$GITHUB_ENV"
103+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
104+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
91105
env:
92106
HCKIND: ${{ matrix.compilerKind }}
93107
HCNAME: ${{ matrix.compiler }}
@@ -98,28 +112,12 @@ jobs:
98112
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
99113
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
100114
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
101-
HCDIR=/opt/$HCKIND/$HCVER
102-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
103-
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
104-
echo "HC=$HC" >> "$GITHUB_ENV"
105-
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
106-
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
107-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
108-
else
109-
HC=$HCDIR/bin/$HCKIND
110-
echo "HC=$HC" >> "$GITHUB_ENV"
111-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
112-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
113-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
114-
fi
115-
116115
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
117116
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
118117
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
119118
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
120119
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
121120
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
122-
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
123121
env:
124122
HCKIND: ${{ matrix.compilerKind }}
125123
HCNAME: ${{ matrix.compiler }}
@@ -169,7 +167,7 @@ jobs:
169167
chmod a+x $HOME/.cabal/bin/cabal-plan
170168
cabal-plan --version
171169
- name: checkout
172-
uses: actions/checkout@v3
170+
uses: actions/checkout@v4
173171
with:
174172
path: source
175173
- name: initial cabal.project for sdist
@@ -197,15 +195,15 @@ jobs:
197195
echo " ghc-options: -Werror=missing-methods" >> cabal.project
198196
cat >> cabal.project <<EOF
199197
EOF
200-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(servant-blaze)$/; }' >> cabal.project.local
198+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(servant-blaze)$/; }' >> cabal.project.local
201199
cat cabal.project
202200
cat cabal.project.local
203201
- name: dump install plan
204202
run: |
205203
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
206204
cabal-plan
207205
- name: restore cache
208-
uses: actions/cache/restore@v3
206+
uses: actions/cache/restore@v4
209207
with:
210208
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
211209
path: ~/.cabal/store
@@ -239,27 +237,37 @@ jobs:
239237
rm -f cabal.project.local
240238
- name: constraint set servant-0.20
241239
run: |
242-
if [ $((HCNUMVER >= 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' --dependencies-only -j2 all ; fi
243-
if [ $((HCNUMVER >= 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all ; fi
240+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all --dry-run ; fi
241+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
242+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' --dependencies-only -j2 all ; fi
243+
if [ $((HCNUMVER >= 81000 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all ; fi
244244
- name: constraint set servant-0.19
245245
run: |
246+
if [ $((HCNUMVER >= 80800 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all --dry-run ; fi
247+
if [ $((HCNUMVER >= 80800 && HCNUMVER < 90600)) -ne 0 ] ; then cabal-plan topo | sort ; fi
246248
if [ $((HCNUMVER >= 80800 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' --dependencies-only -j2 all ; fi
247249
if [ $((HCNUMVER >= 80800 && HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all ; fi
248250
- name: constraint set servant-0.18
249251
run: |
252+
if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' all --dry-run ; fi
253+
if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
250254
if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' --dependencies-only -j2 all ; fi
251255
if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' all ; fi
252256
- name: constraint set servant-0.17
253257
run: |
258+
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all --dry-run ; fi
259+
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
254260
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' --dependencies-only -j2 all ; fi
255261
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all ; fi
256262
- name: constraint set servant-0.16
257263
run: |
264+
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all --dry-run ; fi
265+
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
258266
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' --dependencies-only -j2 all ; fi
259267
if [ $((HCNUMVER < 81000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all ; fi
260268
- name: save cache
261-
uses: actions/cache/save@v3
262269
if: always()
270+
uses: actions/cache/save@v4
263271
with:
264272
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
265273
path: ~/.cabal/store

servant-blaze.cabal

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ tested-with:
2222
|| ==8.8.4
2323
|| ==8.10.7
2424
|| ==9.0.2
25-
|| ==9.2.7
26-
|| ==9.4.5
27-
|| ==9.6.2
25+
|| ==9.2.8
26+
|| ==9.4.8
27+
|| ==9.6.6
28+
|| ==9.8.4
29+
|| ==9.10.1
2830
extra-source-files: CHANGELOG.md
2931

3032
source-repository head

0 commit comments

Comments
 (0)