Skip to content

Commit

Permalink
ci: consolidate build and test steps in Dockerfile
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
RedLeader962 committed Sep 11, 2024
1 parent addba71 commit ef84a0b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build_system/ubuntu/Dockerfile.libpointmatcher.ci_PR
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef84a0b

Please sign in to comment.