Introduce more helper functions corresponding to the jobs we currently
run for container workloads in GitLab. Some of the variables used in
the functions have to provide default values identical to the options
we pass to the jobs in GitLab to match the same behaviour if not
overriden by the user on the CLI when the local container execution is
used.

Signed-off-by: Erik Skultety <eskul...@redhat.com>
---
 ci/build.sh | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/ci/build.sh b/ci/build.sh
index 15c157067b..f169dd01a1 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -29,10 +29,41 @@ run_build() {
     meson compile -C build $MESON_BUILD_ARGS
 }
 
+run_dist() {
+    meson dist -C build --no-tests
+}
+
 run_test() {
     meson test -C build $MESON_TEST_ARGS
 }
 
+run_codestyle() {
+    MESON_BUILD_ARGS=${MESON_BUILD_ARGS:="libvirt-pot-dep"}
+    MESON_TEST_ARGS=${MESON_TEST_ARGS:="--suite syntax-check \
+                                        --no-rebuild \
+                                        --print-errorlogs"}
+    run_build
+    run_test
+}
+
+run_potfile() {
+    MESON_BUILD_ARGS=${MESON_BUILD_ARGS:="libvirt-pot-dep libvirt-pot"}
+    run_build
+}
+
+run_rpmbuild() {
+    run_dist
+    rpmbuild --clean \
+             --nodeps \
+             --define "_without_mingw 1" \
+             -ta build/meson-dist/libvirt-*.tar.xz
+}
+
+run_website_build() {
+    MESON_BUILD_ARGS=${MESON_BUILD_ARGS:="install-web"}
+    DESTDIR=$(pwd)/install run_build
+}
+
 main() {
     run_meson_setup
     run_build
-- 
2.39.1

Reply via email to