Skip to content

Commit 0ae4c04

Browse files
committed
v0.2.1.3-r1: allow filepath-1.5 in test-yaml; bump CI to GHC 9.10.0
1 parent 703eb0f commit 0ae4c04

File tree

2 files changed

+54
-56
lines changed

2 files changed

+54
-56
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 46 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.17.20231012
11+
# version: 0.19.20240416
1212
#
13-
# REGENDATA ("0.17.20231012",["github","HsYAML.cabal"])
13+
# REGENDATA ("0.19.20240416",["github","HsYAML.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,19 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.8.1
35+
- compiler: ghc-9.10.0.20240413
3636
compilerKind: ghc
37-
compilerVersion: 9.8.1
37+
compilerVersion: 9.10.0.20240413
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.8.2
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.8.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.4.7
45+
- compiler: ghc-9.6.4
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.6.4
48+
setup-method: ghcup
49+
allow-failure: false
50+
- compiler: ghc-9.4.8
51+
compilerKind: ghc
52+
compilerVersion: 9.4.8
4853
setup-method: ghcup
4954
allow-failure: false
5055
- compiler: ghc-9.2.8
@@ -87,34 +92,18 @@ jobs:
8792
compilerVersion: 8.0.2
8893
setup-method: ghcup
8994
allow-failure: false
90-
- compiler: ghc-7.10.3
91-
compilerKind: ghc
92-
compilerVersion: 7.10.3
93-
setup-method: hvr-ppa
94-
allow-failure: false
9595
fail-fast: false
9696
steps:
9797
- name: apt
9898
run: |
9999
apt-get update
100100
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
102-
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
104-
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
106-
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
107-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
108-
else
109-
apt-add-repository -y 'ppa:hvr/ghc'
110-
apt-get update
111-
apt-get install -y "$HCNAME"
112-
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
114-
chmod a+x "$HOME/.ghcup/bin/ghcup"
115-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
116-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117-
fi
101+
mkdir -p "$HOME/.ghcup/bin"
102+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
103+
chmod a+x "$HOME/.ghcup/bin/ghcup"
104+
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
105+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
106+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
118107
env:
119108
HCKIND: ${{ matrix.compilerKind }}
120109
HCNAME: ${{ matrix.compiler }}
@@ -126,27 +115,18 @@ jobs:
126115
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
127116
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
128117
HCDIR=/opt/$HCKIND/$HCVER
129-
if [ "${{ matrix.setup-method }}" = ghcup ]; then
130-
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
131-
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
132-
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
133-
echo "HC=$HC" >> "$GITHUB_ENV"
134-
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
135-
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
136-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137-
else
138-
HC=$HCDIR/bin/$HCKIND
139-
echo "HC=$HC" >> "$GITHUB_ENV"
140-
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
141-
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
142-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143-
fi
144-
118+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
119+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
120+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
121+
echo "HC=$HC" >> "$GITHUB_ENV"
122+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
123+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
124+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
145125
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
146126
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
147-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi
127+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
148128
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
149-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
129+
if [ $((HCNUMVER >= 91000)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
150130
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
151131
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
152132
env:
@@ -175,6 +155,18 @@ jobs:
175155
repository hackage.haskell.org
176156
url: http://hackage.haskell.org/
177157
EOF
158+
if $HEADHACKAGE; then
159+
cat >> $CABAL_CONFIG <<EOF
160+
repository head.hackage.ghc.haskell.org
161+
url: https://ghc.gitlab.haskell.org/head.hackage/
162+
secure: True
163+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
164+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
165+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
166+
key-threshold: 3
167+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
168+
EOF
169+
fi
178170
cat >> $CABAL_CONFIG <<EOF
179171
program-default-options
180172
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -226,6 +218,9 @@ jobs:
226218
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
227219
cat >> cabal.project <<EOF
228220
EOF
221+
if $HEADHACKAGE; then
222+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
223+
fi
229224
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(HsYAML)$/; }' >> cabal.project.local
230225
cat cabal.project
231226
cat cabal.project.local
@@ -234,7 +229,7 @@ jobs:
234229
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
235230
cabal-plan
236231
- name: restore cache
237-
uses: actions/cache/restore@v3
232+
uses: actions/cache/restore@v4
238233
with:
239234
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
240235
path: ~/.cabal/store
@@ -251,7 +246,7 @@ jobs:
251246
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
252247
- name: tests
253248
run: |
254-
if [ $((HCNUMVER >= 80000)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct ; fi
249+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
255250
- name: cabal check
256251
run: |
257252
cd ${PKGDIR_HsYAML} || false
@@ -264,7 +259,7 @@ jobs:
264259
rm -f cabal.project.local
265260
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
266261
- name: save cache
267-
uses: actions/cache/save@v3
262+
uses: actions/cache/save@v4
268263
if: always()
269264
with:
270265
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}

HsYAML.cabal

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cabal-version: 1.14
22
name: HsYAML
33
version: 0.2.1.3
4+
x-revision: 1
45

56
synopsis: Pure Haskell YAML 1.2 processor
67
homepage: https://github.com/haskell-hvr/HsYAML
@@ -15,9 +16,10 @@ copyright: 2015-2018 Herbert Valerio Riedel
1516
category: Text
1617
build-type: Simple
1718
tested-with:
18-
GHC == 9.8.1
19-
GHC == 9.6.3
20-
GHC == 9.4.7
19+
GHC == 9.10.0
20+
GHC == 9.8.2
21+
GHC == 9.6.4
22+
GHC == 9.4.8
2123
GHC == 9.2.8
2224
GHC == 9.0.2
2325
GHC == 8.10.7
@@ -26,7 +28,8 @@ tested-with:
2628
GHC == 8.4.4
2729
GHC == 8.2.2
2830
GHC == 8.0.2
29-
GHC == 7.10.3
31+
-- Skip testing on GHC 7.10 as it does not install with GHCup on ubuntu-22.04
32+
-- GHC == 7.10.3
3033
-- Skip testing on GHC 7.8 as it ships a too old 'transformers'
3134
-- GHC == 7.8.4
3235
-- Skip testing these legacy GHC versions:
@@ -134,7 +137,7 @@ executable yaml-test
134137
-- non-inherited
135138
, megaparsec >= 7.0 && < 10
136139
, microaeson == 0.1.*
137-
, filepath == 1.4.*
140+
, filepath >= 1.4 && < 1.6
138141
, directory >= 1.2 && < 1.4
139142
else
140143
buildable: False

0 commit comments

Comments
 (0)