From: Erik Skultety Date: Thu, 24 Aug 2023 13:44:52 +0000 (+0200) Subject: ci: build.sh: Add a wrapper function over meson's setup X-Git-Tag: v9.8.0-rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ee28514813c6d36af8d1048711cd2dd8769c13c;p=thirdparty%2Flibvirt.git ci: build.sh: Add a wrapper function over meson's setup The reason for this wrapper is that all job functions introduced in future patches will refer to this one instead of open-coding the same 'meson setup' invocation N times. It also prevents 'setup' to be called multiple times as some future job functions might actually do just that in a transitive manner. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé --- diff --git a/ci/build.sh b/ci/build.sh index a5f6f812fb..51eeff03e8 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -32,3 +32,8 @@ run_cmd() { printf "\e[32m[RUN COMMAND]: '%s'\e[0m\n" "$*" "$@" } + +run_meson_setup() { + run_cmd meson setup build --error -Dsystem=true $MESON_OPTS $MESON_ARGS || \ + (cat "${GIT_ROOT}/build/meson-logs/meson-log.txt" && exit 1) +}