Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ghc 9.12 #1100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 41 additions & 17 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.19.20240514
# version: 0.19.20241121
#
# REGENDATA ("0.19.20240514",["github","cabal.project"])
# REGENDATA ("0.19.20241121",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -228,7 +253,6 @@ jobs:
echo "package aeson-benchmarks" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: hermes-json:attoparsec-iso8601
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(aeson|aeson-benchmarks|aeson-examples|attoparsec-aeson|attoparsec-iso8601|text-iso8601)$/; }' >> cabal.project.local
cat cabal.project
Expand Down Expand Up @@ -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
7 changes: 4 additions & 3 deletions aeson.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -98,10 +99,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:
Expand Down
1 change: 1 addition & 0 deletions attoparsec-aeson/attoparsec-aeson.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tested-with:
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1
|| ==9.12.1

library
hs-source-dirs: src
Expand Down
3 changes: 2 additions & 1 deletion attoparsec-iso8601/attoparsec-iso8601.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ tested-with:
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1
|| ==9.12.1

extra-source-files:
changelog.md
Expand All @@ -44,7 +45,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
Expand Down
1 change: 1 addition & 0 deletions benchmarks/aeson-benchmarks.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions examples/aeson-examples.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tested-with:
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1
|| ==9.12.1

library twitter-generic
default-language: Haskell2010
Expand Down
7 changes: 4 additions & 3 deletions text-iso8601/text-iso8601.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tested-with:
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1
|| ==9.12.1

extra-source-files: changelog.md

Expand All @@ -47,7 +48,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
Expand All @@ -68,7 +69,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
Expand All @@ -86,4 +87,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
Loading