Skip to content

Commit

Permalink
Merge pull request #542 from norlab-ulaval/develop
Browse files Browse the repository at this point in the history
fix: refactor hardcoded build system path using environment variable and substitution
  • Loading branch information
RedLeader962 authored Dec 11, 2023
2 parents 9fdf21b + 4b01f3d commit 52148ea
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 85 deletions.
1 change: 0 additions & 1 deletion build_system/.env.build_matrix.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ NBS_MATRIX_SUPPORTED_OS=( 'ubuntu' )
NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP=( 'bionic' 'focal' 'jammy' )
# Part of the build matrix used for PR
NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=( 'bionic' 'focal' )
#NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=( 'bionic' 'focal' 'jammy' )
# ToDo: fixme!! (ref task NMO-305 ﹅→ Build fail: ubuntu jammy with utest compilation).
#
# iceboxed: implement other OS support (ref task NMO-213 OsX arm64-Darwin and NMO-210 OsX x86 CD components)
Expand Down
1 change: 0 additions & 1 deletion build_system/.env.build_matrix.libpointmatcher
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ NBS_MATRIX_SUPPORTED_OS=( 'ubuntu' )
NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS_SITREP=( 'bionic' 'focal' 'jammy' )
# Part of the build matrix used for PR
NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=( 'bionic' 'focal' )
#NBS_MATRIX_UBUNTU_SUPPORTED_VERSIONS=( 'bionic' 'focal' 'jammy' )
# ToDo: fixme!! (ref task NMO-305 ﹅→ Build fail: ubuntu jammy with utest compilation).
#
# iceboxed: implement other OS support (ref task NMO-213 OsX arm64-Darwin and NMO-210 OsX x86 CD components)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bash lpm_crawl_dependencies_build_matrix.bash › build dependencies-general dependencies (BUILD MATRIX SUBSET)" type="ShConfigurationType" folderName="(A | Execute compose over build matrix)">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_dependencies_build_matrix.bash --fail-fast --cmake-build-type-build-matrix-override None --os-name-build-matrix-override ubuntu --ubuntu-version-build-matrix-override focal -- build dependencies-general dependencies" />
<configuration default="false" name="bash lpm_crawl_dependencies_build_matrix.bash › build dependencies-general dependencies (BUILD MATRIX SUBSET)" type="ShConfigurationType" folderName="(A | Execute compose over build matrix)" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_dependencies_build_matrix.bash --fail-fast --cmake-build-type-build-matrix-override None --os-name-build-matrix-override ubuntu --ubuntu-version-build-matrix-override jammy -- build --push" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bash lpm_crawl_dependencies_build_matrix.bash › build&amp;push dependencies-general dependencies (AS IN TC)" type="ShConfigurationType" folderName="(A | Execute compose over build matrix)">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_dependencies_build_matrix.bash --fail-fast --os-name-build-matrix-override ubuntu -- build --push dependencies-doc" />
<option name="SCRIPT_TEXT" value="bash lpm_crawl_dependencies_build_matrix.bash --fail-fast --os-name-build-matrix-override ubuntu -- build --push" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="nbs_execute_compose_over_build_matrix.bash › test flag (popup)" type="ShConfigurationType" folderName="(B | TEST › IamBuildSystemTester) LPM test user script in isolation" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash build_and_run_IamBuildSystemTester.bash &quot;bash ./nbs_execute_compose_over_build_matrix.bash --repository-version-build-matrix-override latest --cmake-build-type-build-matrix-override None --docker-debug-logs -- build --dry-run&quot;" />
<configuration default="false" name="lpm_crawl_dependencies_build_matrix.bash › test flag (popup)" type="ShConfigurationType" folderName="(B | TEST › IamBuildSystemTester) LPM test user script in isolation" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash build_and_run_IamBuildSystemTester.bash &quot;bash ./lpm_crawl_dependencies_build_matrix.bash --repository-version-build-matrix-override latest --cmake-build-type-build-matrix-override None --docker-debug-logs -- build --dry-run&quot;" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="nbs_execute_compose_over_build_matrix.bash › test flag override (popup)" type="ShConfigurationType" folderName="(B | TEST › IamBuildSystemTester) LPM test user script in isolation" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash build_and_run_IamBuildSystemTester.bash &quot;bash ./nbs_execute_compose_over_build_matrix.bash --repository-version-build-matrix-override PR1 --cmake-build-type-build-matrix-override RelWithDebInfo --os-name-build-matrix-override osx --osx-version-build-matrix-override ventura --ubuntu-version-build-matrix-override jammy -- build --dry-run dependencies&quot;" />
<configuration default="false" name="lpm_crawl_libpointmatcher_build_matrix.bash › test flag override (popup)" type="ShConfigurationType" folderName="(B | TEST › IamBuildSystemTester) LPM test user script in isolation" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash build_and_run_IamBuildSystemTester.bash &quot;bash ./lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override PR1 --cmake-build-type-build-matrix-override RelWithDebInfo --os-name-build-matrix-override osx --osx-version-build-matrix-override ventura --ubuntu-version-build-matrix-override jammy -- build --dry-run dependencies&quot;" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand Down

This file was deleted.

6 changes: 4 additions & 2 deletions build_system/docker-compose.dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
build:
target: libpointmatcher-dependencies-general
context: ..
dockerfile: ./build_system/ubuntu/Dockerfile.dependencies
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.dependencies
platforms:
- "linux/amd64"
- "linux/arm64/v8"
Expand All @@ -33,7 +33,7 @@ services:
image: ${NBS_DOCKERHUB_NAMESPACE:?err}/libpointmatcher-dependencies-doc:${NBS_IMAGE_TAG:?err}
build:
context: ..
dockerfile: ./build_system/ubuntu/Dockerfile.dependencies.doxygen
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.dependencies.doxygen
platforms:
- "linux/amd64"
- "linux/arm64/v8"
Expand All @@ -42,5 +42,7 @@ services:
BASE_IMAGE: libpointmatcher-dependencies
BASE_IMAGE_TAG: ${NBS_IMAGE_TAG}
IS_TEAMCITY_RUN: ${IS_TEAMCITY_RUN}
depends_on:
- dependencies
tty: true
stdin_open: true
9 changes: 5 additions & 4 deletions build_system/docker-compose.libpointmatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ services:
pull_policy: build
build:
context: ..
dockerfile: ubuntu/Dockerfile.libpointmatcher.compilation_test
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.libpointmatcher.compilation_test
no_cache: true
target: test-compilation-auto-path-resolution
## Mute 'platforms' while using arch virtualization with C++ build to prevent segmentation fault during lpm cmake install
# platforms:
Expand Down Expand Up @@ -48,7 +49,7 @@ services:
pull_policy: build
build:
context: ..
dockerfile: ubuntu/Dockerfile.libpointmatcher.ci_PR
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR}/ubuntu/Dockerfile.libpointmatcher.ci_PR
no_cache: true
args:
PROJECT_HUB: ${NBS_DOCKERHUB_NAMESPACE}
Expand Down Expand Up @@ -80,7 +81,7 @@ services:
pull_policy: build
build:
context: ..
dockerfile: ubuntu/Dockerfile.libpointmatcher.ci_SITREP_matrix
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR}/ubuntu/Dockerfile.libpointmatcher.ci_SITREP_matrix
no_cache: true
args:
PROJECT_HUB: ${NBS_DOCKERHUB_NAMESPACE}
Expand All @@ -106,7 +107,7 @@ services:
container_name: libpointmatcher
build:
context: ..
dockerfile: ubuntu/Dockerfile.libpointmatcher.hub_release
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR}/ubuntu/Dockerfile.libpointmatcher.hub_release
platforms:
- "linux/amd64"
- "linux/arm64/v8"
Expand Down
5 changes: 4 additions & 1 deletion build_system/tests/build_and_run_IamBuildSystemTester.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ fi
_PATH_TO_SCRIPT="$(realpath "${BASH_SOURCE[0]}")"
LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")/.."

set -o allexport && source .env && set +o allexport
#tree -L 1 $LPM_ROOT_DIR

# ....Helper function..............................................................................................
# import shell functions from utilities library
source "${LPM_ROOT_DIR}/utilities/norlab-shell-script-tools/import_norlab_shell_script_tools_lib.bash"
source "${LPM_ROOT_DIR}/build_system/utilities/norlab-shell-script-tools/import_norlab_shell_script_tools_lib.bash"

#source ./function_library/prompt_utilities.bash
#source ./function_library/general_utilities.bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")"
cd "${LPM_ROOT_DIR}/../"

# ====begin========================================================================================
bash build_and_run_IamBuildSystemTester.bash "bash ./nbs_execute_compose_over_build_matrix.bash \
bash build_and_run_IamBuildSystemTester.bash "bash ./lpm_crawl_libpointmatcher_build_matrix.bash \
--repository-version-build-matrix-override latest \
--cmake-build-type-build-matrix-override None \
--docker-debug-logs \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")"
cd "${LPM_ROOT_DIR}/../"

# ====begin========================================================================================
bash build_and_run_IamBuildSystemTester.bash "bash ./nbs_execute_compose_over_build_matrix.bash \
bash build_and_run_IamBuildSystemTester.bash "bash ./lpm_crawl_libpointmatcher_build_matrix.bash \
--repository-version-build-matrix-override PR1 \
--cmake-build-type-build-matrix-override RelWithDebInfo \
--os-name-build-matrix-override osx \
Expand Down

This file was deleted.

0 comments on commit 52148ea

Please sign in to comment.