From 688041791176f0b6758012e35a255f9836486629 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sun, 30 Oct 2022 23:01:41 +0000 Subject: [PATCH] ci: Fix docs tarball MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit haskell-ci by default passes --haddock-all to cabal v2-haddock, which builds docs for all components and the …-docs.tar.gz tarball ends up containing the docs for the last component, which happens to be tests. We need the tarball to contain the library docs, for upload to Hackage. Fixes: 7cee1915169d ("CI: Remove hlint from haskell-ci") --- .github/workflows/haskell-ci-hackage.patch | 6 +++--- .github/workflows/haskell-ci.yml | 2 +- cabal.haskell-ci | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/haskell-ci-hackage.patch b/.github/workflows/haskell-ci-hackage.patch index ba71dd0a..cc45e227 100644 --- a/.github/workflows/haskell-ci-hackage.patch +++ b/.github/workflows/haskell-ci-hackage.patch @@ -45,12 +45,12 @@ set in GitHub repository secrets. - compiler: ghc-8.10.7 compilerKind: ghc compilerVersion: 8.10.7 -@@ -240,8 +240,80 @@ +@@ -209,8 +217,80 @@ ${CABAL} -vnormal check - name: haddock run: | -- $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all -+ $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all +- $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ++ $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 diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 40512528..6f408d30 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -245,7 +245,7 @@ jobs: ${CABAL} -vnormal check - name: haddock run: | - $CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH --haddock-for-hackage --builddir $GITHUB_WORKSPACE/haddock all + $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 diff --git a/cabal.haskell-ci b/cabal.haskell-ci index 91faaed1..d70d6e4e 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -14,3 +14,6 @@ raw-project package xmonad-contrib flags: +pedantic ghc-options: -j + +-- avoid --haddock-all which overwrites *-docs.tar.gz with tests docs +haddock-components: libs