From aef6a58c0fce8fb0537a9ec515834a431ca9ab3d Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Mon, 30 Sep 2024 11:56:17 -0600 Subject: [PATCH] Add warning report to docs (#528) --- .github/workflows/docs.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c2517c14d..4b4776eb8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,11 +34,16 @@ jobs: working-directory: ${{runner.workspace}}/build-docs run: | echo "::add-matcher::.github/problem-matchers/sphinx.json" - cmake --build ${{runner.workspace}}/build-docs - echo "::remove-matcher owner=sphinx-problem-matcher-loose-no-severity::" - echo "::remove-matcher owner=sphinx-problem-matcher-loose::" - echo "::remove-matcher owner=sphinx-problem-matcher::" + cmake --build ${{runner.workspace}}/build-docs 2>&1 | tee -a build-output.txt touch ${{runner.workspace}}/build-docs/sphinx/html/.nojekyll + - name: Report + working-directory: ${{runner.workspace}}/build-docs + run: | + echo "::add-matcher::.github/problem-matchers/sphinx.json" + egrep "WARNING:|Warning:|warning:|ERROR:|Error:|error:" build-output.txt | sort | uniq | \ + awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > build-output-warnings.txt + cat build-output-warnings.txt + exit $(tail -n 1 build-output-warnings.txt | awk '{print $2}') - name: Deploy if: github.event_name == 'push' && github.ref == 'refs/heads/development' uses: JamesIves/github-pages-deploy-action@releases/v3