[Libguestfs] [libnbd PATCH v2 17/23] ci: Some build script fixes

Martin Kletzander mkletzan at redhat.com
Thu Jun 10 23:12:21 UTC 2021


Provide a default for `$MAKE` so that the script is more easily usable outside
of CI and propagate `$CONFIGURE_OPTS` from lcitool to the configure script.
Lastly describe why cross compilation checking is skipped.  Even though cross
compilation is completely disabled in CI, the more generic of a script we have
the easier the adaptation to other projects could be.

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
 ci/build_script.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ci/build_script.sh b/ci/build_script.sh
index 8e2cb5b986ca..1439df365cec 100755
--- a/ci/build_script.sh
+++ b/ci/build_script.sh
@@ -3,6 +3,8 @@
 set -e
 
 main() {
+    MAKE="${MAKE-make -j $(getconf _NPROCESSORS_ONLN)}"
+
     autoreconf -if
 
     CONFIG_ARGS="\
@@ -20,13 +22,14 @@ main() {
        CONFIG_ARGS="$CONFIG_ARGS --enable-golang"
     fi
 
-    ./configure $CONFIG_ARGS
+    ./configure $CONFIGURE_OPTS $CONFIG_ARGS
 
     $MAKE
 
     if test -n "$CROSS"
     then
-       return 0
+        echo "Possibly run tests with an emulator in the future"
+        return 0
     fi
 
     $MAKE check
-- 
2.32.0




More information about the Libguestfs mailing list