Anastasia Klimchuk has uploaded this change for review.

View Change

meson: Update CI script to enforce building man pages and docs

`test_build.sh` is used by Jenkins, therefore it should build
everything. Docker container for Jenkins is expected to have all
the dependencies installed, and if some of them are missing, script
should fail.

Recently we had a situation when docker image was missing sphinx
and flashrom Jenkins was silently skipping building man-pages and
documentation. This patch prevents this happening again, because
building man pages and docs will be enforced.

Change-Id: Ib89abddad27d1168cf0a621cf4bdb9f541266165
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
---
M doc/meson.build
M test_build.sh
2 files changed, 9 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/65/81665/1
diff --git a/doc/meson.build b/doc/meson.build
index 5bc57b9..a2dad0e 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -34,4 +34,12 @@
)
endif

+else # sphinx-build not found
+ if get_option('man-pages').enabled()
+ error('Cannot build man-pages because sphinx-build is missing.')
+ endif
+
+ if get_option('documentation').enabled()
+ error('Cannot build documentation because sphinx-build is missing.')
+ endif
endif
diff --git a/test_build.sh b/test_build.sh
index 9b490dc..081738b 100755
--- a/test_build.sh
+++ b/test_build.sh
@@ -51,7 +51,7 @@

build_meson () {
build_dir=out
- meson_opts="-Dtests=enabled"
+ meson_opts="-Dtests=enabled -Dman-pages-enabled -Ddocumentation=enabled"
ninja_opts="-j $(nproc)"

rm -rf ${build_dir}

To view, visit change 81665. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: main
Gerrit-Change-Id: Ib89abddad27d1168cf0a621cf4bdb9f541266165
Gerrit-Change-Number: 81665
Gerrit-PatchSet: 1
Gerrit-Owner: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-MessageType: newchange