]> xenbits.xensource.com Git - libvirt.git/commitdiff
gitlab: avoid building libvirt twice and running syntax-check twice
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 10 May 2021 17:14:12 +0000 (18:14 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 12 May 2021 13:18:15 +0000 (14:18 +0100)
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.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
.gitlab-ci.yml
ci/cirrus/build.yml

index 9dfbd0ca54d8a68a9550910f08e0dabad0db819d..11a201563f094af17942690cfad1712aaa3886d8 100644 (file)
@@ -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
index c9420a8d913ee5b9026a7223a5ba2620b5d4dbe2..39c17dc08a4331aa6392f91b6fd046ede8e1c2ba 100644 (file)
@@ -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