util/docker: Split build into multiple parts
Take the test build entirely out of the image creation process. This also allows splitting up the build steps a bit, providing more break points in case some build/test fails. Change-Id: Ie05d4a09f79350fd3e5415430da1edbcb3bcb443 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49985 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
ebfe6d3d3a
commit
c9e529408b
1 changed files with 17 additions and 8 deletions
|
@ -12,7 +12,7 @@
|
||||||
# is used to identify this docker image.
|
# is used to identify this docker image.
|
||||||
# DOCKER_COMMIT is the coreboot Commit-ID to build the toolchain from.
|
# DOCKER_COMMIT is the coreboot Commit-ID to build the toolchain from.
|
||||||
|
|
||||||
FROM debian:sid
|
FROM debian:sid AS coreboot-sdk
|
||||||
MAINTAINER Martin Roth <martin@coreboot.org>
|
MAINTAINER Martin Roth <martin@coreboot.org>
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
@ -104,13 +104,12 @@ RUN mkdir /home/coreboot/.ccache && \
|
||||||
echo "export SDK_VERSION={{SDK_VERSION}}" >> /home/coreboot/.bashrc && \
|
echo "export SDK_VERSION={{SDK_VERSION}}" >> /home/coreboot/.bashrc && \
|
||||||
echo "export SDK_COMMIT={{DOCKER_COMMIT}}" >> /home/coreboot/.bashrc
|
echo "export SDK_COMMIT={{DOCKER_COMMIT}}" >> /home/coreboot/.bashrc
|
||||||
|
|
||||||
VOLUME /home/coreboot/.ccache
|
|
||||||
|
|
||||||
ENV PATH $PATH:/opt/xgcc/bin
|
ENV PATH $PATH:/opt/xgcc/bin
|
||||||
ENV SDK_VERSION={{SDK_VERSION}}
|
ENV SDK_VERSION={{SDK_VERSION}}
|
||||||
ENV SDK_COMMIT={{DOCKER_COMMIT}}
|
ENV SDK_COMMIT={{DOCKER_COMMIT}}
|
||||||
USER coreboot
|
USER coreboot
|
||||||
|
|
||||||
|
FROM coreboot-sdk
|
||||||
# Test the built image
|
# Test the built image
|
||||||
RUN mkdir -p /tmp/work && \
|
RUN mkdir -p /tmp/work && \
|
||||||
cd /tmp/work && \
|
cd /tmp/work && \
|
||||||
|
@ -124,19 +123,29 @@ RUN mkdir -p /tmp/work && \
|
||||||
make -C em100 && \
|
make -C em100 && \
|
||||||
git clone https://review.coreboot.org/coreboot.git && \
|
git clone https://review.coreboot.org/coreboot.git && \
|
||||||
(cd coreboot && git submodule update --init --checkout ) && \
|
(cd coreboot && git submodule update --init --checkout ) && \
|
||||||
make -C coreboot CPUS=$(nproc) test-abuild && \
|
make -C coreboot CPUS=$(nproc) test-abuild
|
||||||
\
|
|
||||||
|
RUN \
|
||||||
|
cd /tmp/work && \
|
||||||
make -C coreboot olddefconfig && \
|
make -C coreboot olddefconfig && \
|
||||||
make -C coreboot all -j && \
|
make -C coreboot all -j && \
|
||||||
make -C coreboot printall && \
|
make -C coreboot printall && \
|
||||||
make -C coreboot filelist && \
|
make -C coreboot filelist && \
|
||||||
make -C coreboot ctags-project && \
|
make -C coreboot ctags-project && \
|
||||||
make -C coreboot cscope-project && \
|
make -C coreboot cscope-project
|
||||||
\
|
|
||||||
make -C coreboot doxygen -j && \
|
RUN \
|
||||||
|
cd /tmp/work && \
|
||||||
|
make -C coreboot doxygen -j
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
cd /tmp/work && \
|
||||||
make -C coreboot test-payloads&& \
|
make -C coreboot test-payloads&& \
|
||||||
make -C coreboot test-tools -j && \
|
make -C coreboot test-tools -j && \
|
||||||
make -C coreboot test-lint -j && \
|
make -C coreboot test-lint -j && \
|
||||||
make -C coreboot test-cleanup -j && \
|
make -C coreboot test-cleanup -j && \
|
||||||
cd && \
|
cd && \
|
||||||
rm -rf /tmp/work/
|
rm -rf /tmp/work/
|
||||||
|
|
||||||
|
FROM coreboot-sdk
|
||||||
|
VOLUME /home/coreboot/.ccache
|
||||||
|
|
Loading…
Reference in a new issue