Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #310 : support ghc-9.6 #313

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 37 additions & 26 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.15.20220920
# version: 0.16
#
# REGENDATA ("0.15.20220920",["github","cabal.project"])
# REGENDATA ("0.16",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -28,6 +28,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.6.1
compilerKind: ghc
compilerVersion: 9.6.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.2
compilerKind: ghc
compilerVersion: 9.4.2
Expand Down Expand Up @@ -71,18 +76,18 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME"
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand All @@ -100,13 +105,13 @@ jobs:
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi

HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
Expand Down Expand Up @@ -158,23 +163,23 @@ jobs:
- name: install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
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
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
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
echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c -
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: source
- name: initial cabal.project for sdist
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/cborg" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/cbor-tool" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/serialise" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/binary-serialise-cbor" >> cabal.project
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/serialise" >> cabal.project ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/binary-serialise-cbor" >> cabal.project ; fi
echo "packages: $GITHUB_WORKSPACE/source/cborg-json" >> cabal.project
cat cabal.project
- name: sdist
Expand Down Expand Up @@ -202,17 +207,17 @@ jobs:
touch cabal.project.local
echo "packages: ${PKGDIR_cborg}" >> cabal.project
echo "packages: ${PKGDIR_cbor_tool}" >> cabal.project
echo "packages: ${PKGDIR_serialise}" >> cabal.project
echo "packages: ${PKGDIR_binary_serialise_cbor}" >> cabal.project
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo "packages: ${PKGDIR_serialise}" >> cabal.project ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo "packages: ${PKGDIR_binary_serialise_cbor}" >> cabal.project ; fi
echo "packages: ${PKGDIR_cborg_json}" >> cabal.project
echo "package cborg" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package cbor-tool" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package serialise" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package binary-serialise-cbor" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo "package serialise" >> cabal.project ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo "package binary-serialise-cbor" >> cabal.project ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package cborg-json" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
Expand All @@ -225,8 +230,8 @@ jobs:
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: cache
uses: actions/cache@v2
- name: restore cache
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -250,16 +255,22 @@ jobs:
${CABAL} -vnormal check
cd ${PKGDIR_cbor_tool} || false
${CABAL} -vnormal check
cd ${PKGDIR_serialise} || false
${CABAL} -vnormal check
cd ${PKGDIR_binary_serialise_cbor} || false
${CABAL} -vnormal check
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then cd ${PKGDIR_serialise} || false ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then cd ${PKGDIR_binary_serialise_cbor} || false ; fi
if [ $((HCNUMVER < 90600)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
cd ${PKGDIR_cborg_json} || false
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
2 changes: 1 addition & 1 deletion binary-serialise-cbor/binary-serialise-cbor.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ library
exposed-modules: Data.Binary.Serialise.CBOR.Read

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
bytestring < 1.0,

cborg == 0.2.*,
Expand Down
5 changes: 3 additions & 2 deletions cbor-tool/cbor-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2
GHC == 9.4.2,
GHC == 9.6.1

executable cbor-tool
main-is: Main.hs
other-extensions: CPP, BangPatterns
ghc-options: -Wall
build-depends:
base >=4.11 && <4.18,
base >=4.11 && <4.19,
filepath >=1.0 && <1.5,
aeson >=0.7 && <2.2,
aeson-pretty >=0.8 && <0.9,
Expand Down
9 changes: 5 additions & 4 deletions cborg-json/cborg-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2
GHC == 9.4.2,
GHC == 9.6.1

library
exposed-modules: Codec.CBOR.JSON
ghc-options: -Wall
build-depends:
base >=4.11 && < 4.18,
base >=4.11 && < 4.19,
aeson >=0.7 && <2.2,
aeson-pretty >=0.8 && <0.9,
unordered-containers >=0.2 && <0.3,
Expand Down Expand Up @@ -59,9 +60,9 @@ benchmark bench
other-modules:

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
bytestring >= 0.10.4 && < 0.12,
criterion >= 1.0 && < 1.6,
criterion >= 1.0 && < 1.7,
deepseq >= 1.0 && < 1.5,
zlib >= 0.5 && < 0.7,
directory,
Expand Down
9 changes: 5 additions & 4 deletions cborg/cborg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2
GHC == 9.4.2,
GHC == 9.6.1

extra-source-files:
ChangeLog.md
Expand Down Expand Up @@ -89,11 +90,11 @@ library

build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
bytestring >= 0.10.4 && < 0.12,
containers >= 0.5 && < 0.7,
deepseq >= 1.0 && < 1.5,
ghc-prim >= 0.3.1.0 && < 0.10,
ghc-prim >= 0.3.1.0 && < 0.11,
half >= 0.2.2.3 && < 0.4,
primitive >= 0.5 && < 0.9,
text >= 1.1 && < 1.3 || >= 2.0 && <2.1
Expand Down Expand Up @@ -147,7 +148,7 @@ test-suite tests

build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
base-orphans,
bytestring >= 0.10.4 && < 0.12,
text >= 1.1 && < 2.1,
Expand Down
26 changes: 13 additions & 13 deletions serialise/serialise.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ library
Codec.Serialise.Internal.GeneralisedUTF8

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
array >= 0.4 && < 0.6,
bytestring >= 0.10.4 && < 0.12,
cborg == 0.2.*,
containers >= 0.5 && < 0.7,
ghc-prim >= 0.3.1.0 && < 0.10,
ghc-prim >= 0.3.1.0 && < 0.11,
half >= 0.2.2.3 && < 0.4,
hashable >= 1.2 && < 2.0,
primitive >= 0.5 && < 0.9,
strict >= 0.4 && < 0.5,
strict >= 0.4 && < 0.6,
text >= 1.1 && < 2.1,
these >= 1.1 && < 1.2,
these >= 1.1 && < 1.3,
unordered-containers >= 0.2 && < 0.3,
vector >= 0.10 && < 0.14

Expand Down Expand Up @@ -124,7 +124,7 @@ test-suite tests
Tests.GeneralisedUTF8

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
bytestring >= 0.10.4 && < 0.12,
directory >= 1.0 && < 1.4,
filepath >= 1.0 && < 1.5,
Expand Down Expand Up @@ -161,15 +161,15 @@ benchmark instances
Instances.Time

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
binary >= 0.7 && < 0.11,
bytestring >= 0.10.4 && < 0.12,
vector >= 0.10 && < 0.14,
cborg,
serialise,

deepseq >= 1.0 && < 1.5,
criterion >= 1.0 && < 1.6
criterion >= 1.0 && < 1.7

if flag(newtime15)
build-depends:
Expand Down Expand Up @@ -205,17 +205,17 @@ benchmark micro
SimpleVersus

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
binary >= 0.7 && < 0.11,
bytestring >= 0.10.4 && < 0.12,
ghc-prim >= 0.3.1.0 && < 0.10,
ghc-prim >= 0.3.1.0 && < 0.11,
vector >= 0.10 && < 0.14,
cborg,
serialise,

aeson >= 0.7 && < 2.2,
deepseq >= 1.0 && < 1.5,
criterion >= 1.0 && < 1.6,
criterion >= 1.0 && < 1.7,
cereal >= 0.5.2.0 && < 0.6,
cereal-vector >= 0.2 && < 0.3,
semigroups >= 0.18 && < 0.21,
Expand Down Expand Up @@ -251,12 +251,12 @@ benchmark versus
Macro.CBOR

build-depends:
base >= 4.11 && < 4.18,
base >= 4.11 && < 4.19,
array >= 0.4 && < 0.6,
binary >= 0.7 && < 0.11,
bytestring >= 0.10.4 && < 0.12,
directory >= 1.0 && < 1.4,
ghc-prim >= 0.3.1.0 && < 0.10,
ghc-prim >= 0.3.1.0 && < 0.11,
fail >= 4.9.0.0 && < 4.10,
text >= 1.1 && < 2.1,
vector >= 0.10 && < 0.14,
Expand All @@ -272,7 +272,7 @@ benchmark versus
tar >= 0.4 && < 0.6,
zlib >= 0.5 && < 0.7,
pretty >= 1.0 && < 1.2,
criterion >= 1.0 && < 1.6,
criterion >= 1.0 && < 1.7,
store >= 0.7.1 && < 0.8,
semigroups

Expand Down