Skip to content

Commit

Permalink
Move extra test ngen layer to lower in Dockerfile.
Browse files Browse the repository at this point in the history
Moving the rocky_ngen_build_testing layer to be the next-to-last layer
within ngen Dockerfile so that modifications to maximize what
intermediate steps can be tested with it, while minimizing what will be
rebuilt if/when the test layer is changed.
  • Loading branch information
robertbartel committed Jul 18, 2023
1 parent 3852428 commit a4d88f6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docker/main/ngen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,6 @@ RUN cd ${WORKDIR} \
&& git submodule update --init --depth 1 test/googletest \
&& git submodule update --init --recursive --depth 1

################################################################################################################
################################################################################################################
FROM rocky-ngen-deps as rocky_ngen_build_testing

COPY --chown=${USER} --from=rocky_init_repo ${WORKDIR}/ngen ${WORKDIR}/ngen
ENV BOOST_ROOT=${WORKDIR}/boost
WORKDIR ${WORKDIR}/ngen

################################################################################################################
################################################################################################################
##### Create intermediate Docker build stage for building t-route in Rocky Linux environment
Expand Down Expand Up @@ -575,7 +567,16 @@ RUN cd ${WORKDIR}/ngen \
$BUILD_DIR/test/test_bmi_multi; \
fi \
done \
&& find cmake_build* -type f -name "*" ! \( -name "*.so" -o -name "ngen" -o -name "partitionGenerator" \) -exec rm {} +
&& find cmake_build* -type f -name "*" ! \( -name "*.so" -o -name "ngen" -o -name "partitionGenerator" \) -exec rm {} +

################################################################################################################
################################################################################################################
##### A build stage for testing using the ngen-build-test image
FROM rocky_build_ngen as rocky_ngen_build_testing

#COPY --chown=${USER} --from=rocky_init_repo ${WORKDIR}/ngen ${WORKDIR}/ngen
#ENV BOOST_ROOT=${WORKDIR}/boost
WORKDIR ${WORKDIR}/ngen

################################################################################################################
################################################################################################################
Expand Down

0 comments on commit a4d88f6

Please sign in to comment.