From 83f4c1bb53f6db579275d286772241ba9ad3a44f Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Sun, 26 May 2024 20:03:42 +0200 Subject: [PATCH] Allow network-3.2, bump CI to GHC 9.10.1 --- .github/workflows/haskell-ci.yml | 41 +++++++++++++------------------- cabal.haskell-ci | 24 +++++++++---------- http-io-streams.cabal | 8 +++---- 3 files changed, 33 insertions(+), 40 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 49c84f9..a4091e1 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/andreasabel/haskell-ci # -# version: 0.17.20240110 +# version: 0.19.20240703 # -# REGENDATA ("0.17.20240110",["github","http-io-streams.cabal"]) +# REGENDATA ("0.19.20240703",["github","http-io-streams.cabal"]) # name: Haskell-CI on: @@ -27,19 +27,24 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:focal + image: buildpack-deps:jammy continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: - - compiler: ghc-9.8.1 + - compiler: ghc-9.10.1 compilerKind: ghc - compilerVersion: 9.8.1 + compilerVersion: 9.10.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.6.4 + - compiler: ghc-9.8.2 compilerKind: ghc - compilerVersion: 9.6.4 + compilerVersion: 9.8.2 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.6.6 + compilerKind: ghc + compilerVersion: 9.6.6 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.8 @@ -97,7 +102,7 @@ jobs: 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) + "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) apt-get update apt-get install -y libbrotli-dev env: @@ -117,7 +122,7 @@ jobs: 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" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.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" @@ -201,10 +206,8 @@ jobs: if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package http-io-streams" >> cabal.project ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi cat >> cabal.project <> cabal.project.local + $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(http-io-streams)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local - name: dump install plan @@ -212,7 +215,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 @@ -241,18 +244,8 @@ jobs: run: | rm -f cabal.project.local $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: prepare for constraint sets - run: | - rm -f cabal.project.local - - name: constraint set latest-core-libs-Sep-2023 - run: | - if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --constraint='containers >= 0.7' all --dry-run ; fi - if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi - if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi - if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --constraint='containers >= 0.7' all ; fi - if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --constraint='containers >= 0.7' all ; fi - name: save cache - uses: actions/cache/save@v3 + uses: actions/cache/save@v4 if: always() with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} diff --git a/cabal.haskell-ci b/cabal.haskell-ci index d5ff0df..4051d8d 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -4,16 +4,16 @@ branches: master installed: +all --- Test core libraries in versions newer than shipped with GHC -constraint-set latest-core-libs-Sep-2023 - constraints: bytestring >= 0.12 - constraints: containers >= 0.7 - -- constraints: text >= 2.1 - ghc: >=8.2 && < 9.7 - tests: True - run-tests: True +-- -- Test core libraries in versions newer than shipped with GHC +-- constraint-set latest-core-libs-Sep-2023 +-- constraints: bytestring >= 0.12 +-- constraints: containers >= 0.7 +-- -- constraints: text >= 2.1 +-- ghc: >=8.2 && < 9.7 +-- tests: True +-- run-tests: True -raw-project - allow-newer: bytestring - allow-newer: containers - -- allow-newer: text +-- raw-project +-- allow-newer: bytestring +-- allow-newer: containers +-- -- allow-newer: text diff --git a/http-io-streams.cabal b/http-io-streams.cabal index 8dca6b1..e88054c 100644 --- a/http-io-streams.cabal +++ b/http-io-streams.cabal @@ -31,8 +31,9 @@ extra-source-files: tests/statler.jpg tested-with: - GHC == 9.8.1 - GHC == 9.6.4 + GHC == 9.10.1 + GHC == 9.8.2 + GHC == 9.6.6 GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 @@ -42,7 +43,6 @@ tested-with: GHC == 8.4.4 GHC == 8.2.2 GHC == 8.0.2 - -- GHC == 7.10.3 source-repository head type: git @@ -71,7 +71,7 @@ common settings , HsOpenSSL ^>= 0.11.2 , io-streams ^>= 1.5.0.1 , mtl ^>= 2.2.2 || ^>= 2.3.1 - , network ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0 || ^>= 3.0.0.0 || ^>= 3.1.0.0 + , network ^>= 2.6.0.0 || ^>= 2.7.0.0 || ^>= 2.8.0.0 || ^>= 3.0.0.0 || ^>= 3.1.0.0 || ^>= 3.2.0.0 , network-uri ^>= 2.6.0.0 , openssl-streams ^>= 1.2.1.3 , text ^>= 1.2.3.0 || ^>= 2.0 || ^>= 2.1