From 2f5079043c3d30ad1fc3dd10613a92dc54305436 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Wed, 11 Dec 2024 16:30:39 +1100 Subject: [PATCH 1/2] Support ghc 9.12 --- aeson.cabal | 6 ++-- attoparsec-iso8601/attoparsec-iso8601.cabal | 2 +- cabal.project | 38 +++++++++++++++++++++ text-iso8601/text-iso8601.cabal | 6 ++-- 4 files changed, 45 insertions(+), 7 deletions(-) diff --git a/aeson.cabal b/aeson.cabal index 1b25c577..0c8666e4 100644 --- a/aeson.cabal +++ b/aeson.cabal @@ -98,10 +98,10 @@ library , containers >=0.6.0.1 && <0.8 , deepseq >=1.4.4.0 && <1.6 , exceptions >=0.10.4 && <0.11 - , ghc-prim >=0.5.0.0 && <0.12 - , template-haskell >=2.14.0.0 && <2.23 + , ghc-prim >=0.5.0.0 && <0.14 + , template-haskell >=2.14.0.0 && <2.24 , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2 - , time >=1.8.0.2 && <1.13 + , time >=1.8.0.2 && <1.15 -- Compat build-depends: diff --git a/attoparsec-iso8601/attoparsec-iso8601.cabal b/attoparsec-iso8601/attoparsec-iso8601.cabal index e824b099..f61c11eb 100644 --- a/attoparsec-iso8601/attoparsec-iso8601.cabal +++ b/attoparsec-iso8601/attoparsec-iso8601.cabal @@ -44,7 +44,7 @@ library , base >=4.12.0.0 && <5 , integer-conversion >=0.1 && <0.2 , text >=1.2.3.0 && <1.3.0.0 || >=2.0 && <2.2 - , time >=1.8.0.2 && <1.13 + , time >=1.8.0.2 && <1.15 , time-compat >=1.9.4 && <1.10 source-repository head diff --git a/cabal.project b/cabal.project index 3210d215..a4fe2bae 100644 --- a/cabal.project +++ b/cabal.project @@ -10,6 +10,44 @@ benchmarks: true allow-newer: hermes-json:attoparsec-iso8601 +if impl (ghc >= 9.12) + allow-newer: + , aeson:time + , assoc:base + , attoparsec:ghc-prim + , bifunctors:template-haskell + , data-fix:base + , generically:base + , generic-deriving:template-haskell + , hashable:base + , integer-logarithms:base + , integer-logarithms:ghc-prim + , integer-conversion:base + , indexed-traversable:base + , indexed-traversable-instances:base + , OneTuple:base + , quickcheck-instances:base + , scientific:base + , scientific:template-haskell + , splitmix:base + , semialign:base + , tasty-bench:ghc-prim + , text:ghc-prim + , text:template-haskell + , text-iso8601:time + , text-short:base + , text-short:ghc-prim + , text-short:template-haskell + , these:base + , th-abstraction:template-haskell + , th-compat:template-haskell + , time-compat:base + , time-compat:time + , unix:base + , unix:time + , unordered-containers:template-haskell + , uuid-types:template-haskell + -- packages: https://hackage.haskell.org/package/libperf-0.1/candidate/libperf-0.1.tar.gz -- packages: https://hackage.haskell.org/package/tasty-perfbench-0.1/candidate/tasty-perfbench-0.1.tar.gz diff --git a/text-iso8601/text-iso8601.cabal b/text-iso8601/text-iso8601.cabal index 0cfa5235..2c6f3e55 100644 --- a/text-iso8601/text-iso8601.cabal +++ b/text-iso8601/text-iso8601.cabal @@ -47,7 +47,7 @@ library base >=4.12.0.0 && <5 , integer-conversion >=0.1 && <0.2 , text >=1.2.3.0 && <1.3.0.0 || >=2.0 && <2.2 - , time >=1.8.0.2 && <1.13 + , time >=1.8.0.2 && <1.15 , time-compat >=1.9.4 && <1.10 test-suite text-iso8601-tests @@ -68,7 +68,7 @@ test-suite text-iso8601-tests , quickcheck-instances >=0.3.29.1 && <0.4 , tasty >=1.4.3 && <1.6 , tasty-hunit >=0.10.0.3 && <0.11 - , tasty-quickcheck >=0.10.2 && <0.11 + , tasty-quickcheck >=0.10.2 && <0.12 benchmark text-iso8601-bench default-language: Haskell2010 @@ -86,4 +86,4 @@ benchmark text-iso8601-bench build-depends: attoparsec >=0.14.4 && <0.15 , attoparsec-iso8601 >=1.1.0.1 && <1.2 - , tasty-bench >=0.3.4 && <0.4 + , tasty-bench >=0.3.4 && <0.5 From 7837886fdd5febd302b148e9e01307821d9fe6fb Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Wed, 11 Dec 2024 16:30:48 +1100 Subject: [PATCH 2/2] CI: Add ghc 9.12 to tbe build matix --- .github/workflows/haskell-ci.yml | 58 +++++++++++++++------ aeson.cabal | 1 + attoparsec-aeson/attoparsec-aeson.cabal | 1 + attoparsec-iso8601/attoparsec-iso8601.cabal | 1 + benchmarks/aeson-benchmarks.cabal | 1 + examples/aeson-examples.cabal | 1 + text-iso8601/text-iso8601.cabal | 1 + 7 files changed, 47 insertions(+), 17 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index c3033898..44fd46aa 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.19.20240514 +# version: 0.19.20241121 # -# REGENDATA ("0.19.20240514",["github","cabal.project"]) +# REGENDATA ("0.19.20241121",["github","cabal.project"]) # name: Haskell-CI on: @@ -32,6 +32,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.12.0.20241114 + compilerKind: ghc + compilerVersion: 9.12.0.20241114 + setup-method: ghcup-prerelease + allow-failure: false - compiler: ghc-9.10.1 compilerKind: ghc compilerVersion: 9.10.1 @@ -79,40 +84,60 @@ jobs: 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 + - name: Install GHCup + run: | mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup" + 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.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -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) - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (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 }} HCVER: ${{ matrix.compilerVersion }} - - name: Set PATH and environment variables + - name: Install GHC (GHCup prerelease) + if: matrix.setup-method == 'ghcup-prerelease' run: | - echo "$HOME/.cabal/bin" >> $GITHUB_PATH - 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 + "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml; + "$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" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} + - name: Set PATH and environment variables + run: | + echo "$HOME/.cabal/bin" >> $GITHUB_PATH + echo "LANG=C.UTF-8" >> "$GITHUB_ENV" + echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" + echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" 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 }} @@ -164,8 +189,8 @@ jobs: - name: install cabal-docspec run: | mkdir -p $HOME/.cabal/bin - curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240414/cabal-docspec-0.0.0.20240414-x86_64-linux.xz > cabal-docspec.xz - echo '2d18a3f79619e8ec5f11870f926f6dc2616e02a6c889315b7f82044b95a1adb9 cabal-docspec.xz' | sha256sum -c - + curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20240703/cabal-docspec-0.0.0.20240703-x86_64-linux.xz > cabal-docspec.xz + echo '48bf3b7fd2f7f0caa6162afee57a755be8523e7f467b694900eb420f5f9a7b76 cabal-docspec.xz' | sha256sum -c - xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec rm -f cabal-docspec.xz chmod a+x $HOME/.cabal/bin/cabal-docspec @@ -228,7 +253,6 @@ jobs: echo "package aeson-benchmarks" >> cabal.project echo " ghc-options: -Werror=missing-methods" >> cabal.project cat >> cabal.project <> cabal.project.local cat cabal.project @@ -279,8 +303,8 @@ jobs: $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='aeson +ordered-keymap' all - name: save cache - uses: actions/cache/save@v4 if: always() + uses: actions/cache/save@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store diff --git a/aeson.cabal b/aeson.cabal index 0c8666e4..47c4f192 100644 --- a/aeson.cabal +++ b/aeson.cabal @@ -22,6 +22,7 @@ tested-with: || ==9.6.5 || ==9.8.2 || ==9.10.1 + || ==9.12.1 synopsis: Fast JSON parsing and encoding homepage: https://github.com/haskell/aeson diff --git a/attoparsec-aeson/attoparsec-aeson.cabal b/attoparsec-aeson/attoparsec-aeson.cabal index d9c5a2cf..84eb00ef 100644 --- a/attoparsec-aeson/attoparsec-aeson.cabal +++ b/attoparsec-aeson/attoparsec-aeson.cabal @@ -28,6 +28,7 @@ tested-with: || ==9.6.5 || ==9.8.2 || ==9.10.1 + || ==9.12.1 library hs-source-dirs: src diff --git a/attoparsec-iso8601/attoparsec-iso8601.cabal b/attoparsec-iso8601/attoparsec-iso8601.cabal index f61c11eb..8e78a907 100644 --- a/attoparsec-iso8601/attoparsec-iso8601.cabal +++ b/attoparsec-iso8601/attoparsec-iso8601.cabal @@ -26,6 +26,7 @@ tested-with: || ==9.6.5 || ==9.8.2 || ==9.10.1 + || ==9.12.1 extra-source-files: changelog.md diff --git a/benchmarks/aeson-benchmarks.cabal b/benchmarks/aeson-benchmarks.cabal index dfefb1ac..614b53d3 100644 --- a/benchmarks/aeson-benchmarks.cabal +++ b/benchmarks/aeson-benchmarks.cabal @@ -12,6 +12,7 @@ tested-with: || ==9.6.5 || ==9.8.2 || ==9.10.1 + || ==9.12.1 flag tasty-bench description: Use tasty-bench, otherwise criterion diff --git a/examples/aeson-examples.cabal b/examples/aeson-examples.cabal index 2e93add4..337e47c7 100644 --- a/examples/aeson-examples.cabal +++ b/examples/aeson-examples.cabal @@ -18,6 +18,7 @@ tested-with: || ==9.6.5 || ==9.8.2 || ==9.10.1 + || ==9.12.1 library twitter-generic default-language: Haskell2010 diff --git a/text-iso8601/text-iso8601.cabal b/text-iso8601/text-iso8601.cabal index 2c6f3e55..c9416708 100644 --- a/text-iso8601/text-iso8601.cabal +++ b/text-iso8601/text-iso8601.cabal @@ -27,6 +27,7 @@ tested-with: || ==9.6.5 || ==9.8.2 || ==9.10.1 + || ==9.12.1 extra-source-files: changelog.md