From 2c34bd2c4019b64d78b87086947faa9480e683a6 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Thu, 14 Sep 2023 09:02:43 +0200 Subject: [PATCH 1/2] Adjust the Haskell CI to GHCs 9.8.0 - 7.10.3 --- .github/workflows/haskell-ci.yml | 67 +++++++++++++++++++------------- netrc.cabal | 6 +-- 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index d855950..6d4930a 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/haskell-CI/haskell-ci +# For more information, see https://github.com/andreasabel/haskell-ci # -# version: 0.16.4 +# version: 0.17.20230911 # -# REGENDATA ("0.16.4",["github","netrc.cabal"]) +# REGENDATA ("0.17.20230911",["github","netrc.cabal"]) # name: Haskell-CI on: @@ -29,19 +29,24 @@ jobs: timeout-minutes: 60 container: - image: buildpack-deps:bionic + image: buildpack-deps:focal continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: + - compiler: ghc-9.8.0.20230822 + compilerKind: ghc + compilerVersion: 9.8.0.20230822 + setup-method: ghcup + allow-failure: true - compiler: ghc-9.6.2 compilerKind: ghc compilerVersion: 9.6.2 setup-method: ghcup allow-failure: false - - compiler: ghc-9.4.5 + - compiler: ghc-9.4.7 compilerKind: ghc - compilerVersion: 9.4.5 + compilerVersion: 9.4.7 setup-method: ghcup allow-failure: false - compiler: ghc-9.2.8 @@ -89,21 +94,6 @@ jobs: 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 fail-fast: false steps: - name: apt @@ -112,8 +102,9 @@ jobs: 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.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) else @@ -121,8 +112,9 @@ jobs: apt-get update apt-get install -y "$HCNAME" mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" + "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi env: @@ -137,10 +129,12 @@ jobs: echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" HCDIR=/opt/$HCKIND/$HCVER if [ "${{ matrix.setup-method }}" = ghcup ]; then - HC=$HOME/.ghcup/bin/$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=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" - echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" + echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" + echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" else HC=$HCDIR/bin/$HCKIND @@ -154,7 +148,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 >= 90800)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" echo "GHCJSARITH=0" >> "$GITHUB_ENV" env: @@ -183,6 +177,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: $_ installed\n" unless /^(bytestring|directory|netrc|process|unix)$/; }' >> cabal.project.local cat cabal.project cat cabal.project.local @@ -278,6 +287,8 @@ jobs: rm -f cabal.project.local - name: constraint set bytestring-0.12 run: | + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all --dry-run ; fi + if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' --dependencies-only -j2 all ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring >= 0.12' all ; fi diff --git a/netrc.cabal b/netrc.cabal index 10d9b5d..f0eff6a 100644 --- a/netrc.cabal +++ b/netrc.cabal @@ -20,8 +20,9 @@ description: tested-with: + GHC == 9.8.0 GHC == 9.6.2 - GHC == 9.4.5 + GHC == 9.4.7 GHC == 9.2.8 GHC == 9.0.2 GHC == 8.10.7 @@ -31,9 +32,6 @@ tested-with: GHC == 8.2.2 GHC == 8.0.2 GHC == 7.10.3 - GHC == 7.8.4 - GHC == 7.6.3 - GHC == 7.4.2 extra-source-files: changelog.md From bee52c79df9970569c0c147492ef7a1692284acf Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Thu, 14 Sep 2023 09:03:50 +0200 Subject: [PATCH 2/2] v0.2.0.0-r13: allow tasty-1.5 --- netrc.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netrc.cabal b/netrc.cabal index f0eff6a..93064b1 100644 --- a/netrc.cabal +++ b/netrc.cabal @@ -1,7 +1,7 @@ cabal-version: >=1.10 name: netrc version: 0.2.0.0 -x-revision: 12 +x-revision: 13 synopsis: Parser for .netrc files homepage: https://github.com/haskell-hvr/netrc bug-reports: https://github.com/haskell-hvr/netrc/issues @@ -86,7 +86,7 @@ test-suite test-netrc netrc , base , bytestring - , tasty >= 0.10 && < 1.5 + , tasty >= 0.10 && < 1.6 , tasty-golden == 2.3.* , tasty-quickcheck >= 0.8.1 && < 0.11