Skip to content

Commit ed7d9bd

Browse files
committed
Merge branch 'ps/ci-meson-check-build-docs'
CI update. * ps/ci-meson-check-build-docs: ci: perform build and smoke tests for Meson docs
2 parents 36acec7 + 9451446 commit ed7d9bd

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

ci/test-documentation.sh

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ filter_log () {
1515
"$1"
1616
}
1717

18+
check_docs () {
19+
test -s "$1"/Documentation/git.html &&
20+
test -s "$1"/Documentation/git.xml &&
21+
test -s "$1"/Documentation/git.1 &&
22+
grep "<meta name=\"generator\" content=\"$2 " "$1"/Documentation/git.html
23+
}
24+
1825
make check-builtins
1926
make check-docs
2027

@@ -23,10 +30,7 @@ make doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
2330
cat stderr.raw
2431
filter_log stderr.raw >stderr.log
2532
test ! -s stderr.log
26-
test -s Documentation/git.html
27-
test -s Documentation/git.xml
28-
test -s Documentation/git.1
29-
grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
33+
check_docs . AsciiDoc
3034

3135
rm -f stdout.log stderr.log stderr.raw
3236
check_unignored_build_artifacts
@@ -37,10 +41,21 @@ make USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.raw >&2)
3741
cat stderr.raw
3842
filter_log stderr.raw >stderr.log
3943
test ! -s stderr.log
40-
test -s Documentation/git.html
41-
grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
44+
check_docs . Asciidoctor
4245

4346
rm -f stdout.log stderr.log stderr.raw
4447
check_unignored_build_artifacts
4548

49+
# Build docs with Meson and AsciiDoc
50+
meson setup build-asciidoc -Ddocs=html,man -Ddocs_backend=asciidoc
51+
meson compile -C build-asciidoc
52+
check_docs build-asciidoc AsciiDoc
53+
rm -rf build-asciidoc
54+
55+
# Build docs with Meson and AsciiDoctor
56+
meson setup build-asciidoctor -Ddocs=html,man -Ddocs_backend=asciidoctor
57+
meson compile -C build-asciidoctor
58+
check_docs build-asciidoctor Asciidoctor
59+
rm -rf build-asciidoctor
60+
4661
save_good_tree

0 commit comments

Comments
 (0)