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

Add GHC-9.12 to CI #512

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
114 changes: 36 additions & 78 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.20240708
# version: 0.19.20250104
#
# REGENDATA ("0.19.20240708",["github","--config=cabal.haskell-ci","cabal.project"])
# REGENDATA ("0.19.20250104",["github","--config=cabal.haskell-ci","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,10 +32,10 @@ jobs:
strategy:
matrix:
include:
- compiler: ghcjs-8.4
compilerKind: ghcjs
compilerVersion: "8.4"
setup-method: hvr-ppa
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
Expand Down Expand Up @@ -75,88 +75,58 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.6.5
compilerKind: ghc
compilerVersion: 8.6.5
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.4.4
compilerKind: ghc
compilerVersion: 8.4.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
- compiler: ghc-8.2.2
compilerKind: ghc
compilerVersion: 8.2.2
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: Set GHCJS environment variables
run: |
if [ $HCKIND = ghcjs ]; then
echo "GHCJS=true" >> "$GITHUB_ENV"
echo "GHCJSARITH=1" >> "$GITHUB_ENV"
else
echo "GHCJS=false" >> "$GITHUB_ENV"
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
fi
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- 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
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
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"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
else
apt-add-repository -y 'ppa:hvr/ghc'
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'ppa:hvr/ghcjs' ; fi
if [ $((GHCJSARITH)) -ne 0 ] ; then curl -sSL "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" | apt-key add - ; fi
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-add-repository -y 'deb https://deb.nodesource.com/node_10.x focal main' ; fi
apt-get update
if [ $((GHCJSARITH)) -ne 0 ] ; then apt-get install -y "$HCNAME" ghc-8.4.4 nodejs ; else apt-get install -y "$HCNAME" ; fi
mkdir -p "$HOME/.ghcup/bin"
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"
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
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.14.1.1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1 -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)
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
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
if [ $((GHCJSARITH)) -ne 0 ] ; then echo "/opt/ghc/8.4.4/bin" >> $GITHUB_PATH ; fi
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
if [ "${{ matrix.setup-method }}" = ghcup ]; then
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.12.1.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.12.1.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))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -199,15 +169,13 @@ jobs:
$HC --version || true
$HC --print-project-git-commit-id || true
$CABAL --version || true
if [ $((GHCJSARITH)) -ne 0 ] ; then node --version ; fi
if [ $((GHCJSARITH)) -ne 0 ] ; then echo $GHCJS ; fi
- name: update cabal index
run: |
$CABAL v2-update -v
- name: cache (tools)
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-9f95e77c
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-55831830
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
Expand All @@ -223,10 +191,10 @@ jobs:
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.22.0' ; fi
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then doctest --version ; fi
- name: save cache (tools)
uses: actions/cache/save@v4
if: always()
uses: actions/cache/save@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-9f95e77c
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-55831830
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v4
Expand All @@ -242,7 +210,6 @@ jobs:
echo "packages: $GITHUB_WORKSPACE/source/optics-th" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/optics-vl" >> cabal.project
echo "packages: $GITHUB_WORKSPACE/source/indexed-profunctors" >> cabal.project
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/template-haskell-optics" >> cabal.project ; fi
echo "packages: $GITHUB_WORKSPACE/source/metametapost" >> cabal.project
cat cabal.project
- name: sdist
Expand All @@ -269,8 +236,6 @@ jobs:
echo "PKGDIR_optics_vl=${PKGDIR_optics_vl}" >> "$GITHUB_ENV"
PKGDIR_indexed_profunctors="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/indexed-profunctors-[0-9.]*')"
echo "PKGDIR_indexed_profunctors=${PKGDIR_indexed_profunctors}" >> "$GITHUB_ENV"
PKGDIR_template_haskell_optics="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/template-haskell-optics-[0-9.]*')"
echo "PKGDIR_template_haskell_optics=${PKGDIR_template_haskell_optics}" >> "$GITHUB_ENV"
PKGDIR_metametapost="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/metametapost-[0-9.]*')"
echo "PKGDIR_metametapost=${PKGDIR_metametapost}" >> "$GITHUB_ENV"
rm -f cabal.project cabal.project.local
Expand All @@ -283,7 +248,6 @@ jobs:
echo "packages: ${PKGDIR_optics_th}" >> cabal.project
echo "packages: ${PKGDIR_optics_vl}" >> cabal.project
echo "packages: ${PKGDIR_indexed_profunctors}" >> cabal.project
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: ${PKGDIR_template_haskell_optics}" >> cabal.project ; fi
echo "packages: ${PKGDIR_metametapost}" >> cabal.project
echo "package optics" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
Expand All @@ -299,13 +263,11 @@ jobs:
echo " ghc-options: -Werror=missing-methods" >> cabal.project
echo "package indexed-profunctors" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 91000)) -ne 0 ] ; then echo "package template-haskell-optics" >> cabal.project ; fi
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 91000)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
echo "package metametapost" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(indexed-profunctors|metametapost|optics|optics-core|optics-extra|optics-sop|optics-th|optics-vl|template-haskell-optics)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(indexed-profunctors|metametapost|optics|optics-core|optics-extra|optics-sop|optics-th|optics-vl)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
Expand Down Expand Up @@ -347,8 +309,6 @@ jobs:
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then doctest -XHaskell2010 -XBangPatterns -XConstraintKinds -XDefaultSignatures -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable -XEmptyCase -XFlexibleContexts -XFlexibleInstances -XFunctionalDependencies -XGADTs -XGeneralizedNewtypeDeriving -XInstanceSigs -XKindSignatures -XLambdaCase -XOverloadedLabels -XPatternSynonyms -XRankNTypes -XScopedTypeVariables -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators -XViewPatterns src ; fi
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_indexed_profunctors} || false ; fi
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then doctest -XHaskell2010 -XBangPatterns -XConstraintKinds -XDefaultSignatures -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable -XEmptyCase -XFlexibleContexts -XFlexibleInstances -XFunctionalDependencies -XGADTs -XGeneralizedNewtypeDeriving -XInstanceSigs -XKindSignatures -XLambdaCase -XOverloadedLabels -XPatternSynonyms -XRankNTypes -XScopedTypeVariables -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators -XViewPatterns src ; fi
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then cd ${PKGDIR_template_haskell_optics} || false ; fi
if [ $((! GHCJSARITH && HCNUMVER < 90400)) -ne 0 ] ; then doctest -XHaskell2010 src ; fi
- name: cabal check
run: |
cd ${PKGDIR_optics} || false
Expand All @@ -365,8 +325,6 @@ jobs:
${CABAL} -vnormal check
cd ${PKGDIR_indexed_profunctors} || false
${CABAL} -vnormal check
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_template_haskell_optics} || false ; fi
if [ $((GHCJSARITH || ! GHCJSARITH && HCNUMVER < 91000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
cd ${PKGDIR_metametapost} || false
${CABAL} -vnormal check
- name: haddock
Expand All @@ -377,8 +335,8 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks 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
4 changes: 3 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ packages:
optics-th/*.cabal
optics-vl/*.cabal
indexed-profunctors/*.cabal
template-haskell-optics/*.cabal

if !impl(ghc >=9.10)
packages: template-haskell-optics/*.cabal

-- An example, using optics to generate optics diagrams
packages:
Expand Down
2 changes: 1 addition & 1 deletion indexed-profunctors/indexed-profunctors.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Utilities for indexed profunctors
category: Data, Optics, Lenses, Profunctors
Expand Down
2 changes: 1 addition & 1 deletion metametapost/metametapost.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license-file: LICENSE
build-type: Simple
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
maintainer: [email protected]
synopsis: Generate optics documentation diagrams
Expand Down
2 changes: 1 addition & 1 deletion optics-core/optics-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Optics as an abstract interface: core definitions
category: Data, Optics, Lenses
Expand Down
2 changes: 1 addition & 1 deletion optics-extra/optics-extra.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Extra utilities and instances for optics-core
category: Data, Optics, Lenses
Expand Down
2 changes: 1 addition & 1 deletion optics-sop/optics-sop.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Optics for generics-sop, and using generics-sop
category: Data, Optics, Lenses, Generics
Expand Down
4 changes: 2 additions & 2 deletions optics-th/optics-th.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Optics construction using TemplateHaskell
category: Data, Optics, Lenses
Expand Down Expand Up @@ -66,7 +66,7 @@ library
, containers >= 0.5.10.2 && <0.8
, mtl >= 2.2.2 && <2.4
, optics-core >= 0.4.1 && <0.5
, template-haskell >= 2.12 && <2.23
, template-haskell >= 2.12 && <2.24
, th-abstraction >= 0.4 && <0.8
, transformers >= 0.5 && <0.7

Expand Down
2 changes: 1 addition & 1 deletion optics-vl/optics-vl.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Andrzej Rybczak
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Utilities for compatibility with van Laarhoven optics
category: Data, Optics, Lenses
Expand Down
4 changes: 2 additions & 2 deletions optics/optics.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ maintainer: [email protected]
author: Adam Gundry, Andres Löh, Andrzej Rybczak, Oleg Grenrus
tested-with: GHC ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7
|| ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2
|| ==9.10.1,
|| ==9.10.1 || ==9.12.1,
GHCJS ==8.4
synopsis: Optics as an abstract interface
category: Data, Optics, Lenses
Expand Down Expand Up @@ -163,7 +163,7 @@ test-suite optics-tests
build-depends: base
, containers
, indexed-profunctors >= 0.1 && <0.2
, inspection-testing >= 0.5 && <0.6
, inspection-testing >= 0.5 && <0.7
, mtl
, optics
, optics-core
Expand Down
Loading