diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2cce35bb..f7ed7236 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.20241202 # -# REGENDATA ("0.19.20240708",["github","cabal.project"]) +# REGENDATA ("0.19.20241202",["github","cabal.project"]) # name: Haskell-CI on: @@ -28,6 +28,11 @@ jobs: strategy: matrix: include: + - compiler: ghc-9.12.0.20241128 + compilerKind: ghc + compilerVersion: 9.12.0.20241128 + setup-method: ghcup-prerelease + allow-failure: false - compiler: ghc-9.10.1 compilerKind: ghc compilerVersion: 9.10.1 @@ -90,40 +95,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 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" - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) + - 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) + 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.12.1.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" + if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" - echo "GHCJSARITH=0" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} @@ -150,6 +175,18 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF + if $HEADHACKAGE; then + cat >> $CABAL_CONFIG <> $CABAL_CONFIG <> cabal.project + fi $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-th)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local @@ -252,8 +292,8 @@ jobs: run: | $CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH 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 d45233ee..fb8e2d2a 100644 --- a/cabal.project +++ b/cabal.project @@ -6,3 +6,14 @@ source-repository-package type: git location: https://github.com/goldfirere/th-desugar tag: 730a0ed799c91324d42b70d3780d6b3215cafc3c + +if impl (ghc >= 9.12) + allow-newer: + , hashable:base + , text:template-haskell + , th-abstraction:template-haskell + , th-compat:template-haskell + , th-desugar:template-haskell + , th-expand-syns:template-haskell + , th-lift:template-haskell + , th-orphans:template-haskell diff --git a/singletons-base/singletons-base.cabal b/singletons-base/singletons-base.cabal index 5455d4e9..70506507 100644 --- a/singletons-base/singletons-base.cabal +++ b/singletons-base/singletons-base.cabal @@ -8,7 +8,7 @@ author: Richard Eisenberg , Jan Stolarek bug-reports: https://github.com/goldfirere/singletons/issues stability: experimental -tested-with: GHC == 9.10.1 +tested-with: GHC == 9.10.1, GHC == 9.12.1 extra-source-files: README.md, CHANGES.md, tests/README.md, tests/compile-and-dump/GradingClient/*.hs, tests/compile-and-dump/InsertionSort/*.hs, @@ -65,18 +65,18 @@ source-repository head custom-setup setup-depends: - base >= 4.19 && < 4.21, + base >= 4.19 && < 4.22, Cabal >= 3.0 && < 3.13, directory >= 1, filepath >= 1.3 library hs-source-dirs: src - build-depends: base >= 4.20 && < 4.21, + build-depends: base >= 4.20 && < 4.22, pretty, singletons == 3.0.*, singletons-th >= 3.4 && < 3.5, - template-haskell >= 2.22 && < 2.23, + template-haskell >= 2.22 && < 2.24, text >= 1.2, th-desugar >= 1.18 && < 1.19 default-language: GHC2021 @@ -155,7 +155,7 @@ test-suite singletons-base-test-suite main-is: SingletonsBaseTestSuite.hs other-modules: SingletonsBaseTestSuiteUtils - build-depends: base >= 4.20 && < 4.21, + build-depends: base >= 4.20 && < 4.22, bytestring >= 0.10.9, deepseq >= 1.4.4, filepath >= 1.3, diff --git a/singletons-th/singletons-th.cabal b/singletons-th/singletons-th.cabal index cd1e27b2..c53bedae 100644 --- a/singletons-th/singletons-th.cabal +++ b/singletons-th/singletons-th.cabal @@ -8,7 +8,7 @@ author: Richard Eisenberg , Jan Stolarek bug-reports: https://github.com/goldfirere/singletons/issues stability: experimental -tested-with: GHC == 9.10.1 +tested-with: GHC == 9.10.1, GHC == 9.12.1 extra-source-files: README.md, CHANGES.md license: BSD3 license-file: LICENSE @@ -52,13 +52,13 @@ source-repository head library hs-source-dirs: src - build-depends: base >= 4.20 && < 4.21, + build-depends: base >= 4.20 && < 4.22, containers >= 0.5, mtl >= 2.2.1 && < 2.4, ghc-boot-th, singletons == 3.0.*, syb >= 0.4, - template-haskell >= 2.22 && < 2.23, + template-haskell >= 2.22 && < 2.24, th-desugar >= 1.18 && < 1.19, th-orphans >= 0.13.11 && < 0.14, transformers >= 0.5.2 diff --git a/singletons/singletons.cabal b/singletons/singletons.cabal index 726cebf2..73fea2d0 100644 --- a/singletons/singletons.cabal +++ b/singletons/singletons.cabal @@ -20,6 +20,7 @@ tested-with: GHC == 8.0.2 , GHC == 9.6.5 , GHC == 9.8.2 , GHC == 9.10.1 + , GHC == 9.12.1 extra-source-files: README.md, CHANGES.md license: BSD3 license-file: LICENSE @@ -60,7 +61,7 @@ source-repository head library hs-source-dirs: src - build-depends: base >= 4.9 && < 4.21 + build-depends: base >= 4.9 && < 4.22 default-language: Haskell2010 exposed-modules: Data.Singletons Data.Singletons.Decide @@ -77,5 +78,5 @@ test-suite singletons-test-suite other-modules: ByHand ByHand2 - build-depends: base >= 4.9 && < 4.21, + build-depends: base >= 4.9 && < 4.22, singletons