From dbf11824d5660099a46cc8c18668451f16dae03d Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Sat, 26 Oct 2024 07:48:36 -0400 Subject: [PATCH] Require building with singletons-base-3.5/GHC 9.12 --- .github/workflows/haskell-ci.yml | 40 ++++++++++++++++++-------------- CHANGELOG.md | 3 +++ eliminators.cabal | 14 +++++------ 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 913948a..cef17a5 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.20240514 +# version: 0.19.20241222 # -# REGENDATA ("0.19.20240514",["github","cabal.project"]) +# REGENDATA ("0.19.20241222",["github","cabal.project"]) # name: Haskell-CI on: @@ -28,22 +28,37 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.10.1 + - compiler: ghc-9.12.1 compilerKind: ghc - compilerVersion: 9.10.1 + compilerVersion: 9.12.1 setup-method: ghcup 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 (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 cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -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 }} @@ -54,21 +69,12 @@ jobs: 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 - 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" 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 }} @@ -179,8 +185,8 @@ jobs: run: | $CABAL v2-haddock --disable-documentation --haddock-all $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/CHANGELOG.md b/CHANGELOG.md index f7069c5..b8183b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### next [????.??.??] +* Require `singletons-base-3.5` and GHC 9.12. + ### 0.9.5 [2024.05.12] * Require `singletons-base-3.4` and GHC 9.10. diff --git a/eliminators.cabal b/eliminators.cabal index 4febc4d..83bf937 100644 --- a/eliminators.cabal +++ b/eliminators.cabal @@ -16,7 +16,7 @@ category: Dependent Types build-type: Simple extra-source-files: CHANGELOG.md, README.md cabal-version: >=1.10 -tested-with: GHC == 9.10.1 +tested-with: GHC == 9.12.1 source-repository head type: git @@ -30,14 +30,14 @@ library Data.Eliminator.TH Data.Eliminator.TypeLits Data.Eliminator.TypeNats - build-depends: base >= 4.20 && < 4.21 + build-depends: base >= 4.21 && < 4.22 , extra >= 1.4.2 && < 1.9 - , singletons-base >= 3.4 && < 3.5 + , singletons-base >= 3.5 && < 3.6 , singleton-nats >= 0.4.2 && < 0.5 - , template-haskell >= 2.22 && < 2.23 + , template-haskell >= 2.23 && < 2.24 , text >= 2.0.1 && < 2.2 , th-abstraction >= 0.4 && < 0.8 - , th-desugar >= 1.17 && < 1.18 + , th-desugar >= 1.18 && < 1.19 hs-source-dirs: src default-language: GHC2021 ghc-options: -Wall -Wcompat -Wno-unticked-promoted-constructors -fenable-th-splice-warnings @@ -58,10 +58,10 @@ test-suite spec PolyRecTypes VecTypes VecSpec - build-depends: base >= 4.20 && < 4.21 + build-depends: base >= 4.21 && < 4.22 , eliminators , hspec >= 2 && < 3 - , singletons-base >= 3.4 && < 3.5 + , singletons-base >= 3.5 && < 3.6 , singleton-nats >= 0.4.2 && < 0.5 build-tool-depends: hspec-discover:hspec-discover hs-source-dirs: tests