From f859f8b1bf6f9476c05a906f1a26f87ce6182626 Mon Sep 17 00:00:00 2001 From: Adam Bergmark Date: Sun, 4 Feb 2024 14:51:10 +0100 Subject: [PATCH] chore: GHC 9.8 support w/ CI (#70) * chore: 9.8 support Builds fine * CI for GHC 9.6 & 9.8 --------- Co-authored-by: Vekhir <134215107+Vekhir@users.noreply.github.com> --- .github/workflows/haskell-ci.yml | 48 +++++++++++++++++++------------- feed.cabal | 16 ++++++----- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index ddc6cd7..83d1d04 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.15.20230203 +# version: 0.17.20240109 # -# REGENDATA ("0.15.20230203",["github","feed.cabal"]) +# REGENDATA ("0.17.20240109",["github","feed.cabal"]) # name: Haskell-CI on: @@ -28,14 +28,24 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.4.4 + - compiler: ghc-9.8.1 compilerKind: ghc - compilerVersion: 9.4.4 + compilerVersion: 9.8.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.5 + - compiler: ghc-9.6.4 compilerKind: ghc - compilerVersion: 9.2.5 + compilerVersion: 9.6.4 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.4.8 + compilerKind: ghc + compilerVersion: 9.4.8 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.2.8 + compilerKind: ghc + compilerVersion: 9.2.8 setup-method: ghcup allow-failure: false - compiler: ghc-9.0.2 @@ -96,20 +106,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.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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.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.18.0/x86_64-linux-ghcup-0.1.18.0 > "$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" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; - "$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.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 }} @@ -123,17 +131,19 @@ jobs: echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$HOME/.ghcup/bin/$HCKIND-$HCVER + 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=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$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.9.0.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))') @@ -185,8 +195,8 @@ 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 diff --git a/feed.cabal b/feed.cabal index c49bae6..f1d72a3 100644 --- a/feed.cabal +++ b/feed.cabal @@ -34,8 +34,10 @@ tested-with: , GHC == 8.8.4 , GHC == 8.10.7 , GHC == 9.0.2 - , GHC == 9.2.5 - , GHC == 9.4.4 + , GHC == 9.2.8 + , GHC == 9.4.8 + , GHC == 9.6.4 + , GHC == 9.8.1 data-files: tests/files/*.xml extra-source-files: @@ -80,13 +82,13 @@ library Data.Text.Util Data.XML.Compat build-depends: - base >= 4 && < 4.18 + base >= 4 && < 4.20 , base-compat >= 0.9 && < 0.13 - , bytestring >= 0.9 && < 0.12 + , bytestring >= 0.9 && < 0.13 , old-locale == 1.0.* , old-time >= 1 && < 1.2 , safe == 0.3.* - , text < 1.3 || ==2.0.* + , text < 1.3 || >= 2.0 && < 2.2 , time < 1.13 , time-locale-compat == 0.1.* , utf8-string < 1.1 @@ -118,7 +120,7 @@ test-suite tests Text.RSS.Tests Text.RSS.Utils build-depends: - base >= 4.6 && < 4.18 + base >= 4.6 && < 4.20 , base-compat >= 0.9 && < 0.13 , HUnit >= 1.2 && < 1.7 , feed @@ -126,7 +128,7 @@ test-suite tests , syb , test-framework == 0.8.* , test-framework-hunit == 0.3.* - , text < 1.3 || ==2.0.* + , text < 1.3 || >= 2.0 && < 2.2 , time < 1.13 , xml-types >= 0.3.6 && < 0.4 , xml-conduit >= 1.3 && < 1.10