Skip to content

Commit

Permalink
Allow base-4.18
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanCacqueray committed Apr 22, 2023
1 parent e7479b1 commit c2066a2
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 39 deletions.
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
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
7 changes: 4 additions & 3 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,7 +60,7 @@ 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,
deepseq >= 1.0 && < 1.5,
Expand Down
7 changes: 4 additions & 3 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,7 +90,7 @@ 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,
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
10 changes: 5 additions & 5 deletions serialise/serialise.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ 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.*,
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,7 +161,7 @@ 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,
Expand Down Expand Up @@ -205,7 +205,7 @@ 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,
Expand Down Expand Up @@ -251,7 +251,7 @@ 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,
Expand Down

0 comments on commit c2066a2

Please sign in to comment.