From 96117ae5149e5d8135d815daa9a175f182c6a13e Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 7 Nov 2023 05:27:18 -0800 Subject: [PATCH] ci: do haddock testing less often, in the mac binaries workflow It costs 1m+, doesn't fail that often, and is not hard to fix even if detected late. --- .github/workflows/binaries-mac-x64.yml | 12 ++++++++++++ .github/workflows/ci.yml | 23 ++++++++++++++--------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/binaries-mac-x64.yml b/.github/workflows/binaries-mac-x64.yml index 3c1957046..4ee1f317d 100644 --- a/.github/workflows/binaries-mac-x64.yml +++ b/.github/workflows/binaries-mac-x64.yml @@ -183,6 +183,18 @@ jobs: COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons -x ledger-compat/ledger-baseline -x ledger-compat/ledger-regress -x ledger-compat/ledger-collected # bin if: env.CONTINUE + # This is tested here rather than in the regular CI because it's slow, + # doesn't fail too often, and the cost of late detection and fixing is low. + - name: Test haddock generation + env: + stack: ${{ matrix.plan.stack }} + run: | + printf "haddock version: "; haddock --version + time $stack build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" + # --no-haddock-hyperlink-source is 25% faster + # --no-print-missing-docs is 600% quieter + if: env.CONTINUE + # artifacts: - name: Gather binaries diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51234ae24..21fb1dd77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -245,6 +245,7 @@ jobs: # Packages are built one at a time to fail faster on error. # Note: doctests won't run if using GHC 9.0, see hledger-lib/package.yaml + # Takes ~2m on a 2023 github worker. - name: Build all hledger modules fast, warning free, run unit/doc/bench tests env: stack: ${{ matrix.plan.stack }} @@ -267,6 +268,7 @@ jobs: shelltest --version if: env.CONTINUE + # Takes ~30s on a 2023 github worker. - name: Test functional tests (excluding addons) env: stack: ${{ matrix.plan.stack }} @@ -276,15 +278,18 @@ jobs: # XXX run the bin/ func tests corresponding to the GHC version enabled above, only if: env.CONTINUE - - name: Test haddock generation - env: - stack: ${{ matrix.plan.stack }} - run: | - printf "haddock version: "; haddock --version - time $stack build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" || echo "HADDOCK FAILED, IGNORING" - # --no-haddock-hyperlink-source is 25% faster - # --no-print-missing-docs is 600% quieter - if: env.CONTINUE + # Takes 1m+ on a 2023 github worker. + # Moved to (one of) the binaries-* workflows instead; + # haddock breakage might not be found until release time but it's easy to fix. + # - name: Test haddock generation + # env: + # stack: ${{ matrix.plan.stack }} + # run: | + # printf "haddock version: "; haddock --version + # time $stack build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" || echo "HADDOCK FAILED, IGNORING" + # # --no-haddock-hyperlink-source is 25% faster + # # --no-print-missing-docs is 600% quieter + # if: env.CONTINUE - name: Gather binaries id: exes