From 9a922b615226610a09cfb8b9a37a9f33f9eff692 Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Wed, 27 Dec 2023 16:30:38 -0600 Subject: [PATCH] Test/allow GHC 9.6, 9.8 (#72) --- .github/workflows/haskell-ci.yml | 46 +++++++++++-------- .../servant-multipart-api.cabal | 8 ++-- .../servant-multipart-client.cabal | 8 ++-- servant-multipart/servant-multipart.cabal | 8 ++-- 4 files changed, 43 insertions(+), 27 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 66d5219..7503fe3 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.17.20230826 +# version: 0.17.20231203 # -# REGENDATA ("0.17.20230826",["github","cabal.project","--allow-failures",">= 9.2","--distribution","focal"]) +# REGENDATA ("0.17.20231203",["github","cabal.project","--allow-failures",">= 9.2","--distribution","focal"]) # name: Haskell-CI on: @@ -32,9 +32,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.4.7 + - compiler: ghc-9.8.1 compilerKind: ghc - compilerVersion: 9.4.7 + compilerVersion: 9.8.1 + setup-method: ghcup + allow-failure: true + - compiler: ghc-9.6.3 + compilerKind: ghc + compilerVersion: 9.6.3 + setup-method: ghcup + allow-failure: true + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 setup-method: ghcup allow-failure: true - compiler: ghc-9.2.8 @@ -70,18 +80,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.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$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) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.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.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$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) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi env: HCKIND: ${{ matrix.compilerKind }} @@ -101,13 +111,13 @@ jobs: echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.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" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.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))') @@ -252,16 +262,16 @@ jobs: rm -f cabal.project.local - name: constraint set servant-0.20 run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all --dry-run - cabal-plan topo | sort - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all + if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all --dry-run ; fi + if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi + if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' --dependencies-only -j2 all ; fi + if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.20.*' all ; fi - name: constraint set servant-0.19 run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all --dry-run - cabal-plan topo | sort - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all + if [ $((HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all --dry-run ; fi + if [ $((HCNUMVER < 90600)) -ne 0 ] ; then cabal-plan topo | sort ; fi + if [ $((HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' --dependencies-only -j2 all ; fi + if [ $((HCNUMVER < 90600)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.19.*' all ; fi - name: constraint set servant-0.18 run: | if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.18.*' all --dry-run ; fi diff --git a/servant-multipart-api/servant-multipart-api.cabal b/servant-multipart-api/servant-multipart-api.cabal index cad1cfa..a659b22 100644 --- a/servant-multipart-api/servant-multipart-api.cabal +++ b/servant-multipart-api/servant-multipart-api.cabal @@ -21,7 +21,9 @@ tested-with: || ==8.10.7 || ==9.0.2 || ==9.2.8 - || ==9.4.7 + || ==9.4.8 + || ==9.6.3 + || ==9.8.1 library default-language: Haskell2010 @@ -31,8 +33,8 @@ library -- ghc boot libs build-depends: base >=4.9 && <5 - , bytestring >=0.10.8.1 && <0.12 - , text >=1.2.3.0 && <2.1 + , bytestring >=0.10.8.1 && <0.13 + , text >=1.2.3.0 && <2.2 , transformers >=0.5.2.0 && <0.7 -- other dependencies diff --git a/servant-multipart-client/servant-multipart-client.cabal b/servant-multipart-client/servant-multipart-client.cabal index 1a13f4b..d527ff4 100644 --- a/servant-multipart-client/servant-multipart-client.cabal +++ b/servant-multipart-client/servant-multipart-client.cabal @@ -20,7 +20,9 @@ tested-with: || ==8.10.7 || ==9.0.2 || ==9.2.8 - || ==9.4.7 + || ==9.4.8 + || ==9.6.3 + || ==9.8.1 library default-language: Haskell2010 @@ -31,8 +33,8 @@ library build-depends: array >=0.5.1.1 && <0.6 , base >=4.9 && <5 - , bytestring >=0.10.8.1 && <0.12 - , text >=1.2.3.0 && <2.1 + , bytestring >=0.10.8.1 && <0.13 + , text >=1.2.3.0 && <2.2 , random >=0.1.1 && <1.3 -- other dependencies diff --git a/servant-multipart/servant-multipart.cabal b/servant-multipart/servant-multipart.cabal index 90b2947..d0aa7ff 100644 --- a/servant-multipart/servant-multipart.cabal +++ b/servant-multipart/servant-multipart.cabal @@ -20,7 +20,9 @@ tested-with: || ==8.10.7 || ==9.0.2 || ==9.2.8 - || ==9.4.7 + || ==9.4.8 + || ==9.6.3 + || ==9.8.1 library default-language: Haskell2010 @@ -30,9 +32,9 @@ library -- ghc boot libs build-depends: base >=4.9 && <5 - , bytestring >=0.10.8.1 && <0.12 + , bytestring >=0.10.8.1 && <0.13 , directory >=1.3 && <1.4 - , text >=1.2.3.0 && <2.1 + , text >=1.2.3.0 && <2.2 -- other dependencies build-depends: