In the distros using RPMs, we build libvirt once as a side effect of running "ninja dist", and once via rpmbuild. In addition "ninja dist" will run all tests including the "syntax-check" suite, despite use having a separate "codestyle" job for for that. There is no way to pass "--no-suite" when creating the dist, but if we switch to invoking "meson dist", we can skip the build+test part entirely using "--no-tests". When doing this we then run explicit "meson compile" and "meson test" commands for the distros that don't build the RPMs, and in the latter case we can now skip the "syntax-check" suite. The RPM builds already skipped the "syntax-check" suite. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- .gitlab-ci.yml | 7 +++++-- ci/cirrus/build.yml | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9dfbd0ca54..11a201563f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,10 +61,13 @@ stages: - *script_variables script: - meson setup build --werror || (cat build/meson-logs/meson-log.txt && exit 1) - - meson dist -C build + - meson dist -C build --no-tests - if test -x /usr/bin/rpmbuild && test "$RPM" != "skip"; then rpmbuild --nodeps -ta build/meson-dist/libvirt-*.tar.xz; + else + meson compile -C build; + meson test -C build --no-suite syntax-check --print-errorlogs; fi # Jobs that we delegate to Cirrus CI because they require an operating @@ -124,7 +127,7 @@ stages: script: - meson setup build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1) - meson compile -C build - - if test "$CROSS" = "i686" ; then meson test -C build --print-errorlogs ; fi + - if test "$CROSS" = "i686" ; then meson test -C build --no-suite syntax-check --print-errorlogs ; fi # Native container build jobs diff --git a/ci/cirrus/build.yml b/ci/cirrus/build.yml index c9420a8d91..39c17dc08a 100644 --- a/ci/cirrus/build.yml +++ b/ci/cirrus/build.yml @@ -23,4 +23,6 @@ build_task: - git reset --hard "$CI_COMMIT_SHA" build_script: - meson setup build - - meson dist -C build + - meson dist -C build --no-tests + - meson compile -C build + - meson test -C build --no-suite syntax-check -- 2.31.1