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

Support ghc 9.12 #339

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
118 changes: 55 additions & 63 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.16
# version: 0.19.20250104
#
# REGENDATA ("0.16",["github","cabal.project"])
# REGENDATA ("0.19.20250104",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -23,29 +23,34 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.8.1
- compiler: ghc-9.8.4
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.8.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
- compiler: ghc-9.6.6
compilerKind: ghc
compilerVersion: 9.6.3
compilerVersion: 9.6.6
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.7
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.7
compilerVersion: 9.4.8
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.2.2
Expand All @@ -56,7 +61,7 @@ jobs:
- compiler: ghc-9.0.1
compilerKind: ghc
compilerVersion: 9.0.1
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.10.7
compilerKind: ghc
Expand All @@ -66,39 +71,43 @@ jobs:
- compiler: ghc-8.8.3
compilerKind: ghc
compilerVersion: 8.8.3
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
- name: apt-get install
run: |
apt-get update
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.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.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.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.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -109,28 +118,12 @@ jobs:
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
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.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.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))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand Down Expand Up @@ -180,16 +173,16 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
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
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/serialise" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/binary-serialise-cbor" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/cborg-json" >> cabal.project
cat cabal.project
- name: sdist
Expand Down Expand Up @@ -217,31 +210,30 @@ jobs:
touch cabal.project.local
echo "packages: ${PKGDIR_cborg}" >> cabal.project
echo "packages: ${PKGDIR_cbor_tool}" >> 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_serialise}" >> cabal.project
echo "packages: ${PKGDIR_binary_serialise_cbor}" >> cabal.project
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
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 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
echo "package cborg-json" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: store-core:text
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary-serialise-cbor|cbor-tool|cborg|cborg-json|serialise)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(binary-serialise-cbor|cbor-tool|cborg|cborg-json|serialise)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand All @@ -265,10 +257,10 @@ jobs:
${CABAL} -vnormal check
cd ${PKGDIR_cbor_tool} || 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_serialise} || false
${CABAL} -vnormal check
cd ${PKGDIR_binary_serialise_cbor} || false
${CABAL} -vnormal check
cd ${PKGDIR_cborg_json} || false
${CABAL} -vnormal check
- name: haddock
Expand All @@ -279,8 +271,8 @@ jobs:
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()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
8 changes: 6 additions & 2 deletions binary-serialise-cbor/binary-serialise-cbor.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2
GHC == 9.4.8
GHC == 9.6.6
GHC == 9.8.4
GHC == 9.10.1
GHC == 9.12.1

extra-source-files:
ChangeLog.md
Expand Down Expand Up @@ -51,7 +55,7 @@ library
exposed-modules: Data.Binary.Serialise.CBOR.Read

build-depends:
base >= 4.11 && < 4.21,
base >= 4.11 && < 4.22,
bytestring < 1.0,

cborg == 0.2.*,
Expand Down
8 changes: 5 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ packages:
binary-serialise-cbor/
cborg-json/

-- Needed for serialise benchmarks
allow-newer:
store-core:text
if impl (ghc >= 9.12)
allow-newer:
, aeson:ghc-prim
, aeson:template-haskell
, bytestring:ghc-prim
9 changes: 6 additions & 3 deletions cbor-tool/cbor-tool.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2,
GHC == 9.6.1
GHC == 9.4.8
GHC == 9.6.6
GHC == 9.8.4
GHC == 9.10.1
GHC == 9.12.1

executable cbor-tool
main-is: Main.hs
other-extensions: CPP, BangPatterns
ghc-options: -Wall
build-depends:
base >=4.11 && <4.21,
base >=4.11 && <4.22,
filepath >=1.0 && <1.6,
aeson >=0.7 && <2.3,
aeson-pretty >=0.8 && <0.9,
Expand Down
13 changes: 8 additions & 5 deletions cborg-json/cborg-json.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2,
GHC == 9.6.1
GHC == 9.4.8
GHC == 9.6.6
GHC == 9.8.4
GHC == 9.10.1
GHC == 9.12.1

library
exposed-modules: Codec.CBOR.JSON
ghc-options: -Wall
build-depends:
base >=4.11 && < 4.21,
base >=4.11 && < 4.22,
aeson >=0.7 && <2.3,
aeson-pretty >=0.8 && <0.9,
base64-bytestring >=1.0 && <1.3,
Expand Down Expand Up @@ -61,7 +64,7 @@ benchmark bench
other-modules:

build-depends:
base >= 4.11 && < 4.21,
base >= 4.11 && < 4.22,
bytestring >= 0.10.4 && < 0.13,
criterion >= 1.0 && < 1.7,
deepseq >= 1.0 && < 1.6,
Expand All @@ -87,7 +90,7 @@ test-suite tests
other-modules:

build-depends:
base >= 4.7 && < 4.21,
base >= 4.7 && < 4.22,
base-orphans,
base16-bytestring >= 1.0 && < 1.1,
bytestring >= 0.10.4 && < 0.13,
Expand Down
13 changes: 8 additions & 5 deletions cborg/cborg.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ tested-with:
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2,
GHC == 9.6.1
GHC == 9.4.8
GHC == 9.6.6
GHC == 9.8.4
GHC == 9.10.1
GHC == 9.12.1

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

build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.21,
base >= 4.11 && < 4.22,
bytestring >= 0.10.4 && < 0.13,
containers >= 0.5 && < 0.8,
deepseq >= 1.0 && < 1.6,
ghc-prim >= 0.3.1.0 && < 0.12,
ghc-prim >= 0.3.1.0 && < 0.14,
half >= 0.2.2.3 && < 0.4,
primitive >= 0.5 && < 0.10,
text >= 1.1 && < 1.3 || >= 2.0 && <2.2
Expand Down Expand Up @@ -148,7 +151,7 @@ test-suite tests

build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.21,
base >= 4.11 && < 4.22,
base-orphans,
bytestring >= 0.10.4 && < 0.13,
text >= 1.1 && < 2.2,
Expand Down
Loading
Loading