From 50ab26a0c0a4b8e6b963a4942aa388a955cba8e5 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Mon, 15 Jan 2024 15:19:02 -0600 Subject: [PATCH] allow `base-4.19`, `bytestring-0.12`, and test on GHC 9.8 --- .github/workflows/haskell-ci.yml | 41 +++++++++++++++++++------------- diagrams-rasterific.cabal | 12 +++++----- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index ec03289..14e03b0 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.16.1 +# version: 0.17.20231203 # -# REGENDATA ("0.16.1",["github","diagrams-rasterific.cabal"]) +# REGENDATA ("0.17.20231203",["github","diagrams-rasterific.cabal"]) # name: Haskell-CI on: @@ -28,19 +28,24 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.6.1 + - compiler: ghc-9.8.1 compilerKind: ghc - compilerVersion: 9.6.1 + compilerVersion: 9.8.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.5 + - compiler: ghc-9.6.3 compilerKind: ghc - compilerVersion: 9.4.5 + compilerVersion: 9.6.3 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.7 + - compiler: ghc-9.4.8 compilerKind: ghc - compilerVersion: 9.2.7 + 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 @@ -76,18 +81,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.2/x86_64-linux-ghcup-0.1.19.2 > "$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.2/x86_64-linux-ghcup-0.1.19.2 > "$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,17 +106,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.10.1.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.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))') diff --git a/diagrams-rasterific.cabal b/diagrams-rasterific.cabal index 0f0b17c..cc2ae63 100644 --- a/diagrams-rasterific.cabal +++ b/diagrams-rasterific.cabal @@ -13,7 +13,7 @@ category: Graphics build-type: Simple extra-source-files: fonts/*.ttf extra-doc-files: README.md, CHANGELOG.md -tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.7 || ==9.4.5 || ==9.6.1 +tested-with: GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.3 || ==9.8.1 cabal-version: 1.18 Source-repository head type: git @@ -25,7 +25,7 @@ library Diagrams.Backend.Rasterific.Text hs-source-dirs: src other-modules: Paths_diagrams_rasterific - build-depends: base >= 4.2 && < 4.19, + build-depends: base >= 4.2 && < 4.20, diagrams-core >= 1.4 && < 1.6, diagrams-lib >= 1.4 && < 1.5, hashable >= 1.1 && < 1.5, @@ -38,7 +38,7 @@ library containers >= 0.5 && < 0.7, filepath >= 1.2 && < 1.5, optparse-applicative >= 0.13 && < 0.19, - bytestring >= 0.9 && < 0.12, + bytestring >= 0.9 && < 0.13, file-embed >= 0.0 && < 0.1 default-language: Haskell2010 @@ -48,7 +48,7 @@ test-suite test-render type: exitcode-stdio-1.0 main-is: test-render.hs hs-source-dirs: test - build-depends: base >= 4.2 && < 4.19, + build-depends: base >= 4.2 && < 4.20, diagrams-rasterific, diagrams-core >= 1.4 && < 1.6, diagrams-lib >= 1.4 && < 1.5 @@ -59,7 +59,7 @@ test-suite test-widths type: exitcode-stdio-1.0 main-is: test-widths.hs hs-source-dirs: test - build-depends: base >= 4.2 && < 4.19, + build-depends: base >= 4.2 && < 4.20, diagrams-rasterific, diagrams-core >= 1.4 && < 1.6, diagrams-lib >= 1.4 && < 1.5 @@ -70,7 +70,7 @@ test-suite test-size type: exitcode-stdio-1.0 main-is: test-size.hs hs-source-dirs: test - build-depends: base >= 4.2 && < 4.19, + build-depends: base >= 4.2 && < 4.20, diagrams-rasterific, diagrams-core >= 1.4 && < 1.6, diagrams-lib >= 1.4 && < 1.5