From fb5da78cdb11bb58ecfe4ad0f64681f6be3357d6 Mon Sep 17 00:00:00 2001 From: ncaq Date: Sat, 18 Jan 2025 00:04:14 +0900 Subject: [PATCH] v0.7.3-r1: allow time-1.14 (#15) * fix: allow time-1.14 GHC 9.12 time library version is 1.14. > time 1.14 Dependency of ghc library > > [GHC 9.12.20241014](https://downloads.haskell.org/ghc/9.12.1-alpha1/docs/users_guide/9.12.1-notes.html) * fix: limit hspec old version * v0.7.3-r1: CI: include GHC 9.12.1, reactivate Windows CI * Switch off Windows CI for GHCs 8.2 and 8.0 --------- Co-authored-by: Andreas Abel --- .github/workflows/{ci.yml.off => ci.yml} | 32 +++++++++------- .github/workflows/haskell-ci.yml | 48 +++++------------------- .github/workflows/stack.yml | 12 +++--- unix-compat.cabal | 7 ++-- 4 files changed, 37 insertions(+), 62 deletions(-) rename .github/workflows/{ci.yml.off => ci.yml} (75%) diff --git a/.github/workflows/ci.yml.off b/.github/workflows/ci.yml similarity index 75% rename from .github/workflows/ci.yml.off rename to .github/workflows/ci.yml index 266144f..12a02e1 100644 --- a/.github/workflows/ci.yml.off +++ b/.github/workflows/ci.yml @@ -12,26 +12,29 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [windows-latest] # Check the haddock step below which is limited to a single GHC version! ghc: + - '9.12' - '9.10' - '9.8' - - '9.6' - - '9.4' - - '9.2' - - '9.0' - - '8.10' - - '8.8' - - '8.6' + # - '9.6' + # - '9.4' + # - '9.2' + # - '9.0' + # - '8.10' + # - '8.8' + # - '8.6' - '8.4' - - '8.2' - - '8.0' + # hsc2hs fails on windows-2022 for GHCs 8.0 and 8.2 + # https://github.com/haskell/hsc2hs/issues/81 + # - '8.2' + # - '8.0' include: - os: macos-latest - ghc: '9.10' - - os: windows-latest - ghc: '9.10' + ghc: '9.12' + - os: ubuntu-latest + ghc: '9.12' steps: - uses: actions/checkout@v4 @@ -60,9 +63,10 @@ jobs: run: cabal build all --dependencies-only - run: cabal build all + - run: cabal build all --enable-tests - run: cabal test all - run: cabal haddock - if: matrix.ghc == '9.8' + if: matrix.ghc == '9.12' - run: cabal check - run: cabal sdist diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index cca8960..703c5e1 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -6,11 +6,11 @@ # # haskell-ci regenerate # -# For more information, see https://github.com/andreasabel/haskell-ci +# For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.19.20241205 +# version: 0.19.20241223 # -# REGENDATA ("0.19.20241205",["github","unix-compat.cabal"]) +# REGENDATA ("0.19.20241223",["github","unix-compat.cabal"]) # name: Haskell-CI on: @@ -32,10 +32,10 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.12.0.20241128 + - compiler: ghc-9.12.1 compilerKind: ghc - compilerVersion: 9.12.0.20241128 - setup-method: ghcup-prerelease + compilerVersion: 9.12.1 + setup-method: ghcup allow-failure: false - compiler: ghc-9.10.1 compilerKind: ghc @@ -110,8 +110,8 @@ jobs: chmod a+x "$HOME/.ghcup/bin/ghcup" - 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" + "$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: | @@ -126,21 +126,6 @@ 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 @@ -151,7 +136,7 @@ jobs: echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" if [ $((HCNUMVER >= 80400)) -ne 0 ] ; then echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" ; else echo "ARG_TESTS=--disable-tests" >> "$GITHUB_ENV" ; fi echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi + echo "HEADHACKAGE=false" >> "$GITHUB_ENV" echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" env: HCKIND: ${{ matrix.compilerKind }} @@ -179,18 +164,6 @@ jobs: repository hackage.haskell.org url: http://hackage.haskell.org/ EOF - if $HEADHACKAGE; then - cat >> $CABAL_CONFIG <> $CABAL_CONFIG <= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi cat >> cabal.project <> cabal.project - fi $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(unix-compat)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local diff --git a/.github/workflows/stack.yml b/.github/workflows/stack.yml index 23f7aea..85ae5b4 100644 --- a/.github/workflows/stack.yml +++ b/.github/workflows/stack.yml @@ -23,10 +23,10 @@ jobs: - os: macos-latest ghc: 9.10.1 - resolver: nightly-2024-12-12 + resolver: nightly-2025-01-16 - os: macos-latest ghc: 9.8.4 - resolver: lts-23.0 + resolver: lts-23.4 - os: macos-latest ghc: 9.2.8 resolver: lts-20.26 @@ -35,20 +35,20 @@ jobs: - os: windows-latest ghc: 9.10.1 - resolver: nightly-2024-12-12 + resolver: nightly-2025-01-16 - os: windows-latest ghc: 9.8.4 - resolver: lts-23.0 + resolver: lts-23.4 - os: windows-latest ghc: 8.4.4 resolver: lts-12.26 - os: ubuntu-latest ghc: 9.10.1 - resolver: nightly-2024-12-12 + resolver: nightly-2025-01-16 - os: ubuntu-latest ghc: 9.8.4 - resolver: lts-23.0 + resolver: lts-23.4 - os: ubuntu-latest ghc: 9.6.6 resolver: lts-22.43 diff --git a/unix-compat.cabal b/unix-compat.cabal index ad17f4a..85f41fe 100644 --- a/unix-compat.cabal +++ b/unix-compat.cabal @@ -1,6 +1,7 @@ cabal-version: >= 1.10 name: unix-compat version: 0.7.3 +x-revision: 1 synopsis: Portable POSIX-compatibility layer. description: This package provides portable implementations of parts of the unix package. This package re-exports the unix @@ -16,7 +17,7 @@ category: System build-type: Simple tested-with: - GHC == 9.12.0 + GHC == 9.12.1 GHC == 9.10.1 GHC == 9.8.4 GHC == 9.6.6 @@ -61,7 +62,7 @@ Library build-depends: Win32 >= 2.5.0.0 && < 3 build-depends: directory >= 1.3.1 && < 1.4 build-depends: filepath >= 1.4.1.0 && < 1.6 - build-depends: time >= 1.6.0.1 && < 1.13 + build-depends: time >= 1.6.0.1 && < 1.15 other-modules: System.PosixCompat.Internal.Time @@ -109,7 +110,7 @@ Test-Suite unix-compat-testsuite unix-compat , base , monad-parallel - , hspec + , hspec >= 2.5.5 , HUnit , directory >= 1.3.1.0 -- directory-1.3.1.0 adds createFileLink