From ddf4faada3c5cb3b0566a719beff6732af018c48 Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Mon, 27 Nov 2023 15:23:26 -0500 Subject: [PATCH 1/9] feat: prepare libpointmatcher-build-system beta release [NMO-425] --- build_system/.env | 4 +--- build_system/.env.prompt | 4 +++- .../docker-compose.libpointmatcher.yaml | 8 +++---- .../function_library/general_utilities.bash | 2 ++ .../function_library/prompt_utilities.bash | 3 ++- .../function_library/terminal_splash.bash | 4 +++- build_system/lpm_execute_compose.bash | 18 +++++++-------- ...lpm_execute_compose_over_build_matrix.bash | 22 +++++++++---------- .../lpm_utility_script/lpm_bashrc_config.bash | 5 ++++- build_system/ubuntu/Dockerfile.dependencies | 12 +++++----- .../ubuntu/Dockerfile.dependencies_doc | 4 ++-- .../ubuntu/Dockerfile.libpointmatcher | 10 ++++----- .../ubuntu/Dockerfile.libpointmatcher_ci_PR | 12 +++++----- ...ockerfile.libpointmatcher_ci_SITREP_matrix | 12 +++++----- 14 files changed, 64 insertions(+), 56 deletions(-) diff --git a/build_system/.env b/build_system/.env index d30c0d3a..921cd964 100644 --- a/build_system/.env +++ b/build_system/.env @@ -11,9 +11,7 @@ LPM_PROJECT_DOCKERHUB=norlabulaval # - Original repo: https://github.com/ethz-asl/libpointmatcher # - DEV repo: https://github.com/norlab-ulaval/libpointmatcher-build-system -# ToDo: on repository ownership transfer >> modify next bloc ↓↓ -LPM_LIBPOINTMATCHER_SRC_DOMAIN=ethz-asl -#LPM_LIBPOINTMATCHER_SRC_DOMAIN=norlab-ulaval +LPM_LIBPOINTMATCHER_SRC_DOMAIN=norlab-ulaval #LPM_LIBPOINTMATCHER_SRC_REPO_NAME=libpointmatcher-build-system # Temporary dev fork LPM_LIBPOINTMATCHER_SRC_REPO_NAME=libpointmatcher diff --git a/build_system/.env.prompt b/build_system/.env.prompt index b4a01d91..bfdcf9cf 100644 --- a/build_system/.env.prompt +++ b/build_system/.env.prompt @@ -1,9 +1,11 @@ -# (NICE TO HAVE) ToDo: refactor (ref task NMO-304 ♻︎ → Refactor .env.prompt variables prefixed by LPM_ to MSG_) +# (NICE TO HAVE) ToDo: refactor out libpointmatcher-build-system specific env var (move them to the top .env) +# (NICE TO HAVE) ToDo: rename `.env.prompt` to `.env.prompt_style` and move it to the `function_library` LPM_PROMPT_NAME="LPM" LPM_SPLASH_NAME="Libpoinmatcher" LPM_BUILD_SYSTEM_SPLASH_NAME="Libpoinmatcher Build System" +# (NICE TO HAVE) ToDo: refactor (ref task NMO-304 ♻︎ → Refactor .env.prompt variables prefixed by LPM_ to MSG_) LPM_LINE_CHAR_BUILDER_LVL1='▉' LPM_LINE_CHAR_BUILDER_LVL2='⣿' LPM_LINE_CHAR_INSTALLER=':' diff --git a/build_system/docker-compose.libpointmatcher.yaml b/build_system/docker-compose.libpointmatcher.yaml index befe2487..179deac2 100644 --- a/build_system/docker-compose.libpointmatcher.yaml +++ b/build_system/docker-compose.libpointmatcher.yaml @@ -1,6 +1,6 @@ services: - # ====Dependency related services=================================================================================== + # ====Dependency related services================================================================ dependencies: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-dependencies:${LPM_IMAGE_TAG:?err} build: @@ -34,7 +34,7 @@ services: tty: true stdin_open: true - # ====Pull-request related services================================================================================ + # ====Pull-request related services============================================================== ci_PR: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-ci-pr:${LPM_IMAGE_TAG:?err} pull_policy: build @@ -60,7 +60,7 @@ services: extends: ci_PR platform: "linux/arm64/v8" - # ====Build system assessment services============================================================================== + # ====Build system assessment services=========================================================== ci_SITREP_matrix: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-ci-sitrep-matrix:${LPM_IMAGE_TAG:?err} pull_policy: build @@ -86,7 +86,7 @@ services: extends: ci_SITREP_matrix platform: "linux/arm64/v8" - # ====Dockerhub release image====================================================================================== + # ====Dockerhub release image==================================================================== release: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher:${LPM_IMAGE_TAG:?err} container_name: libpointmatcher diff --git a/build_system/function_library/general_utilities.bash b/build_system/function_library/general_utilities.bash index aabc0d4d..434c7c2a 100644 --- a/build_system/function_library/general_utilities.bash +++ b/build_system/function_library/general_utilities.bash @@ -39,6 +39,8 @@ source ./function_library/prompt_utilities.bash # Returns: # Return docker command exit code # ================================================================================================================= +# ToDo: redaction >> add read global IS_TEAMCITY_RUN to the doc +# ToDo: assessment >> consider adding the logic determine if run in teamcity in the script instead of relying on the IS_TEAMCITY_RUN env variable function show_and_execute_docker() { local FULL_DOCKER_COMMAND=$1 unset DOCKER_EXIT_CODE diff --git a/build_system/function_library/prompt_utilities.bash b/build_system/function_library/prompt_utilities.bash index be296574..d3b7dacb 100644 --- a/build_system/function_library/prompt_utilities.bash +++ b/build_system/function_library/prompt_utilities.bash @@ -133,7 +133,7 @@ function draw_horizontal_line_across_the_terminal_window() { local pad # Ref https://bash.cyberciti.biz/guide/$TERM_variable - TPUT_FLAG='' + TPUT_FLAG="-T $TERM" if [[ -z ${TERM} ]]; then TPUT_FLAG='-T xterm-256color' elif [[ ${TERM} == dumb ]]; then @@ -149,6 +149,7 @@ function draw_horizontal_line_across_the_terminal_window() { #printf '%*s\n' "${COLUMNS:-$(tput ${TPUT_FLAG} cols)}" '' | tr ' ' "${SYMBOL}" # Alt version + # shellcheck disable=SC2086 terminal_width="${COLUMNS:-$(tput ${TPUT_FLAG} cols)}" pad=$(printf -- "${SYMBOL}%.0s" $(seq $terminal_width)) printf -- "${pad}\n" diff --git a/build_system/function_library/terminal_splash.bash b/build_system/function_library/terminal_splash.bash index eee57083..b9d74062 100644 --- a/build_system/function_library/terminal_splash.bash +++ b/build_system/function_library/terminal_splash.bash @@ -9,6 +9,7 @@ #set -v # ....Pre-condition................................................................................................ +# ToDo: assessment >> next precondition ↓↓ not required if [[ "$(basename $(pwd))" != "build_system" ]]; then echo -e "\nERROR: This script must be sourced from directory 'build_system'!\n cwd: $(pwd)" exit 1 @@ -56,7 +57,7 @@ function echo_centering_str() { #echo "\$COLUMNS=${COLUMNS}" # Ref https://bash.cyberciti.biz/guide/$TERM_variable - TPUT_FLAG='' + TPUT_FLAG="-T $TERM" if [[ -z ${TERM} ]]; then TPUT_FLAG='-T xterm-256color' elif [[ ${TERM} == dumb ]]; then @@ -70,6 +71,7 @@ function echo_centering_str() { local terminal_width # terminal_width=$(tput ${TPUT_FLAG} cols) + # shellcheck disable=SC2086 terminal_width="${COLUMNS:-$(tput ${TPUT_FLAG} cols)}" local total_padding_len=$(( $terminal_width - $str_len )) local single_side_padding_len=$(( $total_padding_len / 2 )) diff --git a/build_system/lpm_execute_compose.bash b/build_system/lpm_execute_compose.bash index 7d33a27a..47490dc9 100644 --- a/build_system/lpm_execute_compose.bash +++ b/build_system/lpm_execute_compose.bash @@ -28,7 +28,7 @@ # Dont use "set -e" in this script as it will affect the build system policy, use the --fail-fast flag instead # -# ....Default...................................................................................................... +# ....Default...................................................................................... LIBPOINTMATCHER_VERSION='head' LIBPOINTMATCHER_CMAKE_BUILD_TYPE='RelWithDebInfo' OS_NAME='ubuntu' @@ -36,17 +36,17 @@ OS_VERSION='focal' #LPM_JOB_ID='0' DOCKER_COMPOSE_CMD_ARGS='up --build --force-recreate' # alt: build --no-cache --push -# ....Project root logic........................................................................................... +# ....Project root logic........................................................................... TMP_CWD=$(pwd) -# ....Load environment variables from file......................................................................... +# ....Load environment variables from file......................................................... set -o allexport source .env source .env.build_matrix source .env.prompt set +o allexport -# ....Helper function.............................................................................................. +# ....Helper function.............................................................................. ## import shell functions from Libpointmatcher-build-system utilities library source ./function_library/prompt_utilities.bash source ./function_library/general_utilities.bash @@ -75,7 +75,7 @@ function print_help_in_terminal() { " } -# ....TeamCity service message logic................................................................................ +# ....TeamCity service message logic............................................................... if [[ ${TEAMCITY_VERSION} ]]; then export IS_TEAMCITY_RUN=true TC_VERSION="TEAMCITY_VERSION=${TEAMCITY_VERSION}" @@ -84,7 +84,7 @@ else fi print_msg "IS_TEAMCITY_RUN=${IS_TEAMCITY_RUN} ${TC_VERSION}" -# ====Begin======================================================================================================== +# ====Begin======================================================================================== SHOW_SPLASH_EC="${SHOW_SPLASH_EC:-true}" if [[ "${SHOW_SPLASH_EC}" == 'true' ]]; then @@ -93,7 +93,7 @@ fi print_formated_script_header 'lpm_execute_compose.bash' "${LPM_LINE_CHAR_BUILDER_LVL2}" -# ....Script command line flags.................................................................................... +# ....Script command line flags.................................................................... while [ $# -gt 0 ]; do case $1 in @@ -148,7 +148,7 @@ while [ $# -gt 0 ]; do done -# .................................................................................................................. +# ................................................................................................. # Note: LIBPOINTMATCHER_VERSION will be used to fetch the repo at release tag (ref task NMO-252) export LIBPOINTMATCHER_VERSION="${LIBPOINTMATCHER_VERSION}" export LIBPOINTMATCHER_CMAKE_BUILD_TYPE="${LIBPOINTMATCHER_CMAKE_BUILD_TYPE}" @@ -182,5 +182,5 @@ ${MSG_DIMMED_FORMAT} DEPENDENCIES_BASE_IMAGE=${DEPENDENCIES_BASE_IMAGE} ${MSG ${MSG_DIMMED_FORMAT} DEPENDENCIES_BASE_IMAGE_TAG=${DEPENDENCIES_BASE_IMAGE_TAG} ${MSG_END_FORMAT}" print_formated_script_footer 'lpm_execute_compose.bash' "${LPM_LINE_CHAR_BUILDER_LVL2}" -# ====Teardown===================================================================================================== +# ====Teardown===================================================================================== cd "${TMP_CWD}" diff --git a/build_system/lpm_execute_compose_over_build_matrix.bash b/build_system/lpm_execute_compose_over_build_matrix.bash index 3e42a147..56269849 100644 --- a/build_system/lpm_execute_compose_over_build_matrix.bash +++ b/build_system/lpm_execute_compose_over_build_matrix.bash @@ -41,21 +41,21 @@ #set -v #set -x -# ....Default...................................................................................................... +# ....Default...................................................................................... DOCKER_COMPOSE_CMD_ARGS='up --build --force-recreate' BUILD_STATUS_PASS=0 -# ....Project root logic........................................................................................... +# ....Project root logic........................................................................... TMP_CWD=$(pwd) -# ....Load environment variables from file......................................................................... +# ....Load environment variables from file......................................................... set -o allexport source .env source .env.build_matrix source .env.prompt set +o allexport -# ....Helper function.............................................................................................. +# ....Helper function.............................................................................. ## import shell functions from Libpointmatcher-build-system utilities library source ./function_library/prompt_utilities.bash source ./function_library/general_utilities.bash @@ -93,12 +93,12 @@ function print_help_in_terminal() { " } -# ====Begin======================================================================================================== +# ====Begin======================================================================================== norlab_splash "${LPM_BUILD_SYSTEM_SPLASH_NAME}" "https://github.com/${LPM_LIBPOINTMATCHER_SRC_DOMAIN}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" print_formated_script_header 'lpm_execute_compose_over_build_matrix.bash' "${LPM_LINE_CHAR_BUILDER_LVL1}" -# ....Script command line flags.................................................................................... +# ....Script command line flags.................................................................... while [ $# -gt 0 ]; do case $1 in @@ -169,7 +169,7 @@ while [ $# -gt 0 ]; do done -# .................................................................................................................. +# ................................................................................................. print_msg "Build images specified in ${MSG_DIMMED_FORMAT}'docker-compose.libpointmatcher.yaml'${MSG_END_FORMAT} following ${MSG_DIMMED_FORMAT}.env.build_matrix${MSG_END_FORMAT}" ## Freeze build matrix env variable to prevent override by lpm_execute_compose.bash when reloading .env/build_matrix @@ -236,7 +236,7 @@ for EACH_LPM_VERSION in "${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[@]}"; do --os-version "${EACH_OS_VERSION}" \ -- "${DOCKER_COMPOSE_CMD_ARGS}" - # ....Collect image tags exported by lpm_execute_compose.bash.............................................. + # ....Collect image tags exported by lpm_execute_compose.bash.............................. # Global: Read 'DOCKER_EXIT_CODE' env variable exported by function show_and_execute_docker if [[ ${DOCKER_EXIT_CODE} == 0 ]]; then MSG_STATUS="${MSG_DONE_FORMAT}Pass ${MSG_DIMMED_FORMAT}›" @@ -261,7 +261,7 @@ for EACH_LPM_VERSION in "${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[@]}"; do IMAGE_TAG_CRAWLED=("${IMAGE_TAG_CRAWLED[@]}" "${MSG_STATUS} ${LPM_IMAGE_TAG} Compile mode: ${EACH_CMAKE_BUILD_TYPE}") IMAGE_TAG_CRAWLED_TC=("${IMAGE_TAG_CRAWLED_TC[@]}" "${MSG_STATUS_TC_TAG} ${LPM_IMAGE_TAG} Compile mode: ${EACH_CMAKE_BUILD_TYPE}") fi - # ......................................................................................................... + # ......................................................................................... if [[ ${TEAMCITY_VERSION} ]]; then echo -e "##teamcity[blockClosed name='${MSG_BASE_TEAMCITY} execute lpm_execute_compose.bash']" @@ -306,13 +306,13 @@ done print_formated_script_footer 'lpm_execute_compose_over_build_matrix.bash' "${LPM_LINE_CHAR_BUILDER_LVL1}" -# ====TeamCity service message===================================================================================== +# ====TeamCity service message===================================================================== if [[ ${TEAMCITY_VERSION} ]]; then # Tag added to the TeamCity build via a service message for tc_build_tag in "${IMAGE_TAG_CRAWLED_TC[@]}" ; do echo -e "##teamcity[addBuildTag '${tc_build_tag}']" done fi -# ====Teardown===================================================================================================== +# ====Teardown===================================================================================== cd "${TMP_CWD}" exit $BUILD_STATUS_PASS diff --git a/build_system/lpm_utility_script/lpm_bashrc_config.bash b/build_system/lpm_utility_script/lpm_bashrc_config.bash index fd3c4a04..96765b91 100644 --- a/build_system/lpm_utility_script/lpm_bashrc_config.bash +++ b/build_system/lpm_utility_script/lpm_bashrc_config.bash @@ -18,7 +18,10 @@ TMP_CWD=$(pwd) if [[ "$(basename $(pwd))" != "${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" ]]; then cd .. -elif [[ "$(basename $(pwd))" == "${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" ]]; then +fi + +# ToDo: validate >> next bloc ↓↓ +if [[ "$(basename $(pwd))" == "${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" ]]; then LPM_PATH=$(pwd) else print_msg_error_and_exit "Can't find directory ${MSG_DIMMED_FORMAT}${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}${MSG_END_FORMAT}" diff --git a/build_system/ubuntu/Dockerfile.dependencies b/build_system/ubuntu/Dockerfile.dependencies index c1f59a6e..26a09eef 100644 --- a/build_system/ubuntu/Dockerfile.dependencies +++ b/build_system/ubuntu/Dockerfile.dependencies @@ -19,7 +19,7 @@ ENV TZ=Etc/UTC ENV TERM=${TERM:-"xterm-256color"} -# ....Setup timezone and localization.............................................................................. +# ....Setup timezone and localization.............................................................. # change the locale from POSIX to UTF-8 RUN apt-get update && \ apt-get install --assume-yes --no-install-recommends \ @@ -32,9 +32,9 @@ ENV LANG=en_US.UTF-8 ENV PYTHONIOENCODING=utf-8 -# ====Begin install================================================================================================= +# ====Begin install================================================================================ -# ....Install development utilities................................................................................ +# ....Install development utilities................................................................ RUN apt-get update && \ apt-get install --assume-yes --no-install-recommends \ sudo \ @@ -51,7 +51,7 @@ RUN apt-get update && \ apt-utils && \ rm -rf /var/lib/apt/lists/* -# ====Begin======================================================================================================== +# ====Begin======================================================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system" COPY ./build_system/.env.prompt . @@ -65,7 +65,7 @@ RUN chmod +x ./ubuntu/lpm_install_python_dev_tools.bash RUN source ./ubuntu/lpm_install_python_dev_tools.bash -# ====Install Libpointmatcher dependencies========================================================================== +# ====Install Libpointmatcher dependencies========================================================= FROM base-image AS libpointmatcher-dependencies WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system" @@ -80,7 +80,7 @@ WORKDIR ./ubuntu RUN chmod +x ./lpm_install_dependencies_ubuntu.bash RUN source ./lpm_install_dependencies_ubuntu.bash -# ====End========================================================================================================== +# ====End========================================================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/" RUN rm -r -f "./${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" diff --git a/build_system/ubuntu/Dockerfile.dependencies_doc b/build_system/ubuntu/Dockerfile.dependencies_doc index d717b077..7b46d047 100644 --- a/build_system/ubuntu/Dockerfile.dependencies_doc +++ b/build_system/ubuntu/Dockerfile.dependencies_doc @@ -21,14 +21,14 @@ COPY ./build_system/ubuntu/lpm_install_doc_dependencies_ubuntu.bash ./ubuntu/ COPY ./build_system/function_library/ ./function_library/ COPY ./build_system/lpm_utility_script/lpm_export_which_architecture.bash ./lpm_utility_script/ -# ====Install Libpointmatcher documentation related dependencies==================================================== +# ====Install Libpointmatcher documentation related dependencies=================================== WORKDIR ./ubuntu RUN chmod +x lpm_install_doc_dependencies_ubuntu.bash RUN source lpm_install_doc_dependencies_ubuntu.bash -# ====End========================================================================================================== +# ====End========================================================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/" RUN rm -r -f "./${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher b/build_system/ubuntu/Dockerfile.libpointmatcher index 263d74fe..f01b63ad 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher +++ b/build_system/ubuntu/Dockerfile.libpointmatcher @@ -27,14 +27,14 @@ ENV IS_TEAMCITY_RUN=${IS_TEAMCITY_RUN:-false} SHELL ["/bin/bash", "-c"] ARG DEBIAN_FRONTEND=noninteractive -# ====Build system related setup==================================================================================== +# ====Build system related setup=================================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}-CICD/" # Copy only the build system file for running the install and test scripts # Note: Logic to copy files from the checkout branch is handle by 'lpm_install_libpointmatcher_ubuntu.bash' script COPY ./build_system/ ./build_system/ -# ==== Build libpointmatcher checkout branch ====================================================================== +# ==== Build libpointmatcher checkout branch ====================================================== WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash @@ -45,7 +45,7 @@ RUN chmod +x entrypoint.bash #RUN chmod +x lpm_install_doc_dependencies_ubuntu.bash #RUN bash lpm_install_doc_dependencies_ubuntu.bash -# ====Install Libpointmatcher======================================================================================= +# ====Install Libpointmatcher====================================================================== # (CRITICAL) ToDo: validate effect on teamcity build log (source vs bash) RUN source lpm_install_libpointmatcher_ubuntu.bash \ @@ -53,12 +53,12 @@ RUN source lpm_install_libpointmatcher_ubuntu.bash \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} -# ==== Execute libpointmatcher unit-test=========================================================================== +# ==== Execute libpointmatcher unit-test=========================================================== # Conditional execution if build/utest/ directory is present RUN source entrypoint_execute_lpm_unittest.bash -# ====End========================================================================================================== +# ====End========================================================================================== FROM libpointmatcher-dependencies AS libpointmatcher-release WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}-CICD/build_system/ubuntu" diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR index 72f15968..2fcc0d23 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR @@ -29,18 +29,18 @@ ARG DEBIAN_FRONTEND=noninteractive # ToDo: validate ENV TERM=${TERM:-"xterm-256color"} -# ====Checkout libpointmatcher repository=========================================================================== +# ====Checkout libpointmatcher repository========================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" # Copy all files from the checkout branch in the repository (except those in the .dockerignore) COPY . . -# ====Check Libpointmatcher dependencies installed versions======================================================== +# ====Check Libpointmatcher dependencies installed versions======================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" RUN chmod +x ./utest/listVersionsUbuntu.sh RUN utest/listVersionsUbuntu.sh -# ==== Build libpointmatcher checkout branch ====================================================================== +# ==== Build libpointmatcher checkout branch ====================================================== WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash @@ -53,16 +53,16 @@ RUN source lpm_install_libpointmatcher_ubuntu.bash \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} -# ==== Execute libpointmatcher unit-test=========================================================================== +# ==== Execute libpointmatcher unit-test=========================================================== RUN source lpm_execute_libpointmatcher_unittest.bash -# ................................................................................................................ +# ................................................................................................. ## Alternate version #RUN chmod +x entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN chmod +x entrypoint_build_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_libpointmatcher_checkout_branch.bash -# ====End========================================================================================================== +# ====End========================================================================================== ENTRYPOINT [ "./entrypoint.bash" ] CMD [ "bash" ] diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix index 7df986c5..bdfb6567 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix @@ -28,14 +28,14 @@ ARG DEBIAN_FRONTEND=noninteractive ENV TERM=${TERM:-"xterm-256color"} -# ====Checkout libpointmatcher repository=========================================================================== +# ====Checkout libpointmatcher repository========================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}-CICD/" # Copy only the build system file for running the install and test scripts # Note: Logic to copy files from the checkout branch is handle by 'lpm_install_libpointmatcher_ubuntu.bash' script COPY ./build_system/ ./build_system/ -# ==== Build libpointmatcher checkout branch ====================================================================== +# ==== Build libpointmatcher checkout branch ====================================================== WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash @@ -49,21 +49,21 @@ RUN source lpm_install_libpointmatcher_ubuntu.bash \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} -# ==== Execute libpointmatcher unit-test=========================================================================== +# ==== Execute libpointmatcher unit-test=========================================================== RUN source lpm_execute_libpointmatcher_unittest.bash -# ====Check Libpointmatcher dependencies installed versions======================================================== +# ====Check Libpointmatcher dependencies installed versions======================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" RUN chmod +x ./utest/listVersionsUbuntu.sh RUN utest/listVersionsUbuntu.sh -# ................................................................................................................ +# ................................................................................................. ## Alternate version #RUN chmod +x entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN chmod +x entrypoint_build_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_libpointmatcher_checkout_branch.bash -# ====End========================================================================================================== +# ====End========================================================================================== ENTRYPOINT [ "./entrypoint.bash" ] CMD [ "bash" ] From ffc87d996c683bc101d2b3ffa1ee9bbe9200b16b Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Mon, 27 Nov 2023 20:31:55 -0500 Subject: [PATCH 2/9] fix: build-system side unstable compilation issue fix [NMO-402] --- .github/CODEOWNERS | 13 ++++++++++ .../docker-compose.libpointmatcher.yaml | 18 ++++++++----- .../lpm_install_dependencies_ubuntu.bash | 25 +++++++++++-------- .../lpm_install_libpointmatcher_ubuntu.bash | 23 ++++++++++------- 4 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..07f6752e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,13 @@ +# Files or directories with designated code owner. +# Branch with "Require review from Code Owners" will automaticaly trigger a request to a designated code owner + +# DevOps related +/build_system/ @RedLeader962 +/.github/ @RedLeader962 +/.dockerignore @RedLeader962 +/.gitignore @RedLeader962 + +# Core +/pointmatcher @boxanm @simonpierredeschenes @aguenette +/python @boxanm @simonpierredeschenes @aguenette +/utest @boxanm @simonpierredeschenes @aguenette diff --git a/build_system/docker-compose.libpointmatcher.yaml b/build_system/docker-compose.libpointmatcher.yaml index befe2487..5b748ece 100644 --- a/build_system/docker-compose.libpointmatcher.yaml +++ b/build_system/docker-compose.libpointmatcher.yaml @@ -1,6 +1,6 @@ services: - # ====Dependency related services=================================================================================== + # ====Dependency related services================================================================ dependencies: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-dependencies:${LPM_IMAGE_TAG:?err} build: @@ -34,7 +34,7 @@ services: tty: true stdin_open: true - # ====Pull-request related services================================================================================ + # ====Pull-request related services============================================================== ci_PR: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-ci-pr:${LPM_IMAGE_TAG:?err} pull_policy: build @@ -53,14 +53,20 @@ services: tty: true stdin_open: true init: true # Propagate exit code (See remark in task NMO-266) + depends_on: + - dependencies ci_PR_amd64: extends: ci_PR - platform: "linux/amd64" + build: + platforms: + - "linux/amd64" ci_PR_arm64v8: extends: ci_PR - platform: "linux/arm64/v8" + build: + platforms: + - "linux/arm64/v8" - # ====Build system assessment services============================================================================== + # ====Build system assessment services=========================================================== ci_SITREP_matrix: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-ci-sitrep-matrix:${LPM_IMAGE_TAG:?err} pull_policy: build @@ -86,7 +92,7 @@ services: extends: ci_SITREP_matrix platform: "linux/arm64/v8" - # ====Dockerhub release image====================================================================================== + # ====Dockerhub release image==================================================================== release: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher:${LPM_IMAGE_TAG:?err} container_name: libpointmatcher diff --git a/build_system/ubuntu/lpm_install_dependencies_ubuntu.bash b/build_system/ubuntu/lpm_install_dependencies_ubuntu.bash index b2f62d66..5264a91b 100644 --- a/build_system/ubuntu/lpm_install_dependencies_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_dependencies_ubuntu.bash @@ -7,14 +7,14 @@ # set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) -# ....Project root logic........................................................................................... +# ....Project root logic........................................................................... TMP_CWD=$(pwd) if [[ "$(basename $(pwd))" != "build_system" ]]; then cd ../ fi -# ....Load environment variables from file......................................................................... +# ....Load environment variables from file......................................................... set -o allexport source ./.env source ./.env.prompt @@ -23,7 +23,7 @@ set +o allexport # skip GUI dialog by setting everything to default export DEBIAN_FRONTEND=noninteractive -# ....Helper function.............................................................................................. +# ....Helper function.............................................................................. ## import shell functions from Libpointmatcher-build-system utilities library source ./function_library/prompt_utilities.bash source ./function_library/terminal_splash.bash @@ -32,7 +32,7 @@ source ./function_library/general_utilities.bash # Set environment variable LPM_IMAGE_ARCHITECTURE source ./lpm_utility_script/lpm_export_which_architecture.bash -# ====Begin======================================================================================================== +# ====Begin======================================================================================== SHOW_SPLASH_IDU="${SHOW_SPLASH_IDU:-true}" if [[ "${SHOW_SPLASH_IDU}" == 'true' ]]; then @@ -41,7 +41,7 @@ fi print_formated_script_header "lpm_install_dependencies_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install development utilities" sudo apt-get update && @@ -63,7 +63,7 @@ sudo apt-get update && cmake --version teamcity_service_msg_blockClosed -# ................................................................................................................ +# ................................................................................................. if [[ ${IS_TEAMCITY_RUN} == true ]]; then print_msg "The install script is run in teamCity >> the python install step was executed earlier in the Dockerfile.dependencies" @@ -72,7 +72,7 @@ else source ./ubuntu/lpm_install_python_dev_tools.bash fi -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher dependencies › Boost" # https://www.boost.org/doc/libs/1_79_0/more/getting_started/unix-variants.html @@ -82,7 +82,7 @@ sudo apt-get update && sudo rm -rf /var/lib/apt/lists/* teamcity_service_msg_blockClosed -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher dependencies › Eigen" # https://eigen.tuxfamily.org/index.php @@ -92,7 +92,7 @@ sudo apt-get update && sudo rm -rf /var/lib/apt/lists/* teamcity_service_msg_blockClosed -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher dependencies › Libnabo" # https://github.com/ethz-asl/libnabo @@ -136,6 +136,8 @@ git clone https://github.com/ethz-asl/libnabo.git && teamcity_service_msg_compilationStarted "cmake" +# (Priority) inprogress: investigate?? (ref task NMO-402 fix: unstable compilation issue) +# ToDo: Add mention about 'CMAKE_INSTALL_PREFIX' in the doc install step as a fix cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH} \ "${LPM_INSTALLED_LIBRARIES_PATH}/libnabo" && @@ -143,10 +145,11 @@ cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo \ make test && sudo make install + teamcity_service_msg_compilationFinished teamcity_service_msg_blockClosed -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher dev tools" sudo apt-get update && @@ -158,5 +161,5 @@ teamcity_service_msg_blockClosed echo " " && print_msg_done "Libpointmatcher dependencies installed" print_formated_script_footer "lpm_install_dependencies_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" -# ====Teardown===================================================================================================== +# ====Teardown===================================================================================== cd "${TMP_CWD}" diff --git a/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash b/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash index cba0cf48..52ab162d 100644 --- a/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash @@ -25,21 +25,21 @@ # set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) -# ....Default...................................................................................................... +# ....Default...................................................................................... LIBPOINTMATCHER_VERSION='head' BUILD_TESTS_FLAG=FALSE GENERATE_API_DOC_FLAG=FALSE BUILD_SYSTEM_CI_INSTALL=FALSE CMAKE_BUILD_TYPE=RelWithDebInfo -# ....Project root logic........................................................................................... +# ....Project root logic........................................................................... TMP_CWD=$(pwd) if [[ "$(basename $(pwd))" != "build_system" ]]; then cd ../ fi -# ....Load environment variables from file......................................................................... +# ....Load environment variables from file......................................................... set -o allexport source ./.env source ./.env.prompt @@ -48,7 +48,7 @@ set +o allexport ## skip GUI dialog by setting everything to default export DEBIAN_FRONTEND=noninteractive -# ....Helper function.............................................................................................. +# ....Helper function.............................................................................. ## import shell functions from Libpointmatcher-build-system utilities library source ./function_library/prompt_utilities.bash source ./function_library/terminal_splash.bash @@ -77,7 +77,7 @@ function print_help_in_terminal() { " } -# ====Begin======================================================================================================== +# ====Begin======================================================================================== SHOW_SPLASH_ILU="${SHOW_SPLASH_ILU:-true}" if [[ "${SHOW_SPLASH_ILU}" == 'true' ]]; then @@ -87,7 +87,7 @@ fi print_formated_script_header "lpm_install_libpointmatcher_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" -# ....Script command line flags.................................................................................... +# ....Script command line flags.................................................................... while [ $# -gt 0 ]; do @@ -139,7 +139,7 @@ while [ $# -gt 0 ]; do done -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher" # https://github.com/ethz-asl/libpointmatcher/tree/master @@ -178,13 +178,18 @@ teamcity_service_msg_compilationStarted "cmake" # (CRITICAL) ToDo: validate >> GENERATE_API_DOC install dir +# (Priority) inprogress: investigate?? (ref task NMO-402 fix: unstable compilation issue) cmake -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -D BUILD_TESTS=${BUILD_TESTS_FLAG} \ -D GENERATE_API_DOC=${GENERATE_API_DOC_FLAG} \ - -D LIBNABO_INSTALL_DIR="${LPM_INSTALLED_LIBRARIES_PATH}/libnabo" \ -D CMAKE_INSTALL_PREFIX="${LPM_INSTALLED_LIBRARIES_PATH}" \ "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" +# Note: +# - Previously use intall flag quick-hack to work around the install issue. +# - Keep it here as futur reference +# -D LIBNABO_INSTALL_DIR="${LPM_INSTALLED_LIBRARIES_PATH}/libnabo" \ + BUILD_EXIT_CODE=$? make -j $(nproc) @@ -234,5 +239,5 @@ else fi print_formated_script_footer "lpm_install_libpointmatcher_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" -# ====Teardown===================================================================================================== +# ====Teardown===================================================================================== cd "${TMP_CWD}" From 12c225eda6ef2e4353e33def4e9a297058739603 Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Wed, 29 Nov 2023 08:43:14 -0500 Subject: [PATCH 3/9] fix: build-system side unstable compilation issue fix [NMO-402] - added test logic for LPM compilation cases: - automatic path resolution, - prefixed path, - use lpm directly, - use lpm as a library - file formating --- .../docker-compose.libpointmatcher.yaml | 49 ++++++- build_system/ubuntu/Dockerfile.dependencies | 27 ++-- .../ubuntu/Dockerfile.libpointmatcher | 10 +- .../ubuntu/Dockerfile.libpointmatcher_ci_PR | 12 +- ...ockerfile.libpointmatcher_ci_SITREP_matrix | 12 +- ...ockerfile.libpointmatcher_test_compilation | 120 +++++++++++++++++ ..._install_dependencies_general_ubuntu.bash} | 65 +-------- ...m_install_dependencies_libnabo_ubuntu.bash | 124 ++++++++++++++++++ .../lpm_install_doc_dependencies_ubuntu.bash | 12 +- .../lpm_install_libpointmatcher_ubuntu.bash | 22 +++- 10 files changed, 352 insertions(+), 101 deletions(-) create mode 100644 build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation rename build_system/ubuntu/{lpm_install_dependencies_ubuntu.bash => lpm_install_dependencies_general_ubuntu.bash} (58%) create mode 100644 build_system/ubuntu/lpm_install_dependencies_libnabo_ubuntu.bash diff --git a/build_system/docker-compose.libpointmatcher.yaml b/build_system/docker-compose.libpointmatcher.yaml index 5b748ece..02c3f1ef 100644 --- a/build_system/docker-compose.libpointmatcher.yaml +++ b/build_system/docker-compose.libpointmatcher.yaml @@ -1,9 +1,10 @@ services: # ====Dependency related services================================================================ - dependencies: - image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-dependencies:${LPM_IMAGE_TAG:?err} + dependencies-general: + image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-dependencies-general:${LPM_IMAGE_TAG:?err} build: + target: libpointmatcher-dependencies-general context: .. dockerfile: ./build_system/ubuntu/Dockerfile.dependencies platforms: @@ -18,6 +19,13 @@ services: tty: true stdin_open: true init: true # Propagate exit code (See remark in task NMO-266) + + dependencies: + extends: dependencies-general + image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-dependencies:${LPM_IMAGE_TAG:?err} + build: + target: libpointmatcher-dependencies-libnabo + dependencies-doc: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-dependencies-doc:${LPM_IMAGE_TAG:?err} build: @@ -35,6 +43,43 @@ services: stdin_open: true # ====Pull-request related services============================================================== + _test_compilation: + image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-compilation-test:${LPM_IMAGE_TAG:?err} + pull_policy: build + build: + context: .. + dockerfile: './build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation' + target: test-compilation-auto-path-resolution + ## Mute 'platforms' while using arch virtualization with C++ build to prevent segmentation fault during lpm cmake install +# platforms: +# - "linux/amd64" +# - "linux/arm64/v8" + args: + PROJECT_HUB: ${LPM_PROJECT_DOCKERHUB} + BASE_IMAGE: libpointmatcher-dependencies-general + BASE_IMAGE_TAG: ${LPM_IMAGE_TAG} + IS_TEAMCITY_RUN: ${IS_TEAMCITY_RUN} + LIBPOINTMATCHER_VERSION: 'head' + LIBPOINTMATCHER_CMAKE_BUILD_TYPE: ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE:?err} + LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG: '--build-system-CI-install' + tty: true + stdin_open: true + init: true # Propagate exit code (See remark in task NMO-266) + depends_on: + - dependencies-general + test_compilation_prefixed_path: + extends: _test_compilation + build: + target: test-compilation-prefixed-path + depends_on: + - _test_compilation + test_compilation_auto_path_resolution: + extends: _test_compilation + build: + target: test-compilation-auto-path-resolution + depends_on: + - _test_compilation + ci_PR: image: ${LPM_PROJECT_DOCKERHUB:?err}/libpointmatcher-ci-pr:${LPM_IMAGE_TAG:?err} pull_policy: build diff --git a/build_system/ubuntu/Dockerfile.dependencies b/build_system/ubuntu/Dockerfile.dependencies index c1f59a6e..9a14b271 100644 --- a/build_system/ubuntu/Dockerfile.dependencies +++ b/build_system/ubuntu/Dockerfile.dependencies @@ -19,7 +19,7 @@ ENV TZ=Etc/UTC ENV TERM=${TERM:-"xterm-256color"} -# ....Setup timezone and localization.............................................................................. +# ....Setup timezone and localization.............................................................. # change the locale from POSIX to UTF-8 RUN apt-get update && \ apt-get install --assume-yes --no-install-recommends \ @@ -32,9 +32,9 @@ ENV LANG=en_US.UTF-8 ENV PYTHONIOENCODING=utf-8 -# ====Begin install================================================================================================= +# ====Begin install================================================================================= -# ....Install development utilities................................................................................ +# ....Install development utilities................................................................ RUN apt-get update && \ apt-get install --assume-yes --no-install-recommends \ sudo \ @@ -51,7 +51,7 @@ RUN apt-get update && \ apt-utils && \ rm -rf /var/lib/apt/lists/* -# ====Begin======================================================================================================== +# ====Begin======================================================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system" COPY ./build_system/.env.prompt . @@ -65,24 +65,29 @@ RUN chmod +x ./ubuntu/lpm_install_python_dev_tools.bash RUN source ./ubuntu/lpm_install_python_dev_tools.bash -# ====Install Libpointmatcher dependencies========================================================================== -FROM base-image AS libpointmatcher-dependencies +# ====Install Libpointmatcher dependencies========================================================= +FROM base-image AS libpointmatcher-dependencies-general WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system" -COPY ./build_system/ubuntu/lpm_install_dependencies_ubuntu.bash ./ubuntu/ +COPY ./build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash ./ubuntu/ +COPY ./build_system/ubuntu/lpm_install_dependencies_libnabo_ubuntu.bash ./ubuntu/ COPY ./build_system/ubuntu/lpm_install_python_dev_tools.bash ./ubuntu/ COPY ./build_system/function_library/ ./function_library/ COPY ./build_system/lpm_utility_script/lpm_export_which_architecture.bash ./lpm_utility_script/ WORKDIR ./ubuntu +RUN chmod +x ./lpm_install_dependencies_general_ubuntu.bash +RUN source ./lpm_install_dependencies_general_ubuntu.bash -RUN chmod +x ./lpm_install_dependencies_ubuntu.bash -RUN source ./lpm_install_dependencies_ubuntu.bash +FROM libpointmatcher-dependencies-general AS libpointmatcher-dependencies-libnabo -# ====End========================================================================================================== +RUN chmod +x ./lpm_install_dependencies_libnabo_ubuntu.bash +RUN source ./lpm_install_dependencies_libnabo_ubuntu.bash + +# ====End========================================================================================== +#FROM libpointmatcher-dependencies-libnabo AS final WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/" RUN rm -r -f "./${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" -FROM libpointmatcher-dependencies AS final CMD [ "bash" ] diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher b/build_system/ubuntu/Dockerfile.libpointmatcher index 263d74fe..f01b63ad 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher +++ b/build_system/ubuntu/Dockerfile.libpointmatcher @@ -27,14 +27,14 @@ ENV IS_TEAMCITY_RUN=${IS_TEAMCITY_RUN:-false} SHELL ["/bin/bash", "-c"] ARG DEBIAN_FRONTEND=noninteractive -# ====Build system related setup==================================================================================== +# ====Build system related setup=================================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}-CICD/" # Copy only the build system file for running the install and test scripts # Note: Logic to copy files from the checkout branch is handle by 'lpm_install_libpointmatcher_ubuntu.bash' script COPY ./build_system/ ./build_system/ -# ==== Build libpointmatcher checkout branch ====================================================================== +# ==== Build libpointmatcher checkout branch ====================================================== WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash @@ -45,7 +45,7 @@ RUN chmod +x entrypoint.bash #RUN chmod +x lpm_install_doc_dependencies_ubuntu.bash #RUN bash lpm_install_doc_dependencies_ubuntu.bash -# ====Install Libpointmatcher======================================================================================= +# ====Install Libpointmatcher====================================================================== # (CRITICAL) ToDo: validate effect on teamcity build log (source vs bash) RUN source lpm_install_libpointmatcher_ubuntu.bash \ @@ -53,12 +53,12 @@ RUN source lpm_install_libpointmatcher_ubuntu.bash \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} -# ==== Execute libpointmatcher unit-test=========================================================================== +# ==== Execute libpointmatcher unit-test=========================================================== # Conditional execution if build/utest/ directory is present RUN source entrypoint_execute_lpm_unittest.bash -# ====End========================================================================================================== +# ====End========================================================================================== FROM libpointmatcher-dependencies AS libpointmatcher-release WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}-CICD/build_system/ubuntu" diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR index 72f15968..2fcc0d23 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR @@ -29,18 +29,18 @@ ARG DEBIAN_FRONTEND=noninteractive # ToDo: validate ENV TERM=${TERM:-"xterm-256color"} -# ====Checkout libpointmatcher repository=========================================================================== +# ====Checkout libpointmatcher repository========================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" # Copy all files from the checkout branch in the repository (except those in the .dockerignore) COPY . . -# ====Check Libpointmatcher dependencies installed versions======================================================== +# ====Check Libpointmatcher dependencies installed versions======================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" RUN chmod +x ./utest/listVersionsUbuntu.sh RUN utest/listVersionsUbuntu.sh -# ==== Build libpointmatcher checkout branch ====================================================================== +# ==== Build libpointmatcher checkout branch ====================================================== WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash @@ -53,16 +53,16 @@ RUN source lpm_install_libpointmatcher_ubuntu.bash \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} -# ==== Execute libpointmatcher unit-test=========================================================================== +# ==== Execute libpointmatcher unit-test=========================================================== RUN source lpm_execute_libpointmatcher_unittest.bash -# ................................................................................................................ +# ................................................................................................. ## Alternate version #RUN chmod +x entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN chmod +x entrypoint_build_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_libpointmatcher_checkout_branch.bash -# ====End========================================================================================================== +# ====End========================================================================================== ENTRYPOINT [ "./entrypoint.bash" ] CMD [ "bash" ] diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix index 7df986c5..bdfb6567 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix @@ -28,14 +28,14 @@ ARG DEBIAN_FRONTEND=noninteractive ENV TERM=${TERM:-"xterm-256color"} -# ====Checkout libpointmatcher repository=========================================================================== +# ====Checkout libpointmatcher repository========================================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}-CICD/" # Copy only the build system file for running the install and test scripts # Note: Logic to copy files from the checkout branch is handle by 'lpm_install_libpointmatcher_ubuntu.bash' script COPY ./build_system/ ./build_system/ -# ==== Build libpointmatcher checkout branch ====================================================================== +# ==== Build libpointmatcher checkout branch ====================================================== WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash @@ -49,21 +49,21 @@ RUN source lpm_install_libpointmatcher_ubuntu.bash \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} -# ==== Execute libpointmatcher unit-test=========================================================================== +# ==== Execute libpointmatcher unit-test=========================================================== RUN source lpm_execute_libpointmatcher_unittest.bash -# ====Check Libpointmatcher dependencies installed versions======================================================== +# ====Check Libpointmatcher dependencies installed versions======================================== WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" RUN chmod +x ./utest/listVersionsUbuntu.sh RUN utest/listVersionsUbuntu.sh -# ................................................................................................................ +# ................................................................................................. ## Alternate version #RUN chmod +x entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN chmod +x entrypoint_build_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_and_test_libpointmatcher_checkout_branch.bash #RUN source entrypoint_build_libpointmatcher_checkout_branch.bash -# ====End========================================================================================================== +# ====End========================================================================================== ENTRYPOINT [ "./entrypoint.bash" ] CMD [ "bash" ] diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation b/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation new file mode 100644 index 00000000..4f2b5afd --- /dev/null +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation @@ -0,0 +1,120 @@ +ARG PROJECT_HUB=norlabulaval +ARG BASE_IMAGE=libpointmatcher-dependencies-general +ARG BASE_IMAGE_TAG +FROM ${PROJECT_HUB}/${BASE_IMAGE}:${BASE_IMAGE_TAG:?err} AS libpointmatcher-dependencies-general + +LABEL org.opencontainers.image.authors="luc.coupal.1@ulaval.ca" + +ARG LIBPOINTMATCHER_VERSION='head' +ENV LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION} +LABEL libpointmatcher.version="${LIBPOINTMATCHER_VERSION}" + +ARG LPM_INSTALLED_LIBRARIES_PATH +ARG LPM_LIBPOINTMATCHER_SRC_REPO_NAME +ENV LPM_INSTALLED_LIBRARIES_PATH=${LPM_INSTALLED_LIBRARIES_PATH:?'Build argument needs to be set and non-empty.'} +ENV LPM_LIBPOINTMATCHER_SRC_REPO_NAME=${LPM_LIBPOINTMATCHER_SRC_REPO_NAME:?'Build argument needs to be set and non-empty.'} + +ARG LIBPOINTMATCHER_CMAKE_BUILD_TYPE=RelWithDebInfo +ARG LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG='--build-system-CI-install' +# Note: Those env variable are used in the entrypoint build version +ENV LIBPOINTMATCHER_CMAKE_BUILD_TYPE=${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} +ENV LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG=${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} + +ARG IS_TEAMCITY_RUN +ENV IS_TEAMCITY_RUN=${IS_TEAMCITY_RUN:-false} + +SHELL ["/bin/bash", "-c"] +ARG DEBIAN_FRONTEND=noninteractive + +# ToDo: validate +ENV TERM=${TERM:-"xterm-256color"} + +# ====Checkout libpointmatcher repository========================================================== +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" + +# Copy all files from the checkout branch in the repository (except those in the .dockerignore) +COPY . . + +#WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system/ubuntu" + +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" +RUN chmod +x ./utest/listVersionsUbuntu.sh + +WORKDIR ./build_system/ubuntu +RUN chmod +x lpm_install_dependencies_libnabo_ubuntu.bash +RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash +RUN chmod +x lpm_execute_libpointmatcher_unittest.bash +RUN chmod +x entrypoint.bash + +# ====Test compilation with automatic path resolution============================================== +FROM libpointmatcher-dependencies-general AS test-compilation-auto-path-resolution +ENV OVERRIDE_LIBNABO_CMAKE_INSTALL_PREFIX=() +ENV OVERRIDE_LPM_CMAKE_INSTALL_PREFIX=() + +RUN echo && echo ">> nproc=$(nproc)" && echo # ToDo: on task end >> delete this line + +# ....Install libnabo.............................................................................. +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system/ubuntu" +RUN source ./lpm_install_dependencies_libnabo_ubuntu.bash + +# ....Check Libpointmatcher dependencies installed versions........................................ +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" +RUN utest/listVersionsUbuntu.sh + +# .... Build libpointmatcher checkout branch ...................................................... +WORKDIR ./build_system/ubuntu +RUN source lpm_install_libpointmatcher_ubuntu.bash \ + --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ + ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} + +# .... Compile package dependent on libpointmatcher ............................................... +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}" +RUN git clone https://github.com/norlab-ulaval/norlab_icp_mapper.git \ + && mkdir -p norlab_icp_mapper/build && cd norlab_icp_mapper/build \ + && cmake -DCMAKE_BUILD_TYPE=Release .. \ + && make -j $(nproc) \ + && make install + +ENTRYPOINT [ "./entrypoint.bash" ] +CMD [ "bash" ] + +# ====Test compilation with explicit path resolution=============================================== +FROM libpointmatcher-dependencies-general AS test-compilation-prefixed-path +ENV OVERRIDE_LIBNABO_CMAKE_INSTALL_PREFIX=("-D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH:?err}") +ENV OVERRIDE_LPM_CMAKE_INSTALL_PREFIX=("-D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH:?err}") + +RUN echo && echo ">> nproc=$(nproc)" && echo # ToDo: on task end >> delete this line + +# ....Install libnabo.............................................................................. +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}/build_system/ubuntu" +RUN source ./lpm_install_dependencies_libnabo_ubuntu.bash + +# ....Check Libpointmatcher dependencies installed versions........................................ +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" +RUN utest/listVersionsUbuntu.sh + +# .... Build libpointmatcher checkout branch ...................................................... +WORKDIR ./build_system/ubuntu +RUN source lpm_install_libpointmatcher_ubuntu.bash \ + --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ + ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} + +# .... Compile package dependent on libpointmatcher ............................................... +WORKDIR "${LPM_INSTALLED_LIBRARIES_PATH}" +RUN git clone https://github.com/norlab-ulaval/norlab_icp_mapper.git \ + && mkdir -p norlab_icp_mapper/build && cd norlab_icp_mapper/build \ + && cmake -DCMAKE_BUILD_TYPE=Release .. \ + && make -j $(nproc) \ + && make install + +ENTRYPOINT [ "./entrypoint.bash" ] +CMD [ "bash" ] + +# ................................................................................................. +## Alternate version +#RUN chmod +x entrypoint_build_and_test_libpointmatcher_checkout_branch.bash +#RUN chmod +x entrypoint_build_libpointmatcher_checkout_branch.bash +#RUN source entrypoint_build_and_test_libpointmatcher_checkout_branch.bash +#RUN source entrypoint_build_libpointmatcher_checkout_branch.bash diff --git a/build_system/ubuntu/lpm_install_dependencies_ubuntu.bash b/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash similarity index 58% rename from build_system/ubuntu/lpm_install_dependencies_ubuntu.bash rename to build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash index 5264a91b..a66a6bdb 100644 --- a/build_system/ubuntu/lpm_install_dependencies_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash @@ -3,7 +3,7 @@ # Libpointmatcher dependencies installer # # Usage: -# $ bash lpm_install_dependencies_ubuntu.bash +# $ source lpm_install_dependencies_general_ubuntu.bash # set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) @@ -39,7 +39,7 @@ if [[ "${SHOW_SPLASH_IDU}" == 'true' ]]; then norlab_splash "${LPM_SPLASH_NAME}" "https://github.com/${LPM_LIBPOINTMATCHER_SRC_DOMAIN}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" fi -print_formated_script_header "lpm_install_dependencies_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" +print_formated_script_header "lpm_install_dependencies_general_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" # ................................................................................................. teamcity_service_msg_blockOpened "Install development utilities" @@ -91,63 +91,6 @@ sudo apt-get update && libeigen3-dev && sudo rm -rf /var/lib/apt/lists/* -teamcity_service_msg_blockClosed -# ................................................................................................. -teamcity_service_msg_blockOpened "Install Libpointmatcher dependencies › Libnabo" -# https://github.com/ethz-asl/libnabo - -print_msg "Create required dir structure" -mkdir -p "${LPM_INSTALLED_LIBRARIES_PATH}" - -## Note: -# - ANN is not mentioned in doc because it's only required for `make test` benchmarks -# - Leave it commented in code for future references -## ANN is a library written in C++, which supports data structures and algorithms for both exact and approximate nearest neighbor searching in arbitrarily high dimensions. -## https://www.cs.umd.edu/~mount/ANN/ -#cd "${LPM_INSTALLED_LIBRARIES_PATH}" -#wget https://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.tar.gz -#tar xzf ann_1.1.2.tar.gz -#cd ann_1.1.2/ -#make linux-g++ -#sudo cp lib/libANN.a /usr/local/lib/ -#sudo cp include/ANN/ANN.h /usr/local/include/ -## shellcheck disable=SC2103 -#cd .. -# -# -## Note: -# - FLANN is not mentioned in doc because it's only required for `make test` benchmarks -# - Leave it commented in code for future references -## Fast Library for Approximate Nearest Neighbors - development -## FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. -## https://github.com/flann-lib/flann -#sudo apt-get update \ -# && sudo apt-get install --assume-yes \ -# libflann-dev \ -# && sudo rm -rf /var/lib/apt/lists/* - -cd "${LPM_INSTALLED_LIBRARIES_PATH}" -git clone https://github.com/ethz-asl/libnabo.git && - cd libnabo && - mkdir build && cd build - -# git checkout 1.0.7 - - -teamcity_service_msg_compilationStarted "cmake" - -# (Priority) inprogress: investigate?? (ref task NMO-402 fix: unstable compilation issue) -# ToDo: Add mention about 'CMAKE_INSTALL_PREFIX' in the doc install step as a fix -cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo \ - -D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH} \ - "${LPM_INSTALLED_LIBRARIES_PATH}/libnabo" && - make -j $(nproc) && - make test && - sudo make install - - -teamcity_service_msg_compilationFinished - teamcity_service_msg_blockClosed # ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher dev tools" @@ -159,7 +102,7 @@ sudo apt-get update && teamcity_service_msg_blockClosed -echo " " && print_msg_done "Libpointmatcher dependencies installed" -print_formated_script_footer "lpm_install_dependencies_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" +#echo " " && print_msg_done "Libpointmatcher general dependencies installed" +print_formated_script_footer "lpm_install_dependencies_general_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" # ====Teardown===================================================================================== cd "${TMP_CWD}" diff --git a/build_system/ubuntu/lpm_install_dependencies_libnabo_ubuntu.bash b/build_system/ubuntu/lpm_install_dependencies_libnabo_ubuntu.bash new file mode 100644 index 00000000..06eafd76 --- /dev/null +++ b/build_system/ubuntu/lpm_install_dependencies_libnabo_ubuntu.bash @@ -0,0 +1,124 @@ +#!/bin/bash -i +# +# Libpointmatcher dependencies installer +# +# Usage: +# $ source lpm_install_dependencies_libnabo_ubuntu.bash +# +# $ export OVERRIDE_LIBNABO_CMAKE_INSTALL_PREFIX=( "-D CMAKE_INSTALL_PREFIX=/opt" ) && source lpm_install_dependencies_libnabo_ubuntu.bash +# +# Global: +# - Read "OVERRIDE_LIBNABO_CMAKE_INSTALL_PREFIX" +# +set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) + +# ....Project root logic........................................................................... +TMP_CWD=$(pwd) + +if [[ "$(basename $(pwd))" != "build_system" ]]; then + cd ../ +fi + +# ....Load environment variables from file......................................................... +set -o allexport +source ./.env +source ./.env.prompt +set +o allexport + +# skip GUI dialog by setting everything to default +export DEBIAN_FRONTEND=noninteractive + +# ....Helper function.............................................................................. +## import shell functions from Libpointmatcher-build-system utilities library +source ./function_library/prompt_utilities.bash +source ./function_library/terminal_splash.bash +source ./function_library/general_utilities.bash + +# Set environment variable LPM_IMAGE_ARCHITECTURE +source ./lpm_utility_script/lpm_export_which_architecture.bash + +# ....Override..................................................................................... +declare -ar DEFAULT_LIBNABO_CMAKE_INSTALL_PREFIX=( "-D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH:?err}" ) +declare -a OVERRIDE_LIBNABO_CMAKE_INSTALL_PREFIX +declare -ar LIBNABO_CMAKE_INSTALL_PREFIX=( "${OVERRIDE_LIBNABO_CMAKE_INSTALL_PREFIX[@]:-${DEFAULT_LIBNABO_CMAKE_INSTALL_PREFIX[@]}}" ) + + +# ====Begin======================================================================================== +SHOW_SPLASH_IDU="${SHOW_SPLASH_IDU:-true}" + +if [[ "${SHOW_SPLASH_IDU}" == 'true' ]]; then + norlab_splash "${LPM_SPLASH_NAME}" "https://github.com/${LPM_LIBPOINTMATCHER_SRC_DOMAIN}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" +fi + +print_formated_script_header "lpm_install_dependencies_libnabo_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" + +# ................................................................................................. +teamcity_service_msg_blockOpened "Install Libpointmatcher dependencies › Libnabo" +# https://github.com/ethz-asl/libnabo + +print_msg "Create required dir structure" +mkdir -p "${LPM_INSTALLED_LIBRARIES_PATH}" + +## Note: +# - ANN is not mentioned in doc because it's only required for `make test` benchmarks +# - Leave it commented in code for future references +## ANN is a library written in C++, which supports data structures and algorithms for both exact and approximate nearest neighbor searching in arbitrarily high dimensions. +## https://www.cs.umd.edu/~mount/ANN/ +#cd "${LPM_INSTALLED_LIBRARIES_PATH}" +#wget https://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.tar.gz +#tar xzf ann_1.1.2.tar.gz +#cd ann_1.1.2/ +#make linux-g++ +#sudo cp lib/libANN.a /usr/local/lib/ +#sudo cp include/ANN/ANN.h /usr/local/include/ +## shellcheck disable=SC2103 +#cd .. +# +# +## Note: +# - FLANN is not mentioned in doc because it's only required for `make test` benchmarks +# - Leave it commented in code for future references +## Fast Library for Approximate Nearest Neighbors - development +## FLANN is a library for performing fast approximate nearest neighbor searches in high dimensional spaces. +## https://github.com/flann-lib/flann +#sudo apt-get update \ +# && sudo apt-get install --assume-yes \ +# libflann-dev \ +# && sudo rm -rf /var/lib/apt/lists/* + +cd "${LPM_INSTALLED_LIBRARIES_PATH}" +git clone https://github.com/ethz-asl/libnabo.git && + cd libnabo && + mkdir build && cd build + +# git checkout 1.0.7 + + +teamcity_service_msg_compilationStarted "cmake" + +## (Priority) inprogress: investigate?? (ref task NMO-402 fix: unstable compilation issue) +## ToDo: Add mention about 'CMAKE_INSTALL_PREFIX' in the doc install step as a fix +#cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo \ +# -D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH} \ +# "${LPM_INSTALLED_LIBRARIES_PATH}/libnabo" && +# make -j $(nproc) && +# make test && +# sudo make install + + +cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo ${LIBNABO_CMAKE_INSTALL_PREFIX[@]} \ + "${LPM_INSTALLED_LIBRARIES_PATH}/libnabo" && + make -j $(nproc) && + sudo make install + +# (NICE TO HAVE) ToDo: refactor (ref task NMO-428 refactor: drop libnabo `make test` step after libnabo-build-system deployment) +# make test && + +teamcity_service_msg_compilationFinished + +teamcity_service_msg_blockClosed + +echo " " && print_msg_done "Libpointmatcher dependencies installed" +print_formated_script_footer "lpm_install_dependencies_libnabo_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" +# ====Teardown===================================================================================== +cd "${TMP_CWD}" diff --git a/build_system/ubuntu/lpm_install_doc_dependencies_ubuntu.bash b/build_system/ubuntu/lpm_install_doc_dependencies_ubuntu.bash index 663dbede..fd4dc3a0 100644 --- a/build_system/ubuntu/lpm_install_doc_dependencies_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_doc_dependencies_ubuntu.bash @@ -7,7 +7,7 @@ # set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) -# ....Project root logic........................................................................................... +# ....Project root logic........................................................................... TMP_CWD=$(pwd) if [[ "$(basename $(pwd))" != "build_system" ]]; then @@ -15,7 +15,7 @@ if [[ "$(basename $(pwd))" != "build_system" ]]; then fi -# ....Load environment variables from file......................................................................... +# ....Load environment variables from file......................................................... set -o allexport source ./.env source ./.env.prompt @@ -24,7 +24,7 @@ set +o allexport ## skip GUI dialog by setting everything to default export DEBIAN_FRONTEND=noninteractive -# ....Helper function.............................................................................................. +# ....Helper function.............................................................................. ## import shell functions from Libpointmatcher-build-system utilities library source ./function_library/prompt_utilities.bash source ./function_library/terminal_splash.bash @@ -33,7 +33,7 @@ source ./function_library/general_utilities.bash ## Set environment variable 'LPM_IMAGE_ARCHITECTURE' source ./lpm_utility_script/lpm_export_which_architecture.bash -# ====Begin======================================================================================================== +# ====Begin======================================================================================== SHOW_SPLASH_IDDU="${SHOW_SPLASH_IDDU:-true}" if [[ "${SHOW_SPLASH_IDDU}" == 'true' ]]; then @@ -43,7 +43,7 @@ fi print_formated_script_header "lpm_install_doc_dependencies_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" -# ................................................................................................................ +# ................................................................................................. teamcity_service_msg_blockOpened "Install libpointmatcher documentation related dependencies" ## Package required when GENERATE_API_DOC flag is set to true @@ -58,6 +58,6 @@ teamcity_service_msg_blockClosed echo " " && print_msg_done "Libpointmatcher documentation related dependencies installed" print_formated_script_footer "lpm_install_doc_dependencies_ubuntu.bash (${LPM_IMAGE_ARCHITECTURE})" "${LPM_LINE_CHAR_INSTALLER}" -# ====Teardown===================================================================================================== +# ====Teardown===================================================================================== cd "${TMP_CWD}" diff --git a/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash b/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash index 52ab162d..9ad031b9 100644 --- a/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash @@ -19,9 +19,15 @@ # (default to RelWithDebInfo) # [-h, --help] Get help # +# Global +# - Read OVERRIDE_LPM_CMAKE_INSTALL_PREFIX +# Usage: +# export OVERRIDE_LPM_CMAKE_INSTALL_PREFIX=( "-D CMAKE_INSTALL_PREFIX=/opt" ) \ +# && source lpm_install_libpointmatcher_ubuntu.bash +# # Note: # - this script required package: g++, make, cmake, build-essential, git and all libpointmatcher dependencies -# - execute `lpm_install_dependencies_ubuntu.bash` first +# - execute `lpm_install_dependencies_general_ubuntu.bash` first # set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) @@ -32,6 +38,7 @@ GENERATE_API_DOC_FLAG=FALSE BUILD_SYSTEM_CI_INSTALL=FALSE CMAKE_BUILD_TYPE=RelWithDebInfo + # ....Project root logic........................................................................... TMP_CWD=$(pwd) @@ -139,6 +146,13 @@ while [ $# -gt 0 ]; do done + +# ....Override..................................................................................... +declare -ar DEFAULT_CMAKE_INSTALL_PREFIX=( "-D CMAKE_INSTALL_PREFIX=${LPM_INSTALLED_LIBRARIES_PATH:?err}" ) +declare -a OVERRIDE_LPM_CMAKE_INSTALL_PREFIX +declare -a LPM_CMAKE_INSTALL_PREFIX=( "${OVERRIDE_LPM_CMAKE_INSTALL_PREFIX[@]:-${DEFAULT_CMAKE_INSTALL_PREFIX[@]}}" ) + + # ................................................................................................. teamcity_service_msg_blockOpened "Install Libpointmatcher" # https://github.com/ethz-asl/libpointmatcher/tree/master @@ -176,15 +190,15 @@ mkdir -p build && cd build teamcity_service_msg_compilationStarted "cmake" # (CRITICAL) ToDo: validate >> GENERATE_API_DOC install dir - - # (Priority) inprogress: investigate?? (ref task NMO-402 fix: unstable compilation issue) cmake -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -D BUILD_TESTS=${BUILD_TESTS_FLAG} \ -D GENERATE_API_DOC=${GENERATE_API_DOC_FLAG} \ - -D CMAKE_INSTALL_PREFIX="${LPM_INSTALLED_LIBRARIES_PATH}" \ + "${LPM_CMAKE_INSTALL_PREFIX[@]}" \ "${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}" +# -D CMAKE_INSTALL_PREFIX="${LPM_INSTALLED_LIBRARIES_PATH}" \ + # Note: # - Previously use intall flag quick-hack to work around the install issue. # - Keep it here as futur reference From e427c07c81e05774798a20c19115e657d52b9abf Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Wed, 29 Nov 2023 12:45:59 -0500 Subject: [PATCH 4/9] fix: build-system side unstable compilation issue fix [NMO-402] - refactor environment variable prefix to match norlab-build-system lib - change the name for the call to repository version master branch current version from "head" to "latest" --- build_system/.env | 5 +- build_system/.env.build_matrix | 22 ++-- .../docker-compose.libpointmatcher.yaml | 8 +- build_system/lpm_execute_compose.bash | 30 +++--- ...lpm_execute_compose_over_build_matrix.bash | 102 +++++++++--------- .../ubuntu/Dockerfile.libpointmatcher | 8 +- .../ubuntu/Dockerfile.libpointmatcher_ci_PR | 8 +- ...ockerfile.libpointmatcher_ci_SITREP_matrix | 8 +- ...ockerfile.libpointmatcher_test_compilation | 10 +- ..._test_libpointmatcher_checkout_branch.bash | 2 +- ...build_libpointmatcher_checkout_branch.bash | 2 +- .../lpm_install_libpointmatcher_ubuntu.bash | 16 +-- 12 files changed, 109 insertions(+), 112 deletions(-) diff --git a/build_system/.env b/build_system/.env index d30c0d3a..30a73b0f 100644 --- a/build_system/.env +++ b/build_system/.env @@ -11,11 +11,8 @@ LPM_PROJECT_DOCKERHUB=norlabulaval # - Original repo: https://github.com/ethz-asl/libpointmatcher # - DEV repo: https://github.com/norlab-ulaval/libpointmatcher-build-system -# ToDo: on repository ownership transfer >> modify next bloc ↓↓ -LPM_LIBPOINTMATCHER_SRC_DOMAIN=ethz-asl -#LPM_LIBPOINTMATCHER_SRC_DOMAIN=norlab-ulaval +LPM_LIBPOINTMATCHER_SRC_DOMAIN=norlab-ulaval -#LPM_LIBPOINTMATCHER_SRC_REPO_NAME=libpointmatcher-build-system # Temporary dev fork LPM_LIBPOINTMATCHER_SRC_REPO_NAME=libpointmatcher # diff --git a/build_system/.env.build_matrix b/build_system/.env.build_matrix index b75eba85..3dedd5f4 100644 --- a/build_system/.env.build_matrix +++ b/build_system/.env.build_matrix @@ -5,25 +5,25 @@ # # Libpointmatcher version # -# 'head' is the latest push to the libpointmatcher master branch -#LPM_MATRIX_LIBPOINTMATCHER_VERSIONS=( 'v1.3.1' 'head' 'v2.0.test' ) -LPM_MATRIX_LIBPOINTMATCHER_VERSIONS=( 'head' ) +# 'latest' is the latest push to the libpointmatcher master branch +#NBS_MATRIX_REPOSITORY_VERSIONS=( 'v1.3.1' 'latest' 'v2.0.test' ) +NBS_MATRIX_REPOSITORY_VERSIONS=( 'latest' ) # # Libpointmatcher CMAKE_BUILD_TYPE # # Part of the build matrix used for assessing the state of the codebase # Note: 'None' for building dependencies images -LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE_SITREP=( 'Debug' 'Release' 'RelWithDebInfo' 'MinSizeRel' ) +NBS_MATRIX_CMAKE_BUILD_TYPE_SITREP=( 'Debug' 'Release' 'RelWithDebInfo' 'MinSizeRel' ) # Part of the build matrix used for PR -LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=( 'Release' 'RelWithDebInfo' 'MinSizeRel' ) +NBS_MATRIX_CMAKE_BUILD_TYPE=( 'Release' 'RelWithDebInfo' 'MinSizeRel' ) # # LIBPOINTMATCHER supported OS # # (Priority) ToDo: implement OsX support for arm64-Darwin (ref task NMO-213) -#LPM_MATRIX_SUPPORTED_OS=( 'ubuntu' 'osx' ) -LPM_MATRIX_SUPPORTED_OS=( 'ubuntu' ) +#NBS_MATRIX_SUPPORTED_OS=( 'ubuntu' 'osx' ) +NBS_MATRIX_SUPPORTED_OS=( 'ubuntu' ) # # ubuntu supported versions @@ -31,13 +31,13 @@ LPM_MATRIX_SUPPORTED_OS=( 'ubuntu' ) # Ubuntu release: https://ubuntu.com/about/release-cycle # bionic=18.04 focal=20.04 jammy=22.04 # Part of the build matrix used for PR -LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP=( 'bionic' 'focal' 'jammy' ) +NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP=( 'bionic' 'focal' 'jammy' ) # Part of the build matrix used for assessing the state of the codebase # ToDo: fixme!! (ref task NMO-305 ﹅→ Build fail: ubuntu jammy with utest compilation). # Mute 'jammy' from the build matrix until then. -LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=( 'bionic' 'focal' ) +NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=( 'bionic' 'focal' ) # # iceboxed: implement other OS support (ref task NMO-213 OsX arm64-Darwin and NMO-210 OsX x86 CD components) -#LPM_MATRIX_OSX_SUPPORTED_VERSIONS=( 'monterey' 'ventura' ) -LPM_MATRIX_OSX_SUPPORTED_VERSIONS=( ) +#NBS_MATRIX_OSX_SUPPORTED_VERSIONS=( 'monterey' 'ventura' ) +NBS_MATRIX_OSX_SUPPORTED_VERSIONS=( ) diff --git a/build_system/docker-compose.libpointmatcher.yaml b/build_system/docker-compose.libpointmatcher.yaml index 02c3f1ef..05b0fcb7 100644 --- a/build_system/docker-compose.libpointmatcher.yaml +++ b/build_system/docker-compose.libpointmatcher.yaml @@ -59,7 +59,7 @@ services: BASE_IMAGE: libpointmatcher-dependencies-general BASE_IMAGE_TAG: ${LPM_IMAGE_TAG} IS_TEAMCITY_RUN: ${IS_TEAMCITY_RUN} - LIBPOINTMATCHER_VERSION: 'head' + REPOSITORY_VERSION: 'latest' LIBPOINTMATCHER_CMAKE_BUILD_TYPE: ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE:?err} LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG: '--build-system-CI-install' tty: true @@ -92,7 +92,7 @@ services: BASE_IMAGE: libpointmatcher-dependencies BASE_IMAGE_TAG: ${LPM_IMAGE_TAG} IS_TEAMCITY_RUN: ${IS_TEAMCITY_RUN} - LIBPOINTMATCHER_VERSION: 'head' + REPOSITORY_VERSION: 'latest' LIBPOINTMATCHER_CMAKE_BUILD_TYPE: ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE:?err} LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG: '--build-system-CI-install --compile-test' tty: true @@ -124,7 +124,7 @@ services: BASE_IMAGE: libpointmatcher-dependencies BASE_IMAGE_TAG: ${LPM_IMAGE_TAG} IS_TEAMCITY_RUN: ${IS_TEAMCITY_RUN} - LIBPOINTMATCHER_VERSION: ${LIBPOINTMATCHER_VERSION:?err} + REPOSITORY_VERSION: ${REPOSITORY_VERSION:?err} LIBPOINTMATCHER_CMAKE_BUILD_TYPE: ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE:?err} LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG: '--compile-test' tty: true @@ -153,7 +153,7 @@ services: BASE_IMAGE: libpointmatcher-dependencies-doc BASE_IMAGE_TAG: ${LPM_IMAGE_TAG} IS_TEAMCITY_RUN: ${IS_TEAMCITY_RUN} - LIBPOINTMATCHER_VERSION: ${LIBPOINTMATCHER_VERSION:?err} + REPOSITORY_VERSION: ${REPOSITORY_VERSION:?err} LIBPOINTMATCHER_CMAKE_BUILD_TYPE: 'Release' LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG: '--compile-test --generate-doc' tty: true diff --git a/build_system/lpm_execute_compose.bash b/build_system/lpm_execute_compose.bash index 7d33a27a..59c03ac9 100644 --- a/build_system/lpm_execute_compose.bash +++ b/build_system/lpm_execute_compose.bash @@ -8,8 +8,8 @@ # $ bash lpm_execute_compose.bash -- run --rm ci # # Arguments: -# [--libpointmatcher-version v1.3.1] The libpointmatcher release tag (default: see LIBPOINTMATCHER_VERSION) -# [--libpointmatcher-cmake-build-type RelWithDebInfo] +# [--repository-version v1.3.1] The libpointmatcher release tag (default: see REPOSITORY_VERSION) +# [--cmake-build-type RelWithDebInfo] # Change the libpointmatcher compilation mode. # Either 'None' 'Debug' 'Release' 'RelWithDebInfo' or 'MinSizeRel' # [--os-name ubuntu] The operating system name. Either 'ubuntu' or 'osx' (default: see OS_NAME) @@ -29,7 +29,7 @@ # # ....Default...................................................................................................... -LIBPOINTMATCHER_VERSION='head' +REPOSITORY_VERSION='latest' LIBPOINTMATCHER_CMAKE_BUILD_TYPE='RelWithDebInfo' OS_NAME='ubuntu' OS_VERSION='focal' @@ -58,8 +58,8 @@ function print_help_in_terminal() { \033[1m :\033[0m -h, --help Get help - --libpointmatcher-version v1.3.1 The libpointmatcher release tag (default to master branch head) - --libpointmatcher-cmake-build-type RelWithDebInfo + --repository-version v1.3.1 The libpointmatcher release tag (default to master branch latest) + --cmake-build-type RelWithDebInfo Change the libpointmatcher compilation mode. Either 'None' 'Debug' 'Release' 'RelWithDebInfo' or 'MinSizeRel' --os-name ubuntu The operating system name. Either 'ubuntu' or 'osx' (default to 'ubuntu') @@ -97,14 +97,14 @@ print_formated_script_header 'lpm_execute_compose.bash' "${LPM_LINE_CHAR_BUILDER while [ $# -gt 0 ]; do case $1 in - --libpointmatcher-version) - LIBPOINTMATCHER_VERSION="${2}" - shift # Remove argument (--libpointmatcher-version) + --repository-version) + REPOSITORY_VERSION="${2}" + shift # Remove argument (--repository-version) shift # Remove argument value ;; - --libpointmatcher-cmake-build-type) + --cmake-build-type) LIBPOINTMATCHER_CMAKE_BUILD_TYPE="${2}" - shift # Remove argument (--libpointmatcher-cmake-build-type) + shift # Remove argument (--cmake-build-type) shift # Remove argument value ;; --os-name) @@ -149,16 +149,16 @@ while [ $# -gt 0 ]; do done # .................................................................................................................. -# Note: LIBPOINTMATCHER_VERSION will be used to fetch the repo at release tag (ref task NMO-252) -export LIBPOINTMATCHER_VERSION="${LIBPOINTMATCHER_VERSION}" +# Note: REPOSITORY_VERSION will be used to fetch the repo at release tag (ref task NMO-252) +export REPOSITORY_VERSION="${REPOSITORY_VERSION}" export LIBPOINTMATCHER_CMAKE_BUILD_TYPE="${LIBPOINTMATCHER_CMAKE_BUILD_TYPE}" export DEPENDENCIES_BASE_IMAGE="${OS_NAME}" export DEPENDENCIES_BASE_IMAGE_TAG="${OS_VERSION}" -export LPM_IMAGE_TAG="${LIBPOINTMATCHER_VERSION}-${DEPENDENCIES_BASE_IMAGE}-${DEPENDENCIES_BASE_IMAGE_TAG}" +export LPM_IMAGE_TAG="${REPOSITORY_VERSION}-${DEPENDENCIES_BASE_IMAGE}-${DEPENDENCIES_BASE_IMAGE_TAG}" print_msg "Environment variables set for compose:\n -${MSG_DIMMED_FORMAT} LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION} ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} REPOSITORY_VERSION=${REPOSITORY_VERSION} ${MSG_END_FORMAT} ${MSG_DIMMED_FORMAT} LIBPOINTMATCHER_CMAKE_BUILD_TYPE=${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} ${MSG_END_FORMAT} ${MSG_DIMMED_FORMAT} DEPENDENCIES_BASE_IMAGE=${DEPENDENCIES_BASE_IMAGE} ${MSG_END_FORMAT} ${MSG_DIMMED_FORMAT} DEPENDENCIES_BASE_IMAGE_TAG=${DEPENDENCIES_BASE_IMAGE_TAG} ${MSG_END_FORMAT} @@ -176,7 +176,7 @@ show_and_execute_docker "compose -f docker-compose.libpointmatcher.yaml ${DOCKER print_msg "Environment variables used by compose:\n -${MSG_DIMMED_FORMAT} LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION} ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} REPOSITORY_VERSION=${REPOSITORY_VERSION} ${MSG_END_FORMAT} ${MSG_DIMMED_FORMAT} LIBPOINTMATCHER_CMAKE_BUILD_TYPE=${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} ${MSG_END_FORMAT} ${MSG_DIMMED_FORMAT} DEPENDENCIES_BASE_IMAGE=${DEPENDENCIES_BASE_IMAGE} ${MSG_END_FORMAT} ${MSG_DIMMED_FORMAT} DEPENDENCIES_BASE_IMAGE_TAG=${DEPENDENCIES_BASE_IMAGE_TAG} ${MSG_END_FORMAT}" diff --git a/build_system/lpm_execute_compose_over_build_matrix.bash b/build_system/lpm_execute_compose_over_build_matrix.bash index 3e42a147..ee61aca2 100644 --- a/build_system/lpm_execute_compose_over_build_matrix.bash +++ b/build_system/lpm_execute_compose_over_build_matrix.bash @@ -8,10 +8,10 @@ # $ bash lpm_execute_compose_over_build_matrix.bash -- up --build --force-recreate # # Arguments: -# [--libpointmatcher-version-build-matrix-override head] +# [--repository-version-build-matrix-override latest] # The libpointmatcher release tag. Override must be a single value # (default to array sequence specified in .env.build_matrix) -# [--libpointmatcher-cmake-build-type-build-matrix-override RelWithDebInfo] +# [--cmake-build-type-build-matrix-override RelWithDebInfo] # Change the libpointmatcher compilation mode. # Either 'None' 'Debug' 'Release' 'RelWithDebInfo' or 'MinSizeRel' # (default to array sequence specified in .env.build_matrix) @@ -29,8 +29,8 @@ # pass them in the docker-compose.yaml if you experience problem. # [--docker-debug-logs] Set Docker builder log output for debug (i.e.BUILDKIT_PROGRESS=plain) # [--fail-fast] Exit script at first encountered error -# [--ci-sitrep-run] Override LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE and -# LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS with there respective _SITREP version +# [--ci-sitrep-run] Override NBS_MATRIX_CMAKE_BUILD_TYPE and +# NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS with there respective _SITREP version # [-h, --help] Get help # # Note: @@ -67,10 +67,10 @@ function print_help_in_terminal() { \033[1m :\033[0m -h, --help Get help - --libpointmatcher-version-build-matrix-override head + --repository-version-build-matrix-override latest The libpointmatcher release tag. Override must be a single value (default to array sequence specified in .env.build_matrix) - --libpointmatcher-cmake-build-type-build-matrix-override RelWithDebInfo + --cmake-build-type-build-matrix-override RelWithDebInfo Change the libpointmatcher compilation mode. Either 'None' 'Debug' 'Release' 'RelWithDebInfo' or 'MinSizeRel' (default to array sequence specified in .env.build_matrix) @@ -84,8 +84,8 @@ function print_help_in_terminal() { --docker-debug-logs Set Docker builder log output for debug (i.e.BUILDKIT_PROGRESS=plain) --fail-fast Exit script at first encountered error - --ci-sitrep-run Override LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE and - LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS with there respective _SITREP version + --ci-sitrep-run Override NBS_MATRIX_CMAKE_BUILD_TYPE and + NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS with there respective _SITREP version \033[1m [-- ]\033[0m Any argument passed after '--' will be passed to docker compose as docker @@ -102,33 +102,33 @@ print_formated_script_header 'lpm_execute_compose_over_build_matrix.bash' "${LPM while [ $# -gt 0 ]; do case $1 in - --libpointmatcher-version-build-matrix-override) - unset LPM_MATRIX_LIBPOINTMATCHER_VERSIONS - LPM_MATRIX_LIBPOINTMATCHER_VERSIONS=("$2") - shift # Remove argument (--libpointmatcher-version-build-matrix-override) + --repository-version-build-matrix-override) + unset NBS_MATRIX_REPOSITORY_VERSIONS + NBS_MATRIX_REPOSITORY_VERSIONS=("$2") + shift # Remove argument (--repository-version-build-matrix-override) shift # Remove argument value ;; - --libpointmatcher-cmake-build-type-build-matrix-override) - unset LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE - LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=("$2") - shift # Remove argument (--libpointmatcher-cmake-build-type-build-matrix-override) + --cmake-build-type-build-matrix-override) + unset NBS_MATRIX_CMAKE_BUILD_TYPE + NBS_MATRIX_CMAKE_BUILD_TYPE=("$2") + shift # Remove argument (--cmake-build-type-build-matrix-override) shift # Remove argument value ;; --os-name-build-matrix-override) - unset LPM_MATRIX_SUPPORTED_OS - LPM_MATRIX_SUPPORTED_OS=("$2") + unset NBS_MATRIX_SUPPORTED_OS + NBS_MATRIX_SUPPORTED_OS=("$2") shift # Remove argument (--os-name-build-matrix-override) shift # Remove argument value ;; --ubuntu-version-build-matrix-override) - unset LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS - LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=("$2") + unset NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS + NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=("$2") shift # Remove argument (--ubuntu-version-build-matrix-override) shift # Remove argument value ;; --osx-version-build-matrix-override) - unset LPM_MATRIX_OSX_SUPPORTED_VERSIONS - LPM_MATRIX_OSX_SUPPORTED_VERSIONS=("$2") + unset NBS_MATRIX_OSX_SUPPORTED_VERSIONS + NBS_MATRIX_OSX_SUPPORTED_VERSIONS=("$2") shift # Remove argument (--osx-version-build-matrix-override) shift # Remove argument value ;; @@ -144,13 +144,13 @@ while [ $# -gt 0 ]; do ;; --ci-sitrep-run) shift # Remove argument (--ci-sitrep-run) - unset LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE - unset LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS - LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=("${LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE_SITREP[@]}") - LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=("${LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP[@]}") + unset NBS_MATRIX_CMAKE_BUILD_TYPE + unset NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS + NBS_MATRIX_CMAKE_BUILD_TYPE=("${NBS_MATRIX_CMAKE_BUILD_TYPE_SITREP[@]}") + NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=("${NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP[@]}") print_msg "${MSG_DIMMED_FORMAT}ci-sitrep${MSG_END_FORMAT} run environment variable override: - - ${MSG_DIMMED_FORMAT}LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=(${LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE_SITREP[*]})${MSG_END_FORMAT} - - ${MSG_DIMMED_FORMAT}LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=(${LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP[*]})${MSG_END_FORMAT}" + - ${MSG_DIMMED_FORMAT}NBS_MATRIX_CMAKE_BUILD_TYPE=(${NBS_MATRIX_CMAKE_BUILD_TYPE_SITREP[*]})${MSG_END_FORMAT} + - ${MSG_DIMMED_FORMAT}NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=(${NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP[*]})${MSG_END_FORMAT}" ;; -h | --help) print_help_in_terminal @@ -173,34 +173,34 @@ done print_msg "Build images specified in ${MSG_DIMMED_FORMAT}'docker-compose.libpointmatcher.yaml'${MSG_END_FORMAT} following ${MSG_DIMMED_FORMAT}.env.build_matrix${MSG_END_FORMAT}" ## Freeze build matrix env variable to prevent override by lpm_execute_compose.bash when reloading .env/build_matrix -FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS=("${LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[@]}") -FREEZED_LPM_MATRIX_SUPPORTED_OS=("${LPM_MATRIX_SUPPORTED_OS[@]}") -FREEZED_LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=("${LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS[@]}") -FREEZED_LPM_MATRIX_OSX_SUPPORTED_VERSIONS=("${LPM_MATRIX_OSX_SUPPORTED_VERSIONS[@]}") -FREEZED_LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=("${LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE[@]}") +FREEZED_NBS_MATRIX_REPOSITORY_VERSIONS=("${NBS_MATRIX_REPOSITORY_VERSIONS[@]}") +FREEZED_NBS_MATRIX_SUPPORTED_OS=("${NBS_MATRIX_SUPPORTED_OS[@]}") +FREEZED_NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=("${NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS[@]}") +FREEZED_NBS_MATRIX_OSX_SUPPORTED_VERSIONS=("${NBS_MATRIX_OSX_SUPPORTED_VERSIONS[@]}") +FREEZED_NBS_MATRIX_CMAKE_BUILD_TYPE=("${NBS_MATRIX_CMAKE_BUILD_TYPE[@]}") print_msg "Environment variables ${MSG_EMPH_FORMAT}(build matrix)${MSG_END_FORMAT} set for compose:\n -${MSG_DIMMED_FORMAT} LPM_MATRIX_LIBPOINTMATCHER_VERSIONS=(${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=(${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_SUPPORTED_OS=(${FREEZED_LPM_MATRIX_SUPPORTED_OS[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=(${FREEZED_LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_OSX_SUPPORTED_VERSIONS=(${FREEZED_LPM_MATRIX_OSX_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_REPOSITORY_VERSIONS=(${FREEZED_NBS_MATRIX_REPOSITORY_VERSIONS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_CMAKE_BUILD_TYPE=(${FREEZED_NBS_MATRIX_CMAKE_BUILD_TYPE[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_SUPPORTED_OS=(${FREEZED_NBS_MATRIX_SUPPORTED_OS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=(${FREEZED_NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_OSX_SUPPORTED_VERSIONS=(${FREEZED_NBS_MATRIX_OSX_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} " # Note: EACH_LPM_VERSION is used for container labeling and to fetch the repo at release tag -for EACH_LPM_VERSION in "${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[@]}"; do +for EACH_LPM_VERSION in "${FREEZED_NBS_MATRIX_REPOSITORY_VERSIONS[@]}"; do if [[ ${TEAMCITY_VERSION} ]]; then echo -e "##teamcity[blockOpened name='${MSG_BASE_TEAMCITY} ${EACH_LPM_VERSION}']" fi - for EACH_OS_NAME in "${FREEZED_LPM_MATRIX_SUPPORTED_OS[@]}"; do + for EACH_OS_NAME in "${FREEZED_NBS_MATRIX_SUPPORTED_OS[@]}"; do unset CRAWL_OS_VERSIONS if [[ ${EACH_OS_NAME} == 'ubuntu' ]]; then - CRAWL_OS_VERSIONS=("${FREEZED_LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS[@]}") + CRAWL_OS_VERSIONS=("${FREEZED_NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS[@]}") elif [[ ${EACH_OS_NAME} == 'osx' ]]; then - CRAWL_OS_VERSIONS=("${FREEZED_LPM_MATRIX_OSX_SUPPORTED_VERSIONS[@]}") + CRAWL_OS_VERSIONS=("${FREEZED_NBS_MATRIX_OSX_SUPPORTED_VERSIONS[@]}") else print_msg_error_and_exit "${EACH_OS_NAME} not supported!" fi @@ -220,18 +220,18 @@ for EACH_LPM_VERSION in "${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[@]}"; do echo -e "##teamcity[blockOpened name='${MSG_BASE_TEAMCITY} ${EACH_OS_VERSION}']" fi - for EACH_CMAKE_BUILD_TYPE in "${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE[@]}"; do + for EACH_CMAKE_BUILD_TYPE in "${FREEZED_NBS_MATRIX_CMAKE_BUILD_TYPE[@]}"; do # shellcheck disable=SC2034 SHOW_SPLASH_EC='false' if [[ ${TEAMCITY_VERSION} ]]; then - echo -e "##teamcity[blockOpened name='${MSG_BASE_TEAMCITY} execute lpm_execute_compose.bash' description='${MSG_DIMMED_FORMAT_TEAMCITY} --libpointmatcher-version ${EACH_LPM_VERSION} --libpointmatcher-cmake-build-type ${EACH_CMAKE_BUILD_TYPE} --os-name ${EACH_OS_NAME} --os-version ${EACH_OS_VERSION} -- ${DOCKER_COMPOSE_CMD_ARGS}${MSG_END_FORMAT_TEAMCITY}|n']" + echo -e "##teamcity[blockOpened name='${MSG_BASE_TEAMCITY} execute lpm_execute_compose.bash' description='${MSG_DIMMED_FORMAT_TEAMCITY} --repository-version ${EACH_LPM_VERSION} --cmake-build-type ${EACH_CMAKE_BUILD_TYPE} --os-name ${EACH_OS_NAME} --os-version ${EACH_OS_VERSION} -- ${DOCKER_COMPOSE_CMD_ARGS}${MSG_END_FORMAT_TEAMCITY}|n']" echo " " fi - source ./lpm_execute_compose.bash --libpointmatcher-version "${EACH_LPM_VERSION}" \ - --libpointmatcher-cmake-build-type "${EACH_CMAKE_BUILD_TYPE}" \ + source ./lpm_execute_compose.bash --repository-version "${EACH_LPM_VERSION}" \ + --cmake-build-type "${EACH_CMAKE_BUILD_TYPE}" \ --os-name "${EACH_OS_NAME}" \ --os-version "${EACH_OS_VERSION}" \ -- "${DOCKER_COMPOSE_CMD_ARGS}" @@ -287,11 +287,11 @@ done echo " " print_msg "Environment variables ${MSG_EMPH_FORMAT}(build matrix)${MSG_END_FORMAT} used by compose:\n -${MSG_DIMMED_FORMAT} LPM_MATRIX_LIBPOINTMATCHER_VERSIONS=(${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_VERSIONS[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE=(${FREEZED_LPM_MATRIX_LIBPOINTMATCHER_CMAKE_BUILD_TYPE[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_SUPPORTED_OS=(${FREEZED_LPM_MATRIX_SUPPORTED_OS[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS=(${FREEZED_LPM_MATRIX_UBUNTU_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} -${MSG_DIMMED_FORMAT} LPM_MATRIX_OSX_SUPPORTED_VERSIONS=(${FREEZED_LPM_MATRIX_OSX_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_REPOSITORY_VERSIONS=(${FREEZED_NBS_MATRIX_REPOSITORY_VERSIONS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_CMAKE_BUILD_TYPE=(${FREEZED_NBS_MATRIX_CMAKE_BUILD_TYPE[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_SUPPORTED_OS=(${FREEZED_NBS_MATRIX_SUPPORTED_OS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=(${FREEZED_NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} +${MSG_DIMMED_FORMAT} NBS_MATRIX_OSX_SUPPORTED_VERSIONS=(${FREEZED_NBS_MATRIX_OSX_SUPPORTED_VERSIONS[*]}) ${MSG_END_FORMAT} " print_msg_done "FINAL › Build matrix completed with command diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher b/build_system/ubuntu/Dockerfile.libpointmatcher index f01b63ad..73970743 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher +++ b/build_system/ubuntu/Dockerfile.libpointmatcher @@ -5,9 +5,9 @@ FROM ${PROJECT_HUB}/${BASE_IMAGE}:${BASE_IMAGE_TAG:?err} AS libpointmatcher-depe LABEL org.opencontainers.image.authors="luc.coupal.1@ulaval.ca" -ARG LIBPOINTMATCHER_VERSION -ENV LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION:?'Build argument needs to be set and non-empty.'} -LABEL libpointmatcher.version="${LIBPOINTMATCHER_VERSION}" +ARG REPOSITORY_VERSION +ENV REPOSITORY_VERSION=${REPOSITORY_VERSION:?'Build argument needs to be set and non-empty.'} +LABEL libpointmatcher.version="${REPOSITORY_VERSION}" ARG LPM_INSTALLED_LIBRARIES_PATH @@ -49,7 +49,7 @@ RUN chmod +x entrypoint.bash # (CRITICAL) ToDo: validate effect on teamcity build log (source vs bash) RUN source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --repository-version ${REPOSITORY_VERSION} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR index 2fcc0d23..711337f8 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_PR @@ -5,9 +5,9 @@ FROM ${PROJECT_HUB}/${BASE_IMAGE}:${BASE_IMAGE_TAG:?err} AS libpointmatcher-depe LABEL org.opencontainers.image.authors="luc.coupal.1@ulaval.ca" -ARG LIBPOINTMATCHER_VERSION='head' -ENV LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION} -LABEL libpointmatcher.version="${LIBPOINTMATCHER_VERSION}" +ARG REPOSITORY_VERSION='latest' +ENV REPOSITORY_VERSION=${REPOSITORY_VERSION} +LABEL libpointmatcher.version="${REPOSITORY_VERSION}" ARG LPM_INSTALLED_LIBRARIES_PATH ARG LPM_LIBPOINTMATCHER_SRC_REPO_NAME @@ -49,7 +49,7 @@ RUN chmod +x entrypoint.bash RUN source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --repository-version ${REPOSITORY_VERSION} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix index bdfb6567..fe364103 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_ci_SITREP_matrix @@ -5,9 +5,9 @@ FROM ${PROJECT_HUB}/${BASE_IMAGE}:${BASE_IMAGE_TAG:?err} AS libpointmatcher-depe LABEL org.opencontainers.image.authors="luc.coupal.1@ulaval.ca" -ARG LIBPOINTMATCHER_VERSION='head' -ENV LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION} -LABEL libpointmatcher.version="${LIBPOINTMATCHER_VERSION}" +ARG REPOSITORY_VERSION='latest' +ENV REPOSITORY_VERSION=${REPOSITORY_VERSION} +LABEL libpointmatcher.version="${REPOSITORY_VERSION}" ARG LPM_INSTALLED_LIBRARIES_PATH ARG LPM_LIBPOINTMATCHER_SRC_REPO_NAME @@ -45,7 +45,7 @@ RUN chmod +x entrypoint.bash # Note: Logic for cd into ${LPM_INSTALLED_LIBRARIES_PATH}/${LPM_LIBPOINTMATCHER_SRC_REPO_NAME} is the responsablitiy of lpm_install_libpointmatcher_ubuntu.bash RUN source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --repository-version ${REPOSITORY_VERSION} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation b/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation index 4f2b5afd..451173f0 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation +++ b/build_system/ubuntu/Dockerfile.libpointmatcher_test_compilation @@ -5,9 +5,9 @@ FROM ${PROJECT_HUB}/${BASE_IMAGE}:${BASE_IMAGE_TAG:?err} AS libpointmatcher-depe LABEL org.opencontainers.image.authors="luc.coupal.1@ulaval.ca" -ARG LIBPOINTMATCHER_VERSION='head' -ENV LIBPOINTMATCHER_VERSION=${LIBPOINTMATCHER_VERSION} -LABEL libpointmatcher.version="${LIBPOINTMATCHER_VERSION}" +ARG REPOSITORY_VERSION='latest' +ENV REPOSITORY_VERSION=${REPOSITORY_VERSION} +LABEL libpointmatcher.version="${REPOSITORY_VERSION}" ARG LPM_INSTALLED_LIBRARIES_PATH ARG LPM_LIBPOINTMATCHER_SRC_REPO_NAME @@ -64,7 +64,7 @@ RUN utest/listVersionsUbuntu.sh # .... Build libpointmatcher checkout branch ...................................................... WORKDIR ./build_system/ubuntu RUN source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --repository-version ${REPOSITORY_VERSION} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} @@ -97,7 +97,7 @@ RUN utest/listVersionsUbuntu.sh # .... Build libpointmatcher checkout branch ...................................................... WORKDIR ./build_system/ubuntu RUN source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION} \ + --repository-version ${REPOSITORY_VERSION} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} diff --git a/build_system/ubuntu/entrypoint_build_and_test_libpointmatcher_checkout_branch.bash b/build_system/ubuntu/entrypoint_build_and_test_libpointmatcher_checkout_branch.bash index 7636b1c7..7fcd3d93 100644 --- a/build_system/ubuntu/entrypoint_build_and_test_libpointmatcher_checkout_branch.bash +++ b/build_system/ubuntu/entrypoint_build_and_test_libpointmatcher_checkout_branch.bash @@ -16,7 +16,7 @@ set +o allexport # ==== Build libpointmatcher checkout branch ====================================================================== source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION:?'err variable not set'} \ + --repository-version ${REPOSITORY_VERSION:?'err variable not set'} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} diff --git a/build_system/ubuntu/entrypoint_build_libpointmatcher_checkout_branch.bash b/build_system/ubuntu/entrypoint_build_libpointmatcher_checkout_branch.bash index c10a49ce..087397ac 100644 --- a/build_system/ubuntu/entrypoint_build_libpointmatcher_checkout_branch.bash +++ b/build_system/ubuntu/entrypoint_build_libpointmatcher_checkout_branch.bash @@ -16,7 +16,7 @@ set +o allexport # ==== Build libpointmatcher checkout branch ====================================================================== source lpm_install_libpointmatcher_ubuntu.bash \ - --libpointmatcher-version ${LIBPOINTMATCHER_VERSION:?'err variable not set'} \ + --repository-version ${REPOSITORY_VERSION:?'err variable not set'} \ --cmake-build-type ${LIBPOINTMATCHER_CMAKE_BUILD_TYPE} \ ${LIBPOINTMATCHER_INSTALL_SCRIPT_FLAG} diff --git a/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash b/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash index 9ad031b9..d2d14b1d 100644 --- a/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_libpointmatcher_ubuntu.bash @@ -8,7 +8,7 @@ # Arguments: # [--install-path ] The directory where to install libpointmatcher (absolute path) # (default location defined in the .env) -# [--libpointmatcher-version v1.3.1] Install libpointmatcher release tag version (default to master branch head) +# [--repository-version v1.3.1] Install libpointmatcher release tag version (default to master branch latest) # [--compile-test] Compile the libpointmatcher unit-test # [--generate-doc] Generate the libpointmatcher doxygen documentation # in /usr/local/share/doc/libpointmatcher/api/html/index.html @@ -32,7 +32,7 @@ set -e # Note: we want the installer to always fail-fast (it wont affect the build system policy) # ....Default...................................................................................... -LIBPOINTMATCHER_VERSION='head' +REPOSITORY_VERSION='latest' BUILD_TESTS_FLAG=FALSE GENERATE_API_DOC_FLAG=FALSE BUILD_SYSTEM_CI_INSTALL=FALSE @@ -70,7 +70,7 @@ function print_help_in_terminal() { \033[1m:\033[0m --install-path The directory where to install libpointmatcher (absolute path) (default location ${MSG_DIMMED_FORMAT}${LPM_INSTALLED_LIBRARIES_PATH:?'err LPM_INSTALLED_LIBRARIES_PATH env variable was not fetched from the .env'}${MSG_END_FORMAT}) - --libpointmatcher-version v1.3.1 Install libpointmatcher release tag version (default to master branch head) + --repository-version v1.3.1 Install libpointmatcher release tag version (default to master branch latest) --compile-test Compile the libpointmatcher unit-test in ${MSG_DIMMED_FORMAT}${LPM_INSTALLED_LIBRARIES_PATH}/libpointmatcher/build${MSG_END_FORMAT} --generate-doc Generate the libpointmatcher doxygen documentation @@ -105,9 +105,9 @@ while [ $# -gt 0 ]; do shift # Remove argument (--install-path) shift # Remove argument value ;; - --libpointmatcher-version) - LIBPOINTMATCHER_VERSION="${2}" - shift # Remove argument (--libpointmatcher-version) + --repository-version) + REPOSITORY_VERSION="${2}" + shift # Remove argument (--repository-version) shift # Remove argument value ;; --cmake-build-type) @@ -170,14 +170,14 @@ if [[ ${BUILD_SYSTEM_CI_INSTALL} == FALSE ]]; then git clone https://github.com/"${LPM_LIBPOINTMATCHER_SRC_DOMAIN}"/"${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}".git - if [[ "${LIBPOINTMATCHER_VERSION}" != 'head' ]]; then + if [[ "${REPOSITORY_VERSION}" != 'latest' ]]; then cd "${LPM_LIBPOINTMATCHER_SRC_REPO_NAME}"/ git fetch --tags git tag --list # Remove prefix 'v' from version tag - GITHUB_TAG="${LIBPOINTMATCHER_VERSION/v/}" + GITHUB_TAG="${REPOSITORY_VERSION/v/}" print_msg "GITHUB_TAG=${GITHUB_TAG}" git checkout tags/"${GITHUB_TAG}" From be05d5d7f13a243fba0bb2fe8351fba89e8fe07a Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Wed, 29 Nov 2023 15:46:19 -0500 Subject: [PATCH 5/9] fix: build-system side unstable compilation issue fix [NMO-402] - added development idea run configuration --- ...ompose._ \342\200\272 --help menu.run.xml" | 19 +++++++++++++++++++ ...r build & run IamBuildSystemTester.run.xml | 17 +++++++++++++++++ ...d_matrix.bash \342\200\272 config.run.xml" | 19 +++++++++++++++++++ ....bash \342\200\272 config --quiet.run.xml" | 19 +++++++++++++++++++ ...bash \342\200\272 build --dry-run.run.xml" | 19 +++++++++++++++++++ ...\200\272 build _service_ _popup_.run.xml" | 19 +++++++++++++++++++ ...ies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" | 19 +++++++++++++++++++ ...ependencies (BUILD MATRIX SUBSET).run.xml" | 19 +++++++++++++++++++ ...uild test_compilation__ (Release).run.xml" | 19 +++++++++++++++++++ ...efixed_path (BUILD MATRIX SUBSET).run.xml" | 19 +++++++++++++++++++ ...s-general dependencies (AS IN TC).run.xml" | 19 +++++++++++++++++++ ...wd tree + docker system disk usage.run.xml | 17 +++++++++++++++++ .../.jetbrains_run_config/interactive.run.xml | 17 +++++++++++++++++ .../list docker images + container.run.xml | 17 +++++++++++++++++ ...lpm_execute_compose.bash -- build.run.xml" | 17 +++++++++++++++++ ...sh \342\200\272 test flag (popup).run.xml" | 17 +++++++++++++++++ ...sh \342\200\272 test flag (popup).run.xml" | 17 +++++++++++++++++ ...00\272 test flag override (popup).run.xml" | 17 +++++++++++++++++ ...rminal in a Ubuntu 20.04 container.run.xml | 17 +++++++++++++++++ 19 files changed, 343 insertions(+) create mode 100644 "build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" create mode 100644 build_system/.jetbrains_run_config/(command version) docker build & run IamBuildSystemTester.run.xml create mode 100644 "build_system/.jetbrains_run_config/(investigate compose var substitution) lpm_execute_compose_over_build_matrix.bash \342\200\272 config.run.xml" create mode 100644 "build_system/.jetbrains_run_config/(test compose file) lpm_execute_compose_over_build_matrix.bash \342\200\272 config --quiet.run.xml" create mode 100644 "build_system/.jetbrains_run_config/(test) lpm_execute_compose_over_build_matrix.bash \342\200\272 build --dry-run.run.xml" create mode 100644 "build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build _service_ _popup_.run.xml" create mode 100644 "build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" create mode 100644 "build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies-general dependencies (BUILD MATRIX SUBSET).run.xml" create mode 100644 "build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation__ (Release).run.xml" create mode 100644 "build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation_prefixed_path (BUILD MATRIX SUBSET).run.xml" create mode 100644 "build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" create mode 100644 build_system/.jetbrains_run_config/cwd tree + docker system disk usage.run.xml create mode 100644 build_system/.jetbrains_run_config/interactive.run.xml create mode 100644 build_system/.jetbrains_run_config/list docker images + container.run.xml create mode 100644 "build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash -- build.run.xml" create mode 100644 "build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash \342\200\272 test flag (popup).run.xml" create mode 100644 "build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag (popup).run.xml" create mode 100644 "build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag override (popup).run.xml" create mode 100644 build_system/.jetbrains_run_config/run and open a terminal in a Ubuntu 20.04 container.run.xml diff --git "a/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" "b/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" new file mode 100644 index 00000000..1c701be1 --- /dev/null +++ "b/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/build_system/.jetbrains_run_config/(command version) docker build & run IamBuildSystemTester.run.xml b/build_system/.jetbrains_run_config/(command version) docker build & run IamBuildSystemTester.run.xml new file mode 100644 index 00000000..af7f549a --- /dev/null +++ b/build_system/.jetbrains_run_config/(command version) docker build & run IamBuildSystemTester.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/(investigate compose var substitution) lpm_execute_compose_over_build_matrix.bash \342\200\272 config.run.xml" "b/build_system/.jetbrains_run_config/(investigate compose var substitution) lpm_execute_compose_over_build_matrix.bash \342\200\272 config.run.xml" new file mode 100644 index 00000000..089d6982 --- /dev/null +++ "b/build_system/.jetbrains_run_config/(investigate compose var substitution) lpm_execute_compose_over_build_matrix.bash \342\200\272 config.run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/(test compose file) lpm_execute_compose_over_build_matrix.bash \342\200\272 config --quiet.run.xml" "b/build_system/.jetbrains_run_config/(test compose file) lpm_execute_compose_over_build_matrix.bash \342\200\272 config --quiet.run.xml" new file mode 100644 index 00000000..0b696d1e --- /dev/null +++ "b/build_system/.jetbrains_run_config/(test compose file) lpm_execute_compose_over_build_matrix.bash \342\200\272 config --quiet.run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/(test) lpm_execute_compose_over_build_matrix.bash \342\200\272 build --dry-run.run.xml" "b/build_system/.jetbrains_run_config/(test) lpm_execute_compose_over_build_matrix.bash \342\200\272 build --dry-run.run.xml" new file mode 100644 index 00000000..523970b9 --- /dev/null +++ "b/build_system/.jetbrains_run_config/(test) lpm_execute_compose_over_build_matrix.bash \342\200\272 build --dry-run.run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build _service_ _popup_.run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build _service_ _popup_.run.xml" new file mode 100644 index 00000000..54a9e30b --- /dev/null +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build _service_ _popup_.run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" new file mode 100644 index 00000000..8ee973a8 --- /dev/null +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies-general dependencies (BUILD MATRIX SUBSET).run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies-general dependencies (BUILD MATRIX SUBSET).run.xml" new file mode 100644 index 00000000..823d98b4 --- /dev/null +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build dependencies-general dependencies (BUILD MATRIX SUBSET).run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation__ (Release).run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation__ (Release).run.xml" new file mode 100644 index 00000000..a134c5df --- /dev/null +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation__ (Release).run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation_prefixed_path (BUILD MATRIX SUBSET).run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation_prefixed_path (BUILD MATRIX SUBSET).run.xml" new file mode 100644 index 00000000..19fb1cd5 --- /dev/null +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build test_compilation_prefixed_path (BUILD MATRIX SUBSET).run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" new file mode 100644 index 00000000..d01cd46b --- /dev/null +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" @@ -0,0 +1,19 @@ + + + + \ No newline at end of file diff --git a/build_system/.jetbrains_run_config/cwd tree + docker system disk usage.run.xml b/build_system/.jetbrains_run_config/cwd tree + docker system disk usage.run.xml new file mode 100644 index 00000000..3234c0a3 --- /dev/null +++ b/build_system/.jetbrains_run_config/cwd tree + docker system disk usage.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/build_system/.jetbrains_run_config/interactive.run.xml b/build_system/.jetbrains_run_config/interactive.run.xml new file mode 100644 index 00000000..fb5838f0 --- /dev/null +++ b/build_system/.jetbrains_run_config/interactive.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/build_system/.jetbrains_run_config/list docker images + container.run.xml b/build_system/.jetbrains_run_config/list docker images + container.run.xml new file mode 100644 index 00000000..9894da23 --- /dev/null +++ b/build_system/.jetbrains_run_config/list docker images + container.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash -- build.run.xml" "b/build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash -- build.run.xml" new file mode 100644 index 00000000..4e1411d7 --- /dev/null +++ "b/build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash -- build.run.xml" @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash \342\200\272 test flag (popup).run.xml" "b/build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash \342\200\272 test flag (popup).run.xml" new file mode 100644 index 00000000..d2c9d64e --- /dev/null +++ "b/build_system/.jetbrains_run_config/lpm_execute_compose.bash \342\200\272 lpm_execute_compose.bash \342\200\272 test flag (popup).run.xml" @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag (popup).run.xml" "b/build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag (popup).run.xml" new file mode 100644 index 00000000..e4e8e504 --- /dev/null +++ "b/build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag (popup).run.xml" @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git "a/build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag override (popup).run.xml" "b/build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag override (popup).run.xml" new file mode 100644 index 00000000..3bd3e0d3 --- /dev/null +++ "b/build_system/.jetbrains_run_config/lpm_execute_compose_over_build_matrix.bash \342\200\272 test flag override (popup).run.xml" @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/build_system/.jetbrains_run_config/run and open a terminal in a Ubuntu 20.04 container.run.xml b/build_system/.jetbrains_run_config/run and open a terminal in a Ubuntu 20.04 container.run.xml new file mode 100644 index 00000000..d2ac23c8 --- /dev/null +++ b/build_system/.jetbrains_run_config/run and open a terminal in a Ubuntu 20.04 container.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file From 2f09b3e34f191c7b86b690207850baff07daf430 Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Wed, 29 Nov 2023 16:56:23 -0500 Subject: [PATCH 6/9] fix: build-system side unstable compilation issue fix [NMO-402] - refactor environment variable prefix to match norlab-build-system lib - change the name for the call to repository version master branch current version from "head" to "latest" - fix the norlab-build-system path resolution in files from the `lpm_utility_script.bash` --- build_system/.env | 8 +- build_system/.env.build_matrix | 5 + build_system/.env.prompt | 38 ++-- ...ompose._ \342\200\272 --help menu.run.xml" | 4 +- ...r build & run IamBuildSystemTester.run.xml | 2 +- ...d_matrix.bash \342\200\272 config.run.xml" | 4 +- ....bash \342\200\272 config --quiet.run.xml" | 4 +- ...bash \342\200\272 build --dry-run.run.xml" | 4 +- ...\200\272 build _service_ _popup_.run.xml" | 6 +- ...ies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" | 6 +- ...ependencies (BUILD MATRIX SUBSET).run.xml" | 6 +- ...uild test_compilation__ (Release).run.xml" | 6 +- ...efixed_path (BUILD MATRIX SUBSET).run.xml" | 6 +- ...s-general dependencies (AS IN TC).run.xml" | 6 +- .../.jetbrains_run_config/interactive.run.xml | 2 +- ...lpm_execute_compose.bash -- build.run.xml" | 4 +- ...sh \342\200\272 test flag (popup).run.xml" | 4 +- ...sh \342\200\272 test flag (popup).run.xml" | 4 +- ...00\272 test flag override (popup).run.xml" | 4 +- .../docker-compose.libpointmatcher.yaml | 38 ++-- .../lpm_utility_script/lpm_bashrc_config.bash | 96 +++++----- .../lpm_export_which_architecture.bash | 81 ++++---- .../lpm_install_docker_tools.bash | 175 ++++++++++-------- ..._compose.bash => nbs_execute_compose.bash} | 34 ++-- ...bs_execute_compose_over_build_matrix.bash} | 59 +++--- build_system/readme_test.md | 5 - .../test/Dockerfile.build_system_test | 6 +- ...st_build_and_run_IamBuildSystemTester.bash | 4 +- build_system/ubuntu/Dockerfile.dependencies | 21 ++- .../ubuntu/Dockerfile.dependencies_doc | 10 +- .../ubuntu/Dockerfile.libpointmatcher | 18 +- .../ubuntu/Dockerfile.libpointmatcher_ci_PR | 12 +- ...ockerfile.libpointmatcher_ci_SITREP_matrix | 14 +- ...ockerfile.libpointmatcher_test_compilation | 32 ++-- build_system/ubuntu/entrypoint.bash | 2 +- ..._test_libpointmatcher_checkout_branch.bash | 4 +- .../entrypoint_execute_lpm_unittest.bash | 8 +- .../lpm_execute_libpointmatcher_unittest.bash | 4 +- ...m_install_dependencies_general_ubuntu.bash | 8 +- ...m_install_dependencies_libnabo_ubuntu.bash | 22 +-- .../lpm_install_doc_dependencies_ubuntu.bash | 8 +- .../lpm_install_libpointmatcher_ubuntu.bash | 76 ++++---- build_system/version.norlab_build_system.txt | 1 + 43 files changed, 451 insertions(+), 410 deletions(-) rename build_system/{lpm_execute_compose.bash => nbs_execute_compose.bash} (86%) rename build_system/{lpm_execute_compose_over_build_matrix.bash => nbs_execute_compose_over_build_matrix.bash} (85%) delete mode 100644 build_system/readme_test.md create mode 100644 build_system/version.norlab_build_system.txt diff --git a/build_system/.env b/build_system/.env index 30a73b0f..9b80e43c 100644 --- a/build_system/.env +++ b/build_system/.env @@ -2,7 +2,7 @@ # # Dockerhub or self hosted hub domain name # -LPM_PROJECT_DOCKERHUB=norlabulaval +NBS_DOCKERHUB_NAMESPACE=norlabulaval # # Repository url @@ -11,14 +11,14 @@ LPM_PROJECT_DOCKERHUB=norlabulaval # - Original repo: https://github.com/ethz-asl/libpointmatcher # - DEV repo: https://github.com/norlab-ulaval/libpointmatcher-build-system -LPM_LIBPOINTMATCHER_SRC_DOMAIN=norlab-ulaval +NBS_REPOSITORY_DOMAIN=norlab-ulaval -LPM_LIBPOINTMATCHER_SRC_REPO_NAME=libpointmatcher +NBS_REPOSITORY_NAME=libpointmatcher # # Install script variables # -LPM_INSTALLED_LIBRARIES_PATH=/opt/percep3d_libraries +NBS_LIB_INSTALL_PATH=/opt/percep3d_libraries # # Docker built-in environment variable (do not change the variable name diff --git a/build_system/.env.build_matrix b/build_system/.env.build_matrix index 3dedd5f4..48f596b0 100644 --- a/build_system/.env.build_matrix +++ b/build_system/.env.build_matrix @@ -2,6 +2,11 @@ # Build matrix variables # +# +# The compose file on which the build matrix will be crawled +# +NBS_EXECUTE_BUILD_MATRIX_OVER_COMPOSE_FILE=docker-compose.libpointmatcher.yaml + # # Libpointmatcher version # diff --git a/build_system/.env.prompt b/build_system/.env.prompt index b4a01d91..e02f741a 100644 --- a/build_system/.env.prompt +++ b/build_system/.env.prompt @@ -1,14 +1,14 @@ -# (NICE TO HAVE) ToDo: refactor (ref task NMO-304 ♻︎ → Refactor .env.prompt variables prefixed by LPM_ to MSG_) -LPM_PROMPT_NAME="LPM" -LPM_SPLASH_NAME="Libpoinmatcher" -LPM_BUILD_SYSTEM_SPLASH_NAME="Libpoinmatcher Build System" +# (NICE TO HAVE) ToDo: refactor (ref task NMO-304 ♻︎ → Refactor .env.prompt variables prefixed by NBS_ to MSG_) +NBS_PROMPT_NAME="LPM" +NBS_SPLASH_NAME="Libpoinmatcher" +NBS_BUILD_SYSTEM_SPLASH_NAME="Libpoinmatcher Build System" -LPM_LINE_CHAR_BUILDER_LVL1='▉' -LPM_LINE_CHAR_BUILDER_LVL2='⣿' -LPM_LINE_CHAR_INSTALLER=':' -LPM_LINE_CHAR_UTIL='.' -LPM_LINE_CHAR_TEST=' ' +NBS_LINE_CHAR_BUILDER_LVL1='▉' +NBS_LINE_CHAR_BUILDER_LVL2='⣿' +NBS_LINE_CHAR_INSTALLER=':' +NBS_LINE_CHAR_UTIL='.' +NBS_LINE_CHAR_TEST=' ' # # Formating environment variables @@ -33,12 +33,12 @@ MSG_DONE_FORMAT="\033[1;32m" MSG_WARNING_FORMAT="\033[1;33m" MSG_END_FORMAT="\033[0m" -MSG_AWAITING_INPUT="${MSG_BASE_FORMAT}[${LPM_PROMPT_NAME} awaiting input]${MSG_END_FORMAT}" -MSG_BASE="${MSG_BASE_FORMAT}[${LPM_PROMPT_NAME}]${MSG_END_FORMAT}" -#MSG_DONE="\033[1;32m[${LPM_PROMPT_NAME} done]${MSG_END_FORMAT}" -MSG_DONE="${MSG_DONE_FORMAT}[${LPM_PROMPT_NAME} done]${MSG_END_FORMAT}" -MSG_WARNING="${MSG_WARNING_FORMAT}[${LPM_PROMPT_NAME} warning]${MSG_END_FORMAT}" -MSG_ERROR="${MSG_ERROR_FORMAT}[${LPM_PROMPT_NAME} error]${MSG_END_FORMAT}" +MSG_AWAITING_INPUT="${MSG_BASE_FORMAT}[${NBS_PROMPT_NAME} awaiting input]${MSG_END_FORMAT}" +MSG_BASE="${MSG_BASE_FORMAT}[${NBS_PROMPT_NAME}]${MSG_END_FORMAT}" +#MSG_DONE="\033[1;32m[${NBS_PROMPT_NAME} done]${MSG_END_FORMAT}" +MSG_DONE="${MSG_DONE_FORMAT}[${NBS_PROMPT_NAME} done]${MSG_END_FORMAT}" +MSG_WARNING="${MSG_WARNING_FORMAT}[${NBS_PROMPT_NAME} warning]${MSG_END_FORMAT}" +MSG_ERROR="${MSG_ERROR_FORMAT}[${NBS_PROMPT_NAME} error]${MSG_END_FORMAT}" # # TeamCity service message version @@ -47,13 +47,13 @@ MSG_DIMMED_FORMAT_TEAMCITY="|[1;2m" MSG_BASE_FORMAT_TEAMCITY="|[1m" MSG_ERROR_FORMAT_TEAMCITY="|[1;31m" MSG_WARNING_FORMAT_TEAMCITY="|[1;33m" -#MSG_LPM_STEP_FORMAT_TEAMCITY="|[1;104m" -MSG_LPM_STEP_FORMAT_TEAMCITY="|[30;107m" +#MSG_NBS_STEP_FORMAT_TEAMCITY="|[1;104m" +MSG_NBS_STEP_FORMAT_TEAMCITY="|[30;107m" MSG_END_FORMAT_TEAMCITY="|[0m" # (!) Note: substitution fail in the TeamCity Overview tab when using -# >>> MSG_BASE_TEAMCITY="${MSG_BASE_FORMAT_TEAMCITY}|[${LPM_PROMPT_NAME}|]${MSG_END_FORMAT_TEAMCITY}" -MSG_BASE_TEAMCITY="|[${LPM_PROMPT_NAME}|]" +# >>> MSG_BASE_TEAMCITY="${MSG_BASE_FORMAT_TEAMCITY}|[${NBS_PROMPT_NAME}|]${MSG_END_FORMAT_TEAMCITY}" +MSG_BASE_TEAMCITY="|[${NBS_PROMPT_NAME}|]" # # References: diff --git "a/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" "b/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" index 1c701be1..ca3fafd6 100644 --- "a/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" +++ "b/build_system/.jetbrains_run_config/(HELP) bash lpm_execute_compose._ \342\200\272 --help menu.run.xml" @@ -1,6 +1,6 @@ - - diff --git "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" index d01cd46b..9f1ccbf9 100644 --- "a/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" +++ "b/build_system/.jetbrains_run_config/bash lpm_execute_compose_over_build_matrix.bash \342\200\272 build&push dependencies-general dependencies (AS IN TC).run.xml" @@ -1,6 +1,6 @@ - - \ No newline at end of file + diff --git a/build_system/.jetbrains_run_config/interactive.run.xml b/build_system/.jetbrains_run_config/interactive.run.xml index fb5838f0..1a0a0dd3 100644 --- a/build_system/.jetbrains_run_config/interactive.run.xml +++ b/build_system/.jetbrains_run_config/interactive.run.xml @@ -1,5 +1,5 @@ - +