Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactor hardcoded build system path using environment variable and substitution #542

Merged
merged 5 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.