diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 3ac2823..1ad7896 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -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 @@ -117,6 +122,21 @@ jobs: HCKIND: ${{ matrix.compilerKind }} HCNAME: ${{ matrix.compiler }} HCVER: ${{ matrix.compilerVersion }} + - name: Install GHC (GHCup prerelease) + if: matrix.setup-method == 'ghcup-prerelease' + run: | + "$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" + env: + HCKIND: ${{ matrix.compilerKind }} + HCNAME: ${{ matrix.compiler }} + HCVER: ${{ matrix.compilerVersion }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH @@ -127,7 +147,7 @@ jobs: 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" env: HCKIND: ${{ matrix.compilerKind }} @@ -155,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 /^(th-compat)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local diff --git a/th-compat.cabal b/th-compat.cabal index 31a42a6..be30b73 100644 --- a/th-compat.cabal +++ b/th-compat.cabal @@ -32,6 +32,7 @@ tested-with: GHC == 8.0.2 , GHC == 9.6.6 , GHC == 9.8.4 , GHC == 9.10.1 + , GHC == 9.12.1 extra-source-files: CHANGELOG.md, README.md source-repository head @@ -41,7 +42,7 @@ source-repository head library exposed-modules: Language.Haskell.TH.Syntax.Compat build-depends: base >= 4.9 && < 5 - , template-haskell >= 2.11 && < 2.23 + , template-haskell >= 2.11 && < 2.24 if !impl(ghc >= 9.4) build-depends: filepath >= 1.2.0.0 && < 1.6 , directory >= 1.1.0.0 && < 1.4 @@ -59,7 +60,7 @@ test-suite spec build-depends: base >= 4.9 && < 5 , hspec >= 2 && < 3 , mtl >= 2.1 && < 2.4 - , template-haskell >= 2.5 && < 2.23 + , template-haskell >= 2.5 && < 2.24 , th-compat build-tool-depends: hspec-discover:hspec-discover >= 2 hs-source-dirs: tests