summaryrefslogtreecommitdiffstats
path: root/ci/build-all-defconfigs.sh
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-03-01 13:59:42 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-03-07 13:39:34 +1100
commit098d03e58e1ac9dcc367c2277bc4faa6adbb0d9a (patch)
treedcce946a1ad80c7ef1fa79e6a935a739a22428ba /ci/build-all-defconfigs.sh
parent0b4397de8fa3af657464f0a05ff58ff0ae773f95 (diff)
downloadblackbird-op-build-098d03e58e1ac9dcc367c2277bc4faa6adbb0d9a.tar.gz
blackbird-op-build-098d03e58e1ac9dcc367c2277bc4faa6adbb0d9a.zip
Add CI building scripts using Docker
This is a first stab at a set of scripts to build each defconfig on each supported build platform inside Docker containers. The idea is that on x86-64 and ppc64le hosts, we can easily test that everything still at least builds on our supported build platforms. Due to docker image availability and Docker's complete lack of acknowledging that there may exist architectures other than x86-64, we get to jump through some rather stupid hoops to work out what to build where. Tested on Fedora 23 x86-64 and Ubuntu xenial snapshot with docker daily snapshot on ppc64le. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'ci/build-all-defconfigs.sh')
-rwxr-xr-xci/build-all-defconfigs.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh
new file mode 100755
index 00000000..1730e289
--- /dev/null
+++ b/ci/build-all-defconfigs.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+set -ex
+set -eo pipefail
+
+DEFCONFIGS=`(cd openpower/configs; ls -1 *_defconfig)`
+
+if [ -z "$1" or ! -d "$1" ]; then
+ echo "No output directory specified"
+ exit 1;
+fi
+
+if [ -z "$CCACHE_DIR" ]; then
+ CCACHE_DIR=`pwd`/.op-build_ccache
+fi
+
+shopt -s expand_aliases
+source op-build-env
+
+for i in $DEFCONFIGS; do
+ op-build $i
+ echo 'BR2_CCACHE=y' >> output/.config
+ echo "BR2_CCACHE_DIR=\"$CCACHE_DIR\"" >> output/.config
+ echo 'BR2_CCACHE_INITIAL_SETUP=""' >> output/.config
+
+ op-build olddefconfig
+ op-build
+ r=$?
+ mkdir $1/$i-images
+ mv output/images/* $1/$i-images/
+ mv output/.config $1/$i-images/.config
+ lsb_release -a > $1/$i-images/lsb_release
+ rm -rf output/*
+ if [ $r -ne 0 ]; then
+ exit $r
+ fi
+done
+
OpenPOWER on IntegriCloud