diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index f449cb9b..4ed756d9 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.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: @@ -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 @@ -75,60 +75,48 @@ 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 }} @@ -136,27 +124,9 @@ jobs: - 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" @@ -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: | @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 <> 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 @@ -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 @@ -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 @@ -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 diff --git a/cabal.project b/cabal.project index 9f0c53f6..7d92ea75 100644 --- a/cabal.project +++ b/cabal.project @@ -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: diff --git a/indexed-profunctors/indexed-profunctors.cabal b/indexed-profunctors/indexed-profunctors.cabal index 1489d214..1ce9de52 100644 --- a/indexed-profunctors/indexed-profunctors.cabal +++ b/indexed-profunctors/indexed-profunctors.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 diff --git a/metametapost/metametapost.cabal b/metametapost/metametapost.cabal index 9b7bee34..bf9f3374 100644 --- a/metametapost/metametapost.cabal +++ b/metametapost/metametapost.cabal @@ -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: oleg@well-typed.com synopsis: Generate optics documentation diagrams diff --git a/optics-core/optics-core.cabal b/optics-core/optics-core.cabal index eff0af85..48168256 100644 --- a/optics-core/optics-core.cabal +++ b/optics-core/optics-core.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 diff --git a/optics-extra/optics-extra.cabal b/optics-extra/optics-extra.cabal index a3dcd625..e1ebf8e8 100644 --- a/optics-extra/optics-extra.cabal +++ b/optics-extra/optics-extra.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 diff --git a/optics-sop/optics-sop.cabal b/optics-sop/optics-sop.cabal index de6bdc80..fee4e1ce 100644 --- a/optics-sop/optics-sop.cabal +++ b/optics-sop/optics-sop.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 diff --git a/optics-th/optics-th.cabal b/optics-th/optics-th.cabal index 6f7793a3..26294522 100644 --- a/optics-th/optics-th.cabal +++ b/optics-th/optics-th.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 @@ -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 diff --git a/optics-vl/optics-vl.cabal b/optics-vl/optics-vl.cabal index 98214c3b..23c72ef8 100644 --- a/optics-vl/optics-vl.cabal +++ b/optics-vl/optics-vl.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 diff --git a/optics/optics.cabal b/optics/optics.cabal index 37c77890..732fbf31 100644 --- a/optics/optics.cabal +++ b/optics/optics.cabal @@ -8,7 +8,7 @@ maintainer: optics@well-typed.com 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 @@ -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