From c9e529408bdb8e5793892243bdcc645f489de6b3 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 27 Jan 2021 12:34:35 +0100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49985 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth Reviewed-by: Angel Pons --- util/docker/coreboot-sdk/Dockerfile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile index 808f2af8dd..64854a4132 100644 --- a/util/docker/coreboot-sdk/Dockerfile +++ b/util/docker/coreboot-sdk/Dockerfile @@ -12,7 +12,7 @@ # is used to identify this docker image. # DOCKER_COMMIT is the coreboot Commit-ID to build the toolchain from. -FROM debian:sid +FROM debian:sid AS coreboot-sdk MAINTAINER Martin Roth RUN \ @@ -104,13 +104,12 @@ RUN mkdir /home/coreboot/.ccache && \ echo "export SDK_VERSION={{SDK_VERSION}}" >> /home/coreboot/.bashrc && \ echo "export SDK_COMMIT={{DOCKER_COMMIT}}" >> /home/coreboot/.bashrc -VOLUME /home/coreboot/.ccache - ENV PATH $PATH:/opt/xgcc/bin ENV SDK_VERSION={{SDK_VERSION}} ENV SDK_COMMIT={{DOCKER_COMMIT}} USER coreboot +FROM coreboot-sdk # Test the built image RUN mkdir -p /tmp/work && \ cd /tmp/work && \ @@ -124,19 +123,29 @@ RUN mkdir -p /tmp/work && \ make -C em100 && \ git clone https://review.coreboot.org/coreboot.git && \ (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 all -j && \ make -C coreboot printall && \ make -C coreboot filelist && \ make -C coreboot ctags-project && \ - make -C coreboot cscope-project && \ - \ - make -C coreboot doxygen -j && \ + make -C coreboot cscope-project + +RUN \ + cd /tmp/work && \ + make -C coreboot doxygen -j + +RUN \ + cd /tmp/work && \ make -C coreboot test-payloads&& \ make -C coreboot test-tools -j && \ make -C coreboot test-lint -j && \ make -C coreboot test-cleanup -j && \ cd && \ rm -rf /tmp/work/ + +FROM coreboot-sdk +VOLUME /home/coreboot/.ccache -- cgit v1.2.3