{"thread":{"id":"63101","subject":"[PATCH] ci: perform build and smoke tests for Meson docs","startedAt":"2025-03-12T14:29:00Z","lastAt":"2025-09-11T07:49:05Z","messageCount":3,"participants":["Patrick Steinhardt","SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"514060","messageId":"20250312-b4-pks-ci-meson-docs-v1-1-5e7cf7ac959a@pks.im","threadId":"63101","inReplyTo":null,"subject":"[PATCH] ci: perform build and smoke tests for Meson docs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-03-12T14:28:54Z","receivedAt":"2025-03-12T14:29:00Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Our \"documentation\" CI job performs a couple of tests against our\ndocumentation. Part of these tests is to check whether documentation\nbuilds at all and whether it spits out the expected set of files. We\ndon't yet have such a test for Meson, which means that we wouldn't\nnotice at all if building the documentation were to break. As a result,\nbreakages as fixed by 87eccc3a81d (meson: fix building technical and\nhowto docs, 2025-03-02) are easy to go unnoticed.\n\nAddress this test gap by starting to build both manpages and HTML sites\nas part of the CI job.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\nHi,\n\nthis single patch expands our \"documentation\" CI job to also start\nbuilding Meson documentation.\n\nThanks!\n\nPatrick\n---\n ci/test-documentation.sh | 27 +++++++++++++++++++++------\n 1 file changed, 21 insertions(+), 6 deletions(-)\n\ndiff --git a/ci/test-documentation.sh b/ci/test-documentation.sh\nindex 6c018b673e0..49f87f50fd7 100755\n--- a/ci/test-documentation.sh\n+++ b/ci/test-documentation.sh\n@@ -15,6 +15,13 @@ filter_log () {\n \t    \"$1\"\n }\n \n+check_docs () {\n+\ttest -s \"$1\"/Documentation/git.html &&\n+\ttest -s \"$1\"/Documentation/git.xml &&\n+\ttest -s \"$1\"/Documentation/git.1 &&\n+\tgrep \"<meta name=\\\"generator\\\" content=\\\"$2 \" \"$1\"/Documentation/git.html\n+}\n+\n make check-builtins\n make check-docs\n \n@@ -23,10 +30,7 @@ make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)\n cat stderr.raw\n filter_log stderr.raw >stderr.log\n test ! -s stderr.log\n-test -s Documentation/git.html\n-test -s Documentation/git.xml\n-test -s Documentation/git.1\n-grep '<meta name=\"generator\" content=\"AsciiDoc ' Documentation/git.html\n+check_docs . AsciiDoc\n \n rm -f stdout.log stderr.log stderr.raw\n check_unignored_build_artifacts\n@@ -37,10 +41,21 @@ make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)\n cat stderr.raw\n filter_log stderr.raw >stderr.log\n test ! -s stderr.log\n-test -s Documentation/git.html\n-grep '<meta name=\"generator\" content=\"Asciidoctor ' Documentation/git.html\n+check_docs . Asciidoctor\n \n rm -f stdout.log stderr.log stderr.raw\n check_unignored_build_artifacts\n \n+# Build docs with Meson and AsciiDoc\n+meson setup build-asciidoc -Ddocs=html,man -Ddocs_backend=asciidoc\n+meson compile -C build-asciidoc\n+check_docs build-asciidoc AsciiDoc\n+rm -rf build-asciidoc\n+\n+# Build docs with Meson and AsciiDoctor\n+meson setup build-asciidoctor -Ddocs=html,man -Ddocs_backend=asciidoctor\n+meson compile -C build-asciidoctor\n+check_docs build-asciidoctor Asciidoctor\n+rm -rf build-asciidoctor\n+\n save_good_tree\n\n---\nbase-commit: 87a0bdbf0f72b7561f3cd50636eee33dcb7dbcc3\nchange-id: 20250312-b4-pks-ci-meson-docs-1fb10b67ebef\n\n"},{"id":"525137","messageId":"aLCf0UaTxy5Nxpv/@szeder.dev","threadId":"63101","inReplyTo":"20250312-b4-pks-ci-meson-docs-v1-1-5e7cf7ac959a@pks.im","subject":"Re: [PATCH] ci: perform build and smoke tests for Meson docs","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2025-08-28T18:28:33Z","receivedAt":"2025-08-28T18:28:47Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Wed, Mar 12, 2025 at 03:28:54PM +0100, Patrick Steinhardt wrote:\n> Our \"documentation\" CI job performs a couple of tests against our\n> documentation. Part of these tests is to check whether documentation\n> builds at all and whether it spits out the expected set of files. We\n> don't yet have such a test for Meson, which means that we wouldn't\n> notice at all if building the documentation were to break. As a result,\n> breakages as fixed by 87eccc3a81d (meson: fix building technical and\n> howto docs, 2025-03-02) are easy to go unnoticed.\n> \n> Address this test gap by starting to build both manpages and HTML sites\n> as part of the CI job.\n> \n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n> Hi,\n> \n> this single patch expands our \"documentation\" CI job to also start\n> building Meson documentation.\n> \n> Thanks!\n> \n> Patrick\n> ---\n>  ci/test-documentation.sh | 27 +++++++++++++++++++++------\n>  1 file changed, 21 insertions(+), 6 deletions(-)\n> \n> diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh\n> index 6c018b673e0..49f87f50fd7 100755\n> --- a/ci/test-documentation.sh\n> +++ b/ci/test-documentation.sh\n> @@ -15,6 +15,13 @@ filter_log () {\n>  \t    \"$1\"\n>  }\n>  \n> +check_docs () {\n> +\ttest -s \"$1\"/Documentation/git.html &&\n> +\ttest -s \"$1\"/Documentation/git.xml &&\n> +\ttest -s \"$1\"/Documentation/git.1 &&\n> +\tgrep \"<meta name=\\\"generator\\\" content=\\\"$2 \" \"$1\"/Documentation/git.html\n> +}\n> +\n>  make check-builtins\n>  make check-docs\n>  \n> @@ -23,10 +30,7 @@ make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)\n>  cat stderr.raw\n>  filter_log stderr.raw >stderr.log\n>  test ! -s stderr.log\n> -test -s Documentation/git.html\n> -test -s Documentation/git.xml\n> -test -s Documentation/git.1\n> -grep '<meta name=\"generator\" content=\"AsciiDoc ' Documentation/git.html\n> +check_docs . AsciiDoc\n>  \n>  rm -f stdout.log stderr.log stderr.raw\n>  check_unignored_build_artifacts\n> @@ -37,10 +41,21 @@ make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)\n>  cat stderr.raw\n>  filter_log stderr.raw >stderr.log\n>  test ! -s stderr.log\n> -test -s Documentation/git.html\n> -grep '<meta name=\"generator\" content=\"Asciidoctor ' Documentation/git.html\n> +check_docs . Asciidoctor\n>  \n>  rm -f stdout.log stderr.log stderr.raw\n>  check_unignored_build_artifacts\n>  \n> +# Build docs with Meson and AsciiDoc\n> +meson setup build-asciidoc -Ddocs=html,man -Ddocs_backend=asciidoc\n> +meson compile -C build-asciidoc\n> +check_docs build-asciidoc AsciiDoc\n> +rm -rf build-asciidoc\n> +\n> +# Build docs with Meson and AsciiDoctor\n> +meson setup build-asciidoctor -Ddocs=html,man -Ddocs_backend=asciidoctor\n> +meson compile -C build-asciidoctor\n> +check_docs build-asciidoctor Asciidoctor\n> +rm -rf build-asciidoctor\n\nThe documentation CI job should only build the documentation, but\nthese meson commands unnecessarily compile git as well:\n\nhttps://github.com/git/git/actions/runs/17222438141/job/48860520663#step:4:4679\n\n  + meson compile -C build-asciidoc\n  ninja: Entering directory `/home/runner/work/git/git/build-asciidoc'\n  [1/1327] Generating hook-list.h with a custom command\n  [2/1327] Generating config-list.h with a custom command\n  [3/1327] Generating GIT-VERSION-FILE with a custom command (wrapped by meson to set env)\n  [4/1327] Generating command-list.h with a custom command\n  [5/1327] Generating version-def.h with a custom command (wrapped by meson to set env)\n  [6/1327] Generating Documentation/asciidoc.conf with a custom command (wrapped by meson to set env)\n  [7/1327] Generating t/clar-decls.h with a custom command\n  [8/1327] Generating Documentation/cmds-ancillaryinterrogators.adoc with a custom command\n  [9/1327] Generating Documentation/mergetools-diff.adoc with a custom command (wrapped by meson to set env)\n  [10/1327] Compiling C object libcommon-main.a.p/common-main.c.o\n  [11/1327] Compiling C object libgit.a.p/alias.c.o\n  [12/1327] Compiling C object libgit.a.p/advice.c.o\n  [13/1327] Compiling C object libgit.a.p/abspath.c.o\n\n"},{"id":"526111","messageId":"aMJ-5oRFtRKFnQ2s@pks.im","threadId":"63101","inReplyTo":"aLCf0UaTxy5Nxpv/@szeder.dev","subject":"Re: [PATCH] ci: perform build and smoke tests for Meson docs","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-09-11T07:48:54Z","receivedAt":"2025-09-11T07:49:05Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Aug 28, 2025 at 08:28:33PM +0200, SZEDER Gábor wrote:\n> The documentation CI job should only build the documentation, but\n> these meson commands unnecessarily compile git as well:\n> \n> https://github.com/git/git/actions/runs/17222438141/job/48860520663#step:4:4679\n> \n>   + meson compile -C build-asciidoc\n>   ninja: Entering directory `/home/runner/work/git/git/build-asciidoc'\n>   [1/1327] Generating hook-list.h with a custom command\n>   [2/1327] Generating config-list.h with a custom command\n>   [3/1327] Generating GIT-VERSION-FILE with a custom command (wrapped by meson to set env)\n>   [4/1327] Generating command-list.h with a custom command\n>   [5/1327] Generating version-def.h with a custom command (wrapped by meson to set env)\n>   [6/1327] Generating Documentation/asciidoc.conf with a custom command (wrapped by meson to set env)\n>   [7/1327] Generating t/clar-decls.h with a custom command\n>   [8/1327] Generating Documentation/cmds-ancillaryinterrogators.adoc with a custom command\n>   [9/1327] Generating Documentation/mergetools-diff.adoc with a custom command (wrapped by meson to set env)\n>   [10/1327] Compiling C object libcommon-main.a.p/common-main.c.o\n>   [11/1327] Compiling C object libgit.a.p/alias.c.o\n>   [12/1327] Compiling C object libgit.a.p/advice.c.o\n>   [13/1327] Compiling C object libgit.a.p/abspath.c.o\n\nIndeed. I'll send a patch for this in a bit. Thanks!\n\nPatrick\n"}]}