]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
CI: Consistently build in ./build
authorSimon McVittie <smcv@collabora.com>
Fri, 24 Jun 2022 13:15:27 +0000 (14:15 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
This will make it easier to capture log files. All our CI builds happen
in an expendable checkout, so we can safely remove and re-create ./build.

Signed-off-by: Simon McVittie <smcv@collabora.com>
.gitignore
.gitlab-ci.yml
tools/ci-build.sh

index e16b972efce6b0eeaf6ce98e08a518089418f5f8..931e60a21bd985e9625d4e2bde16d13f142a4aca 100644 (file)
@@ -4,6 +4,7 @@
 /aclocal.m4
 /aminclude_static.am
 /autom4te.cache
+/build/
 /build-aux/
 /bus/tmpfiles.d/dbus.conf
 /ci-build*/
@@ -25,6 +26,7 @@ file*.lst
 /libtool
 /m4/libtool.m4
 /m4/lt*.m4
+/src-from-dist/
 /stamp-h
 /stamp-h.in
 /stamp-h1
index 698ddc4b735fc48f8512ec2c37a8f102223266e8..e973fd70c1371e90e19490ab98603a4673700c0a 100644 (file)
@@ -34,6 +34,7 @@ stages:
   - build
 
 variables:
+  builddir: "build"
   ci_in_docker: "yes"
   ci_local_packages: "yes"
   ci_parallel: "2"
@@ -82,11 +83,11 @@ variables:
     ci_buildsys: "meson"
   artifacts:
     reports:
-      junit: "$builddir/meson-logs/testlog.junit.xml"
+      junit: "build/meson-logs/testlog.junit.xml"
     name: "dbus-$CI_JOB_NAME"
     when: always
     paths:
-      - "$builddir/meson-logs/*.txt"
+      - "build/meson-logs/*.txt"
 
 windows amd64 image:
   stage: "build docker"
@@ -180,8 +181,6 @@ debian meson:
   extends:
     - .meson-common
     - .debian-build
-  variables:
-    builddir: "ci-build-production-native"
 
 debian mingw32 autotools debug:
   extends: .debian-build
@@ -266,7 +265,6 @@ opensuse mingw64 meson debug:
     ci_host: "x86_64-w64-mingw32"
     ci_local_packages: "no"
     ci_variant: "debug"
-    builddir: "ci-build-$ci_variant-$ci_host"
 
 .ubuntu-build:
   extends: .unix-host-build
index 590a74bad8355a3b4d5a457af9011e468a83fbff..2f309c19c2fd776e031d8957d37e36a654a8e4ff 100755 (executable)
@@ -175,10 +175,13 @@ maybe_fail_tests () {
 # own checks.
 NOCONFIGURE=1 ./autogen.sh
 
+# clean up directories from possible previous builds
+rm -rf "$builddir"
+rm -rf ci-build-dist
+rm -rf src-from-dist
+
 case "$ci_buildsys" in
     (cmake-dist)
-        # clean up directories from possible previous builds
-        rm -rf ci-build-dist
         # Do an Autotools `make dist`, then build *that* with CMake,
         # to assert that our official release tarballs will be enough
         # to build with CMake.
@@ -186,10 +189,17 @@ case "$ci_buildsys" in
         ( cd ci-build-dist; ../configure )
         make -C ci-build-dist dist
         tar --xz -xvf ci-build-dist/dbus-1.*.tar.xz
-        cd dbus-1.*/
+        mv dbus-1.*/ src-from-dist
+        srcdir="$(pwd)/src-from-dist"
+        ;;
+    (*)
+        srcdir="$(pwd)"
         ;;
 esac
 
+mkdir -p "$builddir"
+builddir="$(realpath "$builddir")"
+
 #
 # cross compile setup
 #
@@ -219,11 +229,6 @@ case "$ci_host" in
         ;;
 esac
 
-srcdir="$(pwd)"
-builddir="ci-build-${ci_variant}-${ci_host}"
-# clean up directories from possible previous builds
-rm -rf "$builddir"
-mkdir -p "$builddir"
 cd "$builddir"
 
 make="make -j${ci_parallel} V=1 VERBOSE=1"