summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2021-01-27 12:34:35 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-01-28 12:32:25 +0000
commitc9e529408bdb8e5793892243bdcc645f489de6b3 (patch)
treef773ba4d25c31346e0ca55f9ffdcbabdd724463c /util
parentebfe6d3d3ac55865fa500b711c4c461e14792d25 (diff)
downloadcoreboot-c9e529408bdb8e5793892243bdcc645f489de6b3.tar.gz
coreboot-c9e529408bdb8e5793892243bdcc645f489de6b3.tar.bz2
coreboot-c9e529408bdb8e5793892243bdcc645f489de6b3.zip
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>
Diffstat (limited to 'util')
-rw-r--r--util/docker/coreboot-sdk/Dockerfile25
1 files changed, 17 insertions, 8 deletions
diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile
index 808f2af8dd81..64854a413260 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 <martin@coreboot.org>
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