From: Michael Jeanson Date: Wed, 16 Aug 2023 18:21:10 +0000 (-0400) Subject: jjb: integration: move amd64 jobs to deb12 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=363515a5ebfb0ce0367dcbeb57ca1026fd2e39e1;p=lttng-ci.git jjb: integration: move amd64 jobs to deb12 Change-Id: I5f51f0e353725962c9a40680de15cf7f977cd97c Signed-off-by: Michael Jeanson --- diff --git a/jobs/integration.yaml b/jobs/integration.yaml index fb4cd90..323dd16 100644 --- a/jobs/integration.yaml +++ b/jobs/integration.yaml @@ -19,6 +19,11 @@ project-type: freestyle concurrent: true node: 'amd64-rootnode' + + properties: + - build-discarder: + days-to-keep: 2 + wrappers: - workspace-cleanup - timestamps @@ -27,6 +32,7 @@ timeout: 6 fail: true type: no-activity + parameters: - string: name: 'ARTIFACT_ID' @@ -45,16 +51,18 @@ - 32bit-relayd - 32bit-cli - canary + builders: - copyartifact: - project: 'babeltrace_${BT_VERSION}_build/platform=bionic-amd64,conf=std,build=std' + project: 'babeltrace_${BT_VERSION}_linuxbuild/platform=deb12-amd64,conf=std,build=std' which-build: last-successful stable: false filter: 'build/**' target: 'deps-64' do-not-fingerprint: true - shell: - !include-raw-escape: scripts/integration/32-64/build.sh + !include-raw: scripts/integration/32-64/build.sh + publishers: - postbuildscript: mark-unstable-if-failed: true diff --git a/pipelines/integration/lttng-tools-_version_-32-64_testsuite.groovy.inc b/pipelines/integration/lttng-tools-_version_-32-64_testsuite.groovy.inc index c6490d3..8d64bf5 100644 --- a/pipelines/integration/lttng-tools-_version_-32-64_testsuite.groovy.inc +++ b/pipelines/integration/lttng-tools-_version_-32-64_testsuite.groovy.inc @@ -32,7 +32,7 @@ pipeline { * have this guarantee since we used 2 different jobs */ stage('Checkout all sources') { - agent { label 'bionic-amd64' } + agent { label 'deb12-amd64' } steps { dir("src/userspace-rcu") { checkout([$class: 'GitSCM', branches: [[name: '{{ urcu_version }}']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/urcu/userspace-rcu']]]) @@ -53,9 +53,10 @@ pipeline { } stage('Build') { + /* Build the i386 and amd64 artifacts in parallel */ parallel { stage('Build amd64 deps') { - agent { label 'bionic-amd64' } + agent { label 'deb12-amd64' } stages { stage('Clean workspace') { steps { @@ -101,10 +102,10 @@ pipeline { ''' } - /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ + /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ sh ''' cp -rv build/ $BASEDIR_64 - rm -rv build/ + rm -rvf build/ ''' dir("src/lttng-ust") { @@ -121,10 +122,10 @@ pipeline { ''' } - /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ + /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ sh ''' cp -rv build/ $BASEDIR_64 - rm -rv build/ + rm -rvf build/ ''' stash name: "amd64-deps-lttng-tools", includes: 'deps-64/**' @@ -133,7 +134,7 @@ pipeline { } } stage('Build i386, including lttng-tools') { - agent { label 'bionic-i386' } + agent { label 'deb12-i386' } stages { stage('Clean workspace') { steps { @@ -176,10 +177,10 @@ pipeline { ''' } - /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ + /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ sh ''' cp -rv build/ $BASEDIR_32 - rm -rv build/ + rm -rvf build/ ''' @@ -197,10 +198,10 @@ pipeline { ''' } - /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ + /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ sh ''' cp -rv build/ $BASEDIR_32 - rm -rv build/ + rm -rvf build/ ''' dir("src/lttng-tools") { @@ -217,10 +218,10 @@ pipeline { ''' } - /* Move the artifact of the recently build project to the deps file and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ + /* Move the artifacts of the recently built project to the deps directory and remove the "build" directory to prevent `make install` shenanigans for lttng-ust 2.12 */ sh ''' cp -rv build/ $BASEDIR_32 - rm -rv build/ + rm -rvf build/ ''' stash name: "i386-deps-lttng-tools", includes: 'deps-32/**' @@ -236,7 +237,7 @@ pipeline { } } stage('Object store') { - agent { label 'bionic-amd64' } + agent { label 'deb12-amd64' } environment { S3_PREFIX = "s3://jenkins/32-64-bit-integration" } diff --git a/scripts/integration/32-64/build.sh b/scripts/integration/32-64/build.sh index 36dce9e..1e329c7 100644 --- a/scripts/integration/32-64/build.sh +++ b/scripts/integration/32-64/build.sh @@ -2,6 +2,7 @@ # shellcheck disable=SC2103 # # Copyright (C) 2022 Jonathan Rajotte-Julien +# Copyright (C) 2023 Michael Jeanson # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,6 +21,8 @@ set -eux BASEDIR_64="$WORKSPACE/deps-64/build" BASEDIR_32="$WORKSPACE/deps-32/build" +PREFIX="/build" + export CPPFLAGS="-I$BASEDIR_64/include" export LDFLAGS="-L$BASEDIR_64/lib" export CFLAGS="-g -O0" @@ -27,19 +30,33 @@ export CXXFLAGS="-g -O0" export PKG_CONFIG_PATH="$BASEDIR_64/lib/pkgconfig" export LD_LIBRARY_PATH="$BASEDIR_64/lib:$BASEDIR_32/lib" export PATH="$PATH:$BASEDIR_64/bin" + export BABELTRACE_PLUGIN_PATH="$BASEDIR_64/lib/babeltrace2/plugins/" export LIBBABELTRACE2_PLUGIN_PROVIDER_DIR="$BASEDIR_64/lib/babeltrace2/plugin-providers/" -PREFIX="/build" + export JAVA_HOME="/usr/lib/jvm/default-java" DEPS_JAVA="$WORKSPACE/deps-64/build/share/java" export CLASSPATH="$DEPS_JAVA/lttng-ust-agent-all.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar" + export PYTHON2="python2" export PYTHON3="python3" -P2_VERSION=$($PYTHON2 -c "import sys;print(sys.version[:3])") -P3_VERSION=$($PYTHON3 -c "import sys;print(sys.version[:3])") -DEPS_PYTHON2="$WORKSPACE/deps-64/build/lib/python$P2_VERSION/site-packages" + +if command -v $PYTHON2 >/dev/null 2>&1; then + P2_VERSION=$($PYTHON2 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))') + DEPS_PYTHON2="$WORKSPACE/deps/build/lib/python$P2_VERSION/site-packages" + + PYTHON_TEST_ARG="--enable-test-python-agent-all" +else + PYTHON_TEST_ARG="--enable-test-python3-agent" +fi + +P3_VERSION=$($PYTHON3 -c 'import sys;v = sys.version.split()[0].split("."); print("{}.{}".format(v[0], v[1]))') DEPS_PYTHON3="$WORKSPACE/deps-64/build/lib/python$P3_VERSION/site-packages" -export PYTHONPATH="$DEPS_PYTHON2:$DEPS_PYTHON3" + +# Most build configs require access to the babeltrace 2 python bindings. +# This also makes the lttngust python agent available for `agents` builds. +export PYTHONPATH="${DEPS_PYTHON2:-}${DEPS_PYTHON2:+:}$DEPS_PYTHON3" + export LTTNG_CONSUMERD32_BIN="$BASEDIR_32/lib/lttng/libexec/lttng-consumerd" export LTTNG_CONSUMERD32_LIBDIR="$BASEDIR_32/lib" export LTTNG_CONSUMERD64_BIN="$BASEDIR_64/lib/lttng/libexec/lttng-consumerd" @@ -80,7 +97,7 @@ popd pushd src/lttng-tools ./bootstrap -./configure --prefix="$PREFIX" --enable-test-java-agent-all --enable-test-python-agent-all +./configure --prefix="$PREFIX" --enable-test-java-agent-all $PYTHON_TEST_ARG popd # Deativate health test, simply because there is little value for this integration testing