diff --git a/build_system/.env b/build_system/.env index bd79b2a9..660be331 100644 --- a/build_system/.env +++ b/build_system/.env @@ -40,4 +40,3 @@ COMPOSE_PROJECT_NAME=libpointmatcher ## Unmute BUILDKIT_PROGRESS to set globaly for debugging dockerfile ## For debuging docker build localy, use `docker build --progress=plain --no-cache` flags instead #BUILDKIT_PROGRESS=plain - 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/.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" deleted file mode 100644 index d2e7dd3e..00000000 --- "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" +++ /dev/null @@ -1,19 +0,0 @@ - - - - \ No newline at end of file diff --git a/build_system/docker-compose.dependencies.yaml b/build_system/docker-compose.dependencies.yaml index e671ed10..9fcf3340 100644 --- a/build_system/docker-compose.dependencies.yaml +++ b/build_system/docker-compose.dependencies.yaml @@ -7,6 +7,7 @@ services: target: libpointmatcher-dependencies-general context: .. dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.dependencies + no_cache: true platforms: - "linux/amd64" - "linux/arm64/v8" diff --git a/build_system/docker-compose.libpointmatcher.yaml b/build_system/docker-compose.libpointmatcher.yaml index 66986776..be08fd70 100644 --- a/build_system/docker-compose.libpointmatcher.yaml +++ b/build_system/docker-compose.libpointmatcher.yaml @@ -11,7 +11,7 @@ services: build: context: .. dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.libpointmatcher.compilation_test - no_cache: false + no_cache: true target: test-compilation-auto-path-resolution platforms: - "linux/amd64" 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 44226057..82b8b2d4 100644 --- a/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash +++ b/build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash @@ -76,9 +76,10 @@ sudo apt-get update && curl \ wget \ git \ + software-properties-common \ && sudo apt-get install --assume-yes "${APT_FLAGS[@]}" \ - g++ \ gcc \ + g++ \ catch \ make \ cmake \ @@ -87,6 +88,21 @@ 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 + # Update Bionic outdated compiler + # Ref https://github.com/norlab-ulaval/libpointmatcher/pull/581#issuecomment-2284415233 + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update && + sudo apt-get install --assume-yes "${APT_FLAGS[@]}" \ + gcc-9 \ + g++-9 && + sudo rm -rf /var/lib/apt/lists/* + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 +fi + n2st::teamcity_service_msg_blockClosed # ................................................................................................. diff --git a/doc/Compilation.md b/doc/Compilation.md index ecce5225..39ec7ba6 100644 --- a/doc/Compilation.md +++ b/doc/Compilation.md @@ -41,9 +41,9 @@ This tutorial will guide you through the different steps to install libpointmatc ### Dependencies Libpointmatcher relies on a number of standard libraries, most of which can be installed with standard package managers. The following table lists the minimum requirements necessary to instal libpointmatcher. -| Library name | cmake | boost | eigen | yaml-cpp | libnabo | doxygen (opt.) | -|:-------------|:------:|:------:|:-------:|:--------:|:-------:|:--------------:| -| **Version** | 3.10.2 | 1.65.1 | 3.3.4-4 | 0.5 | 1.1.1 | 1.8.13-10 | +| Library name | g++ | cmake | boost | eigen | yaml-cpp | libnabo | doxygen (opt.) | +|:-------------|-------|:------:|:------:|:-------:|:--------:|:-------:|:--------------:| +| **Version** | 9.4.0 | 3.10.2 | 1.65.1 | 3.3.4-4 | 0.5 | 1.1.1 | 1.8.13-10 | ## Detailed Installation Instructions The rest of this tutorial will guide you through the different requirements step by step. @@ -52,11 +52,24 @@ The rest of this tutorial will guide you through the different requirements step Some installation steps are platform-dependent and need to be done beforehand. === "Ubuntu" - You will need to install the GNU Compiler Collection, also known as GCC. The minimum supported version is 7.5.0. + You will need to install the GNU Compiler Collection, also known as GCC. The minimum supported version is 9.4.0. ```bash sudo apt update sudo apt install build-essential ``` + + ??? warning "Ubuntu 18 Bionic" + + While newer versions of Ubuntu come with gcc and g++ on newer versions than 9.4.0 and support all modern C++17 standard library features, it is not the case for Ubuntu Bionic. + You will therefore need to install it manually. + Run + ```shell + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update && + sudo apt-get install gcc-9 g++-9 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9 + ``` + === "MacOS" ###### Installing Xcode via the App Store (OS X 10.10.2 and later) 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. diff --git a/mkdocs.yml b/mkdocs.yml index 53aa1d87..2409dfcf 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -46,6 +46,7 @@ markdown_extensions: - pymdownx.superfences - pymdownx.tabbed: alternate_style: true + - pymdownx.details - attr_list - md_in_html nav: