jjb: Update babeltrace jobs
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 16 Jul 2019 20:10:16 +0000 (16:10 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Tue, 16 Jul 2019 20:10:16 +0000 (16:10 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
jobs/babeltrace.yaml
scripts/babeltrace/build.sh

index d5df88a08666a17762a214a9385ed8a96c53ff9b..09ddfeb9efe38b4a5a6972ca3b40482191ff469a 100644 (file)
     node: 'master' # Applies only to matrix flyweight task
     execution-strategy:
       combination-filter: |
-        (build=="std" && conf=="python-bindings") || (arch=="amd64")
+        (build=="std" && conf=="std") || (arch=="amd64")
     axes:
       - axis:
          type: slave
       - 'babeltrace_{version}_{buildtype}':
           buildtype: build
           arch: !!python/tuple [amd64]
-          build: !!python/tuple [std, oot, dist]
+          build: !!python/tuple [std, oot, dist, oot-dist]
           conf: !!python/tuple [std, static, python-bindings]
       - 'babeltrace_{version}_{buildtype}':
           buildtype: portbuild
           buildtype: macosxbuild
           arch: !!python/tuple [macosx]
           build: !!python/tuple [std]
-          conf: !!python/tuple [std, python-bindings, production]
+          conf: !!python/tuple [std, python-bindings]
       - 'babeltrace_{version}_{cctype}':
           cctype: clangbuild
           arch: !!python/tuple [amd64]
       - 'babeltrace_{version}_{buildtype}':
           buildtype: build
           arch: !!python/tuple [amd64]
-          build: !!python/tuple [std, oot, dist]
+          build: !!python/tuple [std, oot, dist, oot-dist]
           conf: !!python/tuple [std, static, prod, min]
       - 'babeltrace_{version}_{buildtype}':
           buildtype: portbuild
       - 'dev_{user}_babeltrace_{version}_{buildtype}':
           buildtype: build
           arch: !!python/tuple [amd64]
-          build: !!python/tuple [std, oot, dist]
+          build: !!python/tuple [std, oot, dist, oot-dist]
           conf: !!python/tuple [std, static, python-bindings]
       - 'dev_{user}_babeltrace_{version}_{buildtype}':
           buildtype: macosxbuild
       - 'dev_gerrit_babeltrace_{buildtype}':
           buildtype: build
           arch: !!python/tuple [amd64, armhf, arm64, powerpc, ppc64el, i386]
-          build: !!python/tuple [std, oot, dist]
-          conf: !!python/tuple [std, static, python-bindings, production]
+          build: !!python/tuple [std, oot, dist, oot-dist]
+          conf: !!python/tuple [std, static, prod, min]
index 0d8fdaf38f5d9ff0a73143c7bf58418ca48a7e1f..b6590a78b9323c358990d1468a2db8910c27d790 100755 (executable)
@@ -80,9 +80,6 @@ SRCDIR="$WORKSPACE/src/babeltrace"
 TMPDIR="$WORKSPACE/tmp"
 PREFIX="$WORKSPACE/build"
 
-# The build dir defaults to the source dir
-BUILDDIR="$SRCDIR"
-
 # Create install and tmp directories
 rm -rf "$PREFIX" "$TMPDIR"
 mkdir -p "$PREFIX" "$TMPDIR"
@@ -270,38 +267,66 @@ esac
 # Make sure to move to the build dir and run configure
 # before continuing.
 case "$build" in
-    oot)
-        echo "Out of tree build"
+oot)
+    echo "Out of tree build"
+
+    # Create and enter a temporary build directory
+    builddir=$(mktemp -d)
+    cd "$builddir"
+
+    "$SRCDIR/configure" --prefix="$PREFIX" "${CONF_OPTS[@]}"
+    ;;
 
-        BUILDDIR="$WORKSPACE/oot"
-        mkdir -p "$BUILDDIR"
-        cd "$BUILDDIR"
+dist)
+    echo "Distribution in-tree build"
 
-        "$SRCDIR/configure" --prefix="$PREFIX" "${CONF_OPTS[@]}"
-        ;;
+    # Run configure and generate the tar file
+    # in the source directory
+    ./configure
+    $MAKE dist
 
-    dist)
-        echo "Distribution out of tree build"
-        BUILDDIR="$(mktemp -d)"
+    # Create and enter a temporary build directory
+    builddir=$(mktemp -d)
+    cd "$builddir"
+
+    # Extract the distribution tar in the build directory,
+    # ignore the first directory level
+    $TAR xvf "$SRCDIR"/*.tar.* --strip 1
+
+    ./configure --prefix="$PREFIX" "${CONF_OPTS[@]}"
+    ;;
 
-        # Initial configure and generate tarball
-        "$SRCDIR/configure"
-        $MAKE dist
+oot-dist)
+    echo "Distribution out of tree build"
 
-        mkdir -p "$BUILDDIR"
-        cp ./*.tar.* "$BUILDDIR/"
-        cd "$BUILDDIR"
+    # Create and enter a temporary build directory
+    builddir=$(mktemp -d)
+    cd "$builddir"
 
-        # Ignore level 1 of tar
-        $TAR xvf ./*.tar.* --strip 1
+    # Run configure out of tree and generate the tar file
+    "$SRCDIR/configure"
+    $MAKE dist
 
-        ./configure --prefix="$PREFIX" "${CONF_OPTS[@]}"
-        ;;
+    dist_srcdir="$(mktemp -d)"
+    cd "$dist_srcdir"
 
-    *)
-        echo "Standard in-tree build"
-        ./configure --prefix="$PREFIX" "${CONF_OPTS[@]}"
-        ;;
+    # Extract the distribution tar in the new source directory,
+    # ignore the first directory level
+    $TAR xvf "$builddir"/*.tar.* --strip 1
+
+    # Create and enter a second temporary build directory
+    builddir="$(mktemp -d)"
+    cd "$builddir"
+
+    # Run configure from the extracted distribution tar,
+    # out of the source tree
+    "$dist_srcdir/configure" --prefix="$PREFIX" "${CONF_OPTS[@]}"
+    ;;
+
+*)
+    echo "Standard in-tree build"
+    ./configure --prefix="$PREFIX" "${CONF_OPTS[@]}"
+    ;;
 esac
 
 # We are now inside a configured build directory
@@ -332,7 +357,7 @@ find "$PREFIX/lib" -name "*.la" -exec rm -f {} \;
 # Clean temp dir for dist build
 if [ "$build" = "dist" ]; then
     cd "$SRCDIR"
-    rm -rf "$BUILDDIR"
+    rm -rf "$builddir"
 fi
 
 # Exit with the return code of the test suite
This page took 0.026797 seconds and 4 git commands to generate.