Skip to content

Commit

Permalink
build: add bionic specific install step and add TeamCity build script
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
RedLeader962 committed Aug 13, 2024
1 parent f621555 commit be78596
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bash lpm_crawl_libpointmatcher_build_matrix.bash › build &lt;service&gt; &lt;popup&gt;" type="ShConfigurationType" folderName="[LPM] C | Execute compose over build matrix" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override latest --os-name-build-matrix-override ubuntu --fail-fast -- build ci_PR_arm64v8" />
<option name="SCRIPT_TEXT" value="bash lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override latest --os-name-build-matrix-override ubuntu --fail-fast -- build ci_PR_arm64" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand All @@ -16,4 +16,4 @@
</envs>
<method v="2" />
</configuration>
</component>
</component>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bash lpm_crawl_libpointmatcher_build_matrix.bash › build ci_PR_arm64v8 &lt;popup&gt;" type="ShConfigurationType" folderName="[LPM] C | Execute compose over build matrix" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="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 Release --ubuntu-version-build-matrix-override jammy --fail-fast -- build ci_PR_arm64v8" />
<configuration default="false" name="bash lpm_crawl_libpointmatcher_build_matrix.bash › build ci_PR_arm64 &lt;popup&gt;" type="ShConfigurationType" folderName="[LPM] C | Execute compose over build matrix" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="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 Release --ubuntu-version-build-matrix-override jammy --fail-fast -- build ci_PR_arm64" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand All @@ -16,4 +16,4 @@
</envs>
<method v="2" />
</configuration>
</component>
</component>
35 changes: 35 additions & 0 deletions build_system/lpm_crawl_libpointmatcher_build_matrix.teamcity.bash
Original file line number Diff line number Diff line change
@@ -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[@]}"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
# .................................................................................................

Expand Down
6 changes: 3 additions & 3 deletions doc/contributing/contributing_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ cd <path/to/libpointmatcher>/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
Expand Down Expand Up @@ -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.
The documentation is located in the /doc folder and uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) Markdown framework.

0 comments on commit be78596

Please sign in to comment.