From be78596a92caa28c88f32934fd8934d230c25ac4 Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Tue, 13 Aug 2024 19:52:32 -0400 Subject: [PATCH] build: add bionic specific install step and add TeamCity build script - Add logic to install GCC 9 for Ubuntu 18.04 in dependency script. - Replace "ci_PR_arm64v8" with "ci_PR_arm64" in multiple scripts. - Add TeamCity-specific script to manage build flags and dry-run options. - Update contributing documentation to reflect architecture label changes. --- ...\200\272 build _service_ _popup_.run.xml" | 4 +-- ...ies_arm64v8 ci_PR_arm64v8 _popup_.run.xml" | 6 ++-- ...libpointmatcher_build_matrix.teamcity.bash | 35 +++++++++++++++++++ ...pm_crawl_libpointmatcher_build_matrix.bash | 2 +- ...libpointmatcher_build_matrix.bleeding.bash | 2 +- ...m_install_dependencies_general_ubuntu.bash | 10 ++++++ doc/contributing/contributing_instructions.md | 6 ++-- 7 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 build_system/lpm_crawl_libpointmatcher_build_matrix.teamcity.bash 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" index 83b4f1c5..e595df70 100644 --- "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" @@ -1,6 +1,6 @@ - - \ 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" index 9e65fc21..5393105d 100644 --- "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" @@ -1,6 +1,6 @@ - - \ No newline at end of file + diff --git a/build_system/lpm_crawl_libpointmatcher_build_matrix.teamcity.bash b/build_system/lpm_crawl_libpointmatcher_build_matrix.teamcity.bash new file mode 100644 index 00000000..53d1a1f8 --- /dev/null +++ b/build_system/lpm_crawl_libpointmatcher_build_matrix.teamcity.bash @@ -0,0 +1,35 @@ +#!/bin/bash + +# ....Architecture.............................................. +TC_LPM_BUILD_ARCH=%TC_LPM_BUILD_ARCH% +if [[ -z ${TC_LPM_BUILD_ARCH} ]]; then + TC_LPM_BUILD_ARCH=ci_PR_multiarch +fi +echo "Build architecture: ${TC_LPM_BUILD_ARCH}" + +# ....Setup flags for dn_build_all.bash......................... +LPM_CRAWL_BUILD_MATRIX_FLAGS=() +# Add flag from TeamCity custom parameters +LPM_CRAWL_BUILD_MATRIX_FLAGS+=($(echo %LPM_CRAWL_BUILD_MATRIX_FLAGS% | tr " " "\n")) +if [[ -n "${LPM_CRAWL_BUILD_MATRIX_FLAGS}" ]]; then + echo "LPM_CRAWL_BUILD_MATRIX_FLAGS=(" + for each in "${LPM_CRAWL_BUILD_MATRIX_FLAGS[@]}" ; do + echo " ${each}" + done + echo ")" +fi + +LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--repository-version-build-matrix-override" "latest") +LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--fail-fast") +LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--" "build" "${TC_LPM_BUILD_ARCH:?err}") + +# ....Dry-run.............................................. +TC_DRY_RUN=%TC_DRY_RUN% +if [[ ${TC_DRY_RUN} == true ]]; then + echo "Run in dry-run mode" + LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--dry-run") +fi + +# ....Final..................................................... +echo -e "execute: bash lpm_crawl_libpointmatcher_build_matrix.bash ${LPM_CRAWL_BUILD_MATRIX_FLAGS[*]}" +bash lpm_crawl_libpointmatcher_build_matrix.bash "${LPM_CRAWL_BUILD_MATRIX_FLAGS[@]}" diff --git a/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bash b/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bash index 17487906..9aa98b14 100644 --- a/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bash +++ b/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bash @@ -6,5 +6,5 @@ LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")" cd "${LPM_ROOT_DIR}/../../" # ====begin======================================================================================== -#bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64v8 +#bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64 bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build --dry-run diff --git a/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bleeding.bash b/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bleeding.bash index 94f38b9b..8be5b384 100644 --- a/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bleeding.bash +++ b/build_system/tests/tests_docker_dryrun_and_config/dryrun_lpm_crawl_libpointmatcher_build_matrix.bleeding.bash @@ -6,5 +6,5 @@ LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")" cd "${LPM_ROOT_DIR}/../../" # ====begin======================================================================================== -#bash lpm_crawl_libpointmatcher_build_matrix.bleeding.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64v8 +#bash lpm_crawl_libpointmatcher_build_matrix.bleeding.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64 bash lpm_crawl_libpointmatcher_build_matrix.bleeding.bash --fail-fast -- build --dry-run diff --git a/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash b/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash index d857060d..3ab1c525 100644 --- a/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash @@ -87,6 +87,16 @@ sudo apt-get update && ##cmake --version +# Retrieve ubuntu version number: DISTRIB_RELEASE +source /etc/lsb-release +print_msg "Ubuntu version is ${DISTRIB_RELEASE}" +if [[ ${DISTRIB_RELEASE} == '18.04' ]]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt update + sudo apt install gcc-9 g++-9 +fi + + teamcity_service_msg_blockClosed # ................................................................................................. diff --git a/doc/contributing/contributing_instructions.md b/doc/contributing/contributing_instructions.md index 9b6d1375..363c81fd 100644 --- a/doc/contributing/contributing_instructions.md +++ b/doc/contributing/contributing_instructions.md @@ -68,14 +68,14 @@ cd /build_system bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build ci_PR # Run a specific case using build flags with multi-architecture -# virtualization using "ci_PR_amd64" and "ci_PR_arm64v8" services +# virtualization using "ci_PR_amd64" and "ci_PR_arm64" services bash lpm_crawl_libpointmatcher_build_matrix.bash \ --repository-version-build-matrix-override latest \ --os-name-build-matrix-override ubuntu \ --cmake-build-type-build-matrix-override RelWithDebInfo \ --ubuntu-version-build-matrix-override jammy \ --fail-fast \ - -- build ci_PR_amd64 ci_PR_arm64v8 + -- build ci_PR_amd64 ci_PR_arm64 # Read the help for details bash lpm_crawl_libpointmatcher_build_matrix.bash --help @@ -135,4 +135,4 @@ See [Commit Message References](commit_msg_reference.md) for details. - (in-progress) and it triggers the _semantic release automation_ ## Writing Documentation -The documentation is located in the /doc folder and uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) Markdown framework. \ No newline at end of file +The documentation is located in the /doc folder and uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) Markdown framework.