Move the build tree out of the source tree (fixed ../build)
The build directory is now a fixed 'build' next to the tree (qt6-after/build), not in-tree build4 / build4_<timestamp>_<pid> dirs. - CMakeLists: the $ORIGIN RTI RUNPATH entry is now 4 levels up from a bin/ or lib/ artifact (the build tree is one level shallower) - new_docker_build_release2.sh: BUILD_DIR is the fixed ../build; the DEB tar drops the ./build4* exclude (the build dir is outside the tree) - new_docker_build.sh: Docker mounts the tree's parent so ../build lands next to the tree on the host; in-container paths (cmake source, SRCROOT, deb_stage, rpms, staging tar) updated accordingly - rpmbuild/make_rpm_ubuntu26*.py: stale build4/ references now say build/ - README: build4 -> ../build in every snippet and doc line Verified: fresh full-scope configure + ninja all in qt6-after/build is green; ctest 20/22 (same 2 pre-existing out-of-scope failures as the previous baseline); RUNPATH carries the 4-level $ORIGIN entry and ddscore_unit_test runs with no LD_LIBRARY_PATH / RTI_LICENSE.
This commit is contained in:
1 parent
874efd4733
commit
dc2c3e358b
6 files changed
+56
-46
No files matched your search
@@ -474,11 +474,12 @@ log_info "Using prebuilt Docker image: all build dependencies are baked in"
|
||||
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
|
||||
cd /workspace
|
||||
cd /workspace/qt6-migrated-legatus
|
||||
|
||||
rm -rf build4
|
||||
mkdir -p build4
|
||||
cd build4
|
||||
# The build tree is ../build: next to the source tree, outside it.
|
||||
rm -rf ../build
|
||||
mkdir -p ../build
|
||||
cd ../build
|
||||
|
||||
COV_CMAKE_ARGS=()
|
||||
if [[ "${RUN_COVERAGE}" == "ON" ]]; then
|
||||
@@ -489,7 +490,7 @@ if [[ "${RUN_COVERAGE}" == "ON" ]]; then
|
||||
"-DCMAKE_SHARED_LINKER_FLAGS=--coverage"
|
||||
)
|
||||
fi
|
||||
cmake .. \
|
||||
cmake /workspace/qt6-migrated-legatus \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DRELEASE_BUILD="${RELEASE_BUILD}" \
|
||||
-DCMAKE_CXX_STANDARD=17 \
|
||||
@@ -515,7 +516,7 @@ fi
|
||||
if [[ "${RUN_COVERAGE}" == "ON" ]]; then
|
||||
log_info "=== Code coverage (lcov) ==="
|
||||
COVOUT=/workspace/coverage-out
|
||||
SRCROOT=/workspace
|
||||
SRCROOT=/workspace/qt6-migrated-legatus
|
||||
mkdir -p "${COVOUT}"
|
||||
|
||||
COV_IGNORE=(--ignore-errors mismatch,inconsistent,unused)
|
||||
@@ -558,7 +559,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
log_info "=== DEB Package Production (in-tree rpmbuild) ==="
|
||||
|
||||
OS_VERSION=$(cat /etc/os-release | grep "^VERSION_ID=" | cut -d'"' -f2)
|
||||
STAGE_DIR=/workspace/deb_stage
|
||||
STAGE_DIR=/workspace/qt6-migrated-legatus/deb_stage
|
||||
STAGED_SOURCE_DIR="${STAGE_DIR}"
|
||||
|
||||
log_info "Staging workspace to ${STAGE_DIR}"
|
||||
@@ -567,7 +568,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
tar --exclude='./rpms' --exclude='./.git' --exclude='./build' \
|
||||
--exclude='./deb_build_tmp' --exclude='./deb_stage' --exclude='./packages-out' \
|
||||
--exclude='./legatus-qt6_1.0.tar.gz' \
|
||||
-cf - -C /workspace . | tar -xf - -C "${STAGE_DIR}"
|
||||
-cf - -C /workspace/qt6-migrated-legatus . | tar -xf - -C "${STAGE_DIR}"
|
||||
|
||||
if [[ ! -f "${STAGED_SOURCE_DIR}/CMakeLists.txt" || ! -f "${STAGED_SOURCE_DIR}/rpmbuild/make_rpm_ubuntu26.py" ]]; then
|
||||
log_error "Staged source incomplete under ${STAGED_SOURCE_DIR} (CMakeLists.txt or rpmbuild/make_rpm_ubuntu26.py missing)"
|
||||
@@ -586,7 +587,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
if python3 make_rpm_ubuntu26.py -c LTS \
|
||||
--project_name "${PROJECT}" \
|
||||
--version "${LTS_VERSION}" \
|
||||
--output_dir "/workspace/rpms/${PROJECT}/${OS_VERSION}/" \
|
||||
--output_dir "/workspace/qt6-migrated-legatus/rpms/${PROJECT}/${OS_VERSION}/" \
|
||||
--source_dir "${STAGED_SOURCE_DIR}" \
|
||||
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/ -DRELEASE_BUILD=ON" \
|
||||
--build_number "${BUILD_NUMBER}" \
|
||||
@@ -601,7 +602,7 @@ if [[ "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
DEST_DIR=/workspace/packages-out
|
||||
mkdir -p "${DEST_DIR}"
|
||||
shopt -s nullglob
|
||||
for deb in "/workspace/rpms/${PROJECT}/${OS_VERSION}/"*.deb; do
|
||||
for deb in "/workspace/qt6-migrated-legatus/rpms/${PROJECT}/${OS_VERSION}/"*.deb; do
|
||||
base="$(basename "${deb}")"
|
||||
if [[ -e "${DEST_DIR}/${base}" ]] &&
|
||||
[[ "$(stat -c '%d:%i' "${deb}")" == "$(stat -c '%d:%i' "${DEST_DIR}/${base}")" ]]; then
|
||||
@@ -619,6 +620,10 @@ EOF
|
||||
|
||||
chmod +x "${CONTAINER_SCRIPT_HOST}"
|
||||
|
||||
# The workspace mount is the tree's parent (not the tree): the build tree
|
||||
# ../build then lands next to the tree on the host (qt6-after/build), not
|
||||
# inside it. NOTE: no # comment lines inside the backslash-continued docker
|
||||
# run below - they break the continuation and drop the remaining arguments.
|
||||
docker run --rm \
|
||||
-e MIGRATE_PIPELINE_ROOT \
|
||||
-e LANG \
|
||||
@@ -639,7 +644,7 @@ docker run --rm \
|
||||
-e QT_ARCH_DIR \
|
||||
-e QT_BASE_DIR \
|
||||
-e RELEASE_BUILD_TARGETS="${RELEASE_BUILD_TARGETS_STRING}" \
|
||||
-v "${WORKSPACE_ROOT_HOST}:/workspace" \
|
||||
-v "${WORKSPACE_ROOT_HOST}/..:/workspace" \
|
||||
-v "${CONTAINER_SCRIPT_HOST}:/tmp/run-build-inside-container.sh:ro" \
|
||||
-v "${PACKAGE_OUTPUT_DIR}:/workspace/packages-out" \
|
||||
-v "${COVERAGE_OUTPUT_DIR}:/workspace/coverage-out" \
|
||||
|
||||
Reference in new issue
Block a user