From ef84a0be05be336b4a2fa2244c2ba7dea68d7809 Mon Sep 17 00:00:00 2001 From: RedLeaderOne Date: Wed, 11 Sep 2024 11:49:41 -0400 Subject: [PATCH] ci: consolidate build and test steps in Dockerfile - Merge the LPM build and test instructions on the same RUN layer to mitigate the cached vs compiled version missmatch related problem that causes build instability intermittently --- build_system/ubuntu/Dockerfile.libpointmatcher.ci_PR | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build_system/ubuntu/Dockerfile.libpointmatcher.ci_PR b/build_system/ubuntu/Dockerfile.libpointmatcher.ci_PR index 14839ffa..d3a0ffa4 100644 --- a/build_system/ubuntu/Dockerfile.libpointmatcher.ci_PR +++ b/build_system/ubuntu/Dockerfile.libpointmatcher.ci_PR @@ -40,21 +40,21 @@ WORKDIR "${NBS_LIB_INSTALL_PATH}/${NBS_REPOSITORY_NAME}" RUN chmod +x ./utest/listVersionsUbuntu.sh RUN utest/listVersionsUbuntu.sh -# ==== Build libpointmatcher checkout branch ====================================================== +# ==== Build/test libpointmatcher checkout branch ================================================= WORKDIR ./build_system/ubuntu RUN chmod +x lpm_install_libpointmatcher_ubuntu.bash RUN chmod +x lpm_execute_libpointmatcher_unittest.bash RUN chmod +x entrypoint.bash - +# Note: keep build and test instructions on the same RUN layer to mitigate the cached vs compiled +# version missmatch related problem that causes build instability RUN bash lpm_install_libpointmatcher_ubuntu.bash \ --repository-version ${REPOSITORY_VERSION} \ --cmake-build-type ${CMAKE_BUILD_TYPE} \ - ${INSTALL_SCRIPT_FLAG} - -# ==== Execute libpointmatcher unit-test=========================================================== -RUN source lpm_execute_libpointmatcher_unittest.bash + ${INSTALL_SCRIPT_FLAG} \ + && echo "Execute libpointmatcher unit-test" \ + && bash lpm_execute_libpointmatcher_unittest.bash # ................................................................................................. ## Alternate version