ci: Fix docs tarball

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")
This commit is contained in:
Tomas Janousek 2022-10-30 23:01:41 +00:00
parent c4dca3592e
commit 6880417911
3 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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