From c53e831c870d85ce983d773fa768e888ababe5b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 03:22:37 +0000 Subject: [PATCH 1/2] ci: Regenerate haskell-ci --- .github/workflows/haskell-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 18626fe..6bca969 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.17.20231010 +# version: 0.17.20231110 # -# REGENDATA ("0.17.20231010",["github","cabal.project"]) +# REGENDATA ("0.17.20231110",["github","cabal.project"]) # name: Haskell-CI on: @@ -104,10 +104,10 @@ 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.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" + 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.1.0 || (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 libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev else @@ -115,9 +115,9 @@ jobs: apt-get update apt-get install -y "$HCNAME" libx11-dev libxext-dev libxinerama-dev libxrandr-dev libxss-dev mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup" + 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.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi env: HCKIND: ${{ matrix.compilerKind }} @@ -137,13 +137,13 @@ jobs: echo "HC=$HC" >> "$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" + 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.1.0 -vnormal+nowrap" >> "$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))') From 036f9692f34cef26abf03f235600f3d1a5145dfe Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sun, 12 Nov 2023 23:34:53 +0000 Subject: [PATCH 2/2] ci: Only build haddock for hackage with the latest GHC Cabal 3.10.2.0 exposes a bug in Haddock shipped with GHC 9.0 and 9.2, so we need to work around it by bumping the version of GHC/Haddock we use for building/uploading docs to Hackage, and to prevent build failures we don't ever try to build haddocks for Hackage with older versions of GHC/Haddock. Related: https://github.com/haskell/haddock/issues/1582#issuecomment-1611412223 Related: https://github.com/haskell/cabal/issues/8326 Related: https://github.com/haskell/cabal/issues/9060 Related: https://github.com/haskell/cabal/pull/9073 Related: https://github.com/haskell/cabal/pull/9049 --- .github/workflows/haskell-ci-hackage.patch | 18 ++++++++++-------- .github/workflows/haskell-ci.yml | 6 +++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/haskell-ci-hackage.patch b/.github/workflows/haskell-ci-hackage.patch index af35032..34d1cdf 100644 --- a/.github/workflows/haskell-ci-hackage.patch +++ b/.github/workflows/haskell-ci-hackage.patch @@ -37,24 +37,26 @@ set in GitHub repository secrets. jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} -@@ -31,6 +38,7 @@ - compilerVersion: 9.0.2 +@@ -33,6 +40,7 @@ + compilerVersion: 9.8.1 setup-method: ghcup allow-failure: false + upload: true - - compiler: ghc-8.10.7 + - compiler: ghc-9.6.3 compilerKind: ghc - compilerVersion: 8.10.7 -@@ -237,7 +237,7 @@ - ${CABAL} -vnormal check + compilerVersion: 9.6.3 +@@ -257,6 +265,10 @@ - name: haddock run: | -- $CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + $CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ++ - name: haddock for hackage ++ if: matrix.upload ++ run: | + $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all - name: unconstrained build run: | rm -f cabal.project.local -@@ -248,3 +248,75 @@ +@@ -267,3 +279,75 @@ with: key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 6bca969..f627008 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -40,6 +40,7 @@ jobs: compilerVersion: 9.8.1 setup-method: ghcup allow-failure: false + upload: true - compiler: ghc-9.6.3 compilerKind: ghc compilerVersion: 9.6.3 @@ -60,7 +61,6 @@ jobs: compilerVersion: 9.0.2 setup-method: ghcup allow-failure: false - upload: true - compiler: ghc-8.10.7 compilerKind: ghc compilerVersion: 8.10.7 @@ -263,6 +263,10 @@ jobs: cd ${PKGDIR_X11} || false ${CABAL} -vnormal check - name: haddock + run: | + $CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all + - name: haddock for hackage + if: matrix.upload run: | $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all - name: unconstrained build