diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 6728aaa..f6c0707 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,20 +8,18 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.17.20240109 +# version: 0.19.20241223 # -# REGENDATA ("0.17.20240109",["github","cabal.project"]) +# REGENDATA ("0.19.20241223",["github","cabal.project"]) # name: Haskell-CI on: push: branches: - master - - ci* pull_request: branches: - master - - ci* jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} @@ -29,24 +27,29 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:bionic + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: + - compiler: ghc-9.12.1 + compilerKind: ghc + compilerVersion: 9.12.1 + setup-method: ghcup + allow-failure: false - compiler: ghc-9.10.1 compilerKind: ghc compilerVersion: 9.10.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.8.2 + - compiler: ghc-9.8.4 compilerKind: ghc - compilerVersion: 9.8.2 + compilerVersion: 9.8.4 setup-method: ghcup allow-failure: false - - compiler: ghc-9.6.5 + - compiler: ghc-9.6.6 compilerKind: ghc - compilerVersion: 9.6.5 + compilerVersion: 9.6.6 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.8 @@ -72,81 +75,54 @@ 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 - compiler: ghc-8.0.2 compilerKind: ghc compilerVersion: 8.0.2 - setup-method: hvr-ppa - allow-failure: false - - compiler: ghc-7.10.3 - compilerKind: ghc - compilerVersion: 7.10.3 - setup-method: hvr-ppa - allow-failure: false - - compiler: ghc-7.8.4 - compilerKind: ghc - compilerVersion: 7.8.4 - setup-method: hvr-ppa - allow-failure: false - - compiler: ghc-7.6.3 - compilerKind: ghc - compilerVersion: 7.6.3 - setup-method: hvr-ppa - allow-failure: false - - compiler: ghc-7.4.2 - compilerKind: ghc - compilerVersion: 7.4.2 - setup-method: hvr-ppa - allow-failure: false - - compiler: ghc-7.2.2 - compilerKind: ghc - compilerVersion: 7.2.2 - setup-method: hvr-ppa - allow-failure: false - - compiler: ghc-7.0.4 - compilerKind: ghc - compilerVersion: 7.0.4 - setup-method: hvr-ppa + 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 - if [ "${{ matrix.setup-method }}" = ghcup ]; then - 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" - 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.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - apt-get update - apt-get install -y libxml2-dev - else - apt-add-repository -y 'ppa:hvr/ghc' - apt-get update - apt-get install -y "$HCNAME" libxml2-dev - 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" - chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.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 + apt-get install -y libxml2-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.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.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 }} @@ -157,30 +133,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 - 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.10.2.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.10.2.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" 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 }} @@ -230,7 +188,7 @@ jobs: chmod a+x $HOME/.cabal/bin/cabal-plan cabal-plan --version - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: source - name: initial cabal.project for sdist @@ -278,7 +236,7 @@ jobs: package libxml extra-include-dirs: /usr/include/libxml2 EOF - $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(test-framework|test-framework-example|test-framework-hunit|test-framework-quickcheck2)$/; }' >> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(test-framework|test-framework-example|test-framework-hunit|test-framework-quickcheck2)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -286,7 +244,7 @@ jobs: $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all cabal-plan - name: restore cache - uses: actions/cache/restore@v3 + uses: actions/cache/restore@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store @@ -322,8 +280,8 @@ jobs: rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - name: save cache - uses: actions/cache/save@v3 if: always() + uses: actions/cache/save@v4 with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 25b219a..10f2c50 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -1,4 +1,4 @@ -branches: master ci* +branches: master apt: libxml2-dev diff --git a/core/src/Test/Framework/Seed.hs b/core/src/Test/Framework/Seed.hs index 910d7ed..442abdf 100644 --- a/core/src/Test/Framework/Seed.hs +++ b/core/src/Test/Framework/Seed.hs @@ -2,7 +2,7 @@ module Test.Framework.Seed where import Test.Framework.Utilities -import System.Random +import System.Random (StdGen, mkStdGen, randomIO) import Data.Char diff --git a/core/test-framework.cabal b/core/test-framework.cabal index f483788..395901c 100644 --- a/core/test-framework.cabal +++ b/core/test-framework.cabal @@ -15,9 +15,10 @@ Bug-Reports: https://github.com/haskell/test-framework/issues Build-Type: Simple Tested-With: + GHC == 9.12.1 GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 + GHC == 9.8.4 + GHC == 9.6.6 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -27,12 +28,6 @@ Tested-With: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 - GHC == 7.8.4 - GHC == 7.6.3 - GHC == 7.4.2 - GHC == 7.2.2 - GHC == 7.0.4 Extra-Source-Files: ChangeLog.md @@ -67,7 +62,7 @@ Library Build-Depends: base >= 4.3 && < 5 , ansi-terminal >= 0.4.0 && < 1.2 , ansi-wl-pprint >= 0.5.1 && < 1.1 - , random >= 1.0 && < 1.3 + , random >= 1.0 && < 1.4 , containers >= 0.1 && < 0.8 , regex-posix >= 0.72 && < 0.97 , old-locale >= 1.0 && < 1.1 @@ -124,7 +119,7 @@ Test-Suite test-framework-tests -- Buildable: False Build-Depends: HUnit >= 1.2 , QuickCheck >= 2.3 && < 2.16 - , base >= 4.3 + , base >= 4.3 && < 5 , random >= 1.0 , containers >= 0.1 , ansi-terminal >= 0.4.0 diff --git a/example/test-framework-example.cabal b/example/test-framework-example.cabal index ea9ee9f..a75d822 100644 --- a/example/test-framework-example.cabal +++ b/example/test-framework-example.cabal @@ -12,9 +12,10 @@ Homepage: http://batterseapower.github.com/test-framework/ Build-Type: Simple Tested-With: + GHC == 9.12.1 GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 + GHC == 9.8.4 + GHC == 9.6.6 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -24,12 +25,6 @@ Tested-With: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 - GHC == 7.8.4 - GHC == 7.6.3 - GHC == 7.4.2 - GHC == 7.2.2 - GHC == 7.0.4 Executable test-framework-example default-language: Haskell2010 diff --git a/hunit/test-framework-hunit.cabal b/hunit/test-framework-hunit.cabal index 87c71aa..9f239c2 100644 --- a/hunit/test-framework-hunit.cabal +++ b/hunit/test-framework-hunit.cabal @@ -13,8 +13,10 @@ Build-Type: Simple Description: @HUnit@ support for the @test-framework@ package. Tested-With: - GHC == 9.8.1 - GHC == 9.6.4 + GHC == 9.12.1 + GHC == 9.10.1 + GHC == 9.8.4 + GHC == 9.6.6 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -24,12 +26,6 @@ Tested-With: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 - GHC == 7.8.4 - GHC == 7.6.3 - GHC == 7.4.2 - GHC == 7.2.2 - GHC == 7.0.4 Library Default-Language: Haskell2010 diff --git a/quickcheck2/Test/Framework/Providers/QuickCheck2.hs b/quickcheck2/Test/Framework/Providers/QuickCheck2.hs index 5c989c6..7f24a02 100644 --- a/quickcheck2/Test/Framework/Providers/QuickCheck2.hs +++ b/quickcheck2/Test/Framework/Providers/QuickCheck2.hs @@ -20,7 +20,7 @@ import Test.QuickCheck.Test #if MIN_VERSION_QuickCheck(2,7,0) import Test.QuickCheck.Random (QCGen, mkQCGen) #endif -import System.Random +import System.Random (randomIO) import Data.Typeable diff --git a/quickcheck2/test-framework-quickcheck2.cabal b/quickcheck2/test-framework-quickcheck2.cabal index 4804256..1a37c0f 100644 --- a/quickcheck2/test-framework-quickcheck2.cabal +++ b/quickcheck2/test-framework-quickcheck2.cabal @@ -14,9 +14,10 @@ Build-Type: Simple Description: Allows @QuickCheck-2@ properties to be used with the . Tested-With: + GHC == 9.12.1 GHC == 9.10.1 - GHC == 9.8.2 - GHC == 9.6.5 + GHC == 9.8.4 + GHC == 9.6.6 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -26,12 +27,6 @@ Tested-With: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - GHC == 7.10.3 - GHC == 7.8.4 - GHC == 7.6.3 - GHC == 7.4.2 - GHC == 7.2.2 - GHC == 7.0.4 extra-source-files: ChangeLog.md @@ -50,7 +45,7 @@ Library , QuickCheck >= 2.4 && < 2.16 , base >= 4.3 && < 5 , extensible-exceptions >= 0.1.1 && < 0.2.0 - , random >= 1 && < 1.3 + , random >= 1 && < 1.4 Ghc-Options: -Wall