diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-10-31 13:51:32 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-11-02 15:27:40 +1100 |
commit | 99f146145c49e960af6e7da9391908cb30617227 (patch) | |
tree | b3ede2e0beaa0eafae02d77270f07c846beef375 /opal-ci | |
parent | ed9c11c90d30484072a3d39d8b6660992699198e (diff) | |
download | skiboot-99f146145c49e960af6e7da9391908cb30617227.zip skiboot-99f146145c49e960af6e7da9391908cb30617227.tar.gz skiboot-99f146145c49e960af6e7da9391908cb30617227.tar.bz2 |
travis-ci: use Docker containers for a matrix of platforms
This greatly simplifies the build process for travis, yet makes it more
powerful and increases coverage without increasing wall time to test.
Travis has the concept of a build matrix, and we want to ensure we continue
to build succesfully on a variety of platforms and compiler combinations.
We limit what we run on some OSs to conserve vital sanity.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'opal-ci')
-rw-r--r-- | opal-ci/Dockerfile-centos6 | 9 | ||||
-rw-r--r-- | opal-ci/Dockerfile-centos7 | 10 | ||||
-rw-r--r-- | opal-ci/Dockerfile-fedora24 | 6 | ||||
-rw-r--r-- | opal-ci/Dockerfile-ubuntu-12.04 | 19 | ||||
-rw-r--r-- | opal-ci/Dockerfile-ubuntu-16.04 | 12 | ||||
-rw-r--r-- | opal-ci/Dockerfile-ubuntu-latest | 12 | ||||
-rwxr-xr-x | opal-ci/build-centos6.sh | 27 | ||||
-rwxr-xr-x | opal-ci/build-fedora24.sh | 25 | ||||
-rwxr-xr-x | opal-ci/build-ubuntu-12.04.sh | 24 | ||||
-rwxr-xr-x | opal-ci/build-ubuntu-16.04.sh | 24 |
10 files changed, 168 insertions, 0 deletions
diff --git a/opal-ci/Dockerfile-centos6 b/opal-ci/Dockerfile-centos6 new file mode 100644 index 0000000..5cd9a7a --- /dev/null +++ b/opal-ci/Dockerfile-centos6 @@ -0,0 +1,9 @@ +FROM centos:6 +RUN yum -y update && yum clean all +RUN yum -y install wget xterm gcc git xz +RUN wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz +RUN mkdir /opt/cross +RUN tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz +COPY . /build/ +WORKDIR /build +ENTRYPOINT ./opal-ci/build-centos6.sh diff --git a/opal-ci/Dockerfile-centos7 b/opal-ci/Dockerfile-centos7 new file mode 100644 index 0000000..c9d4c87 --- /dev/null +++ b/opal-ci/Dockerfile-centos7 @@ -0,0 +1,10 @@ +FROM centos:7 +RUN yum -y update && yum clean all +RUN yum -y install wget xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel +RUN wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz +RUN mkdir /opt/cross +RUN tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz +COPY . /build/ +WORKDIR /build +# We don't have a custom centos 7 build, same script for now +ENTRYPOINT ./opal-ci/build-centos6.sh diff --git a/opal-ci/Dockerfile-fedora24 b/opal-ci/Dockerfile-fedora24 new file mode 100644 index 0000000..7caa884 --- /dev/null +++ b/opal-ci/Dockerfile-fedora24 @@ -0,0 +1,6 @@ +FROM fedora:24 +RUN dnf -y install wget xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel +RUN dnf -y install gcc-powerpc64-linux-gnu +COPY . /build/ +WORKDIR /build +ENTRYPOINT ./opal-ci/build-fedora24.sh diff --git a/opal-ci/Dockerfile-ubuntu-12.04 b/opal-ci/Dockerfile-ubuntu-12.04 new file mode 100644 index 0000000..42026a2 --- /dev/null +++ b/opal-ci/Dockerfile-ubuntu-12.04 @@ -0,0 +1,19 @@ +FROM ubuntu:trusty +RUN sudo apt-get update -qq +RUN sudo apt-get install -y software-properties-common +RUN sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +RUN sudo apt-get update -qq +RUN sudo apt-get install -y gcc-4.8 libstdc++6 valgrind expect xterm +RUN sudo apt-get install -y gcc-arm-linux-gnueabi gcc-powerpc64le-linux-gnu gcc +RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50 +RUN sudo apt-get install -y wget +RUN wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz +RUN sudo mkdir /opt/cross +RUN sudo tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz +RUN wget ftp://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb +RUN sudo dpkg -i systemsim-p8_1.0-2_amd64.deb +RUN sudo apt-get -y install eatmydata +RUN sudo eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 +COPY . /build/ +WORKDIR /build +ENTRYPOINT ./opal-ci/build-ubuntu-12.04.sh diff --git a/opal-ci/Dockerfile-ubuntu-16.04 b/opal-ci/Dockerfile-ubuntu-16.04 new file mode 100644 index 0000000..2fb299b --- /dev/null +++ b/opal-ci/Dockerfile-ubuntu-16.04 @@ -0,0 +1,12 @@ +FROM ubuntu:16.04 +RUN apt-get update -qq +RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc +RUN apt-get install -y wget xterm +RUN apt-get install -y gcc-arm-linux-gnueabi +RUN wget ftp://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb +RUN dpkg -i systemsim-p8_1.0-2_amd64.deb +RUN apt-get -y install eatmydata +RUN eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind +COPY . /build/ +WORKDIR /build +ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh diff --git a/opal-ci/Dockerfile-ubuntu-latest b/opal-ci/Dockerfile-ubuntu-latest new file mode 100644 index 0000000..28fb904 --- /dev/null +++ b/opal-ci/Dockerfile-ubuntu-latest @@ -0,0 +1,12 @@ +FROM ubuntu:latest +RUN apt-get update -qq +RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc +RUN apt-get install -y wget xterm +RUN apt-get install -y gcc-arm-linux-gnueabi +RUN wget ftp://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb +RUN dpkg -i systemsim-p8_1.0-2_amd64.deb +RUN apt-get -y install eatmydata +RUN eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind +COPY . /build/ +WORKDIR /build +ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh diff --git a/opal-ci/build-centos6.sh b/opal-ci/build-centos6.sh new file mode 100755 index 0000000..25a25f2 --- /dev/null +++ b/opal-ci/build-centos6.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -uo pipefail +set -e + +# We're fairly limited as to what we want to bother to run on CentOS6 +# It's fairly old and some of the things (e.g. build+run qemu) we don't +# want to bother doing. + +export CROSS=/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux- + +MAKE_J=`grep -c processor /proc/cpuinfo` + +make -j${MAKE_J} all +# Disable 'make check' for now, some errors with gcc 4.ancient +#make -j${MAKE_J} check +#(make clean; cd external/gard && CROSS= make -j${MAKE_J}) +#(cd external/pflash; make -j${MAKE_J}) +make clean +SKIBOOT_GCOV=1 make -j${MAKE_J} +#SKIBOOT_GCOV=1 make -j${MAKE_J} check + +make clean +rm -rf builddir +mkdir builddir +make SRC=`pwd` -f ../Makefile -C builddir -j${MAKE_J} +make clean diff --git a/opal-ci/build-fedora24.sh b/opal-ci/build-fedora24.sh new file mode 100755 index 0000000..609ee4a --- /dev/null +++ b/opal-ci/build-fedora24.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -x + +MAKE_J=`grep -c processor /proc/cpuinfo` +export CROSS=powerpc64-linux-gnu- + +make -j${MAKE_J} all +make -j${MAKE_J} check +(make clean; cd external/gard && CROSS= make -j${MAKE_J}) +(cd external/pflash; make -j${MAKE_J}) +make clean +# Disable GCOV builds on Fedora 24 as toolchain gives us: +# /usr/bin/powerpc64-linux-gnu-ld: section .bss VMA [0000000000200000,000000000024d757] overlaps section .sym_map VMA [000000000019f340,0000000000208e5c] +# (we shoud fix it, but not yet) +#SKIBOOT_GCOV=1 make -j${MAKE_J} +#SKIBOOT_GCOV=1 make -j${MAKE_J} check + +make clean +rm -rf builddir +mkdir builddir +make SRC=`pwd` -f ../Makefile -C builddir -j${MAKE_J} +make clean diff --git a/opal-ci/build-ubuntu-12.04.sh b/opal-ci/build-ubuntu-12.04.sh new file mode 100755 index 0000000..224d305 --- /dev/null +++ b/opal-ci/build-ubuntu-12.04.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -uo pipefail +set -e + +export CROSS=/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux- +export HOSTCC=gcc-4.8 +MAKE_J=`grep -c processor /proc/cpuinfo` + +make -j${MAKE_J} all +(cd opal-ci; ./build-qemu-powernv.sh) +./opal-ci/fetch-debian-jessie-installer.sh +make -j${MAKE_J} check +(make clean; cd external/gard && CROSS= make -j${MAKE_J}) +(cd external/pflash; ./build-all-arch.sh) +make clean +SKIBOOT_GCOV=1 make -j${MAKE_J} +SKIBOOT_GCOV=1 make -j${MAKE_J} check + +make clean +rm -rf builddir +mkdir builddir +make SRC=`pwd` -f ../Makefile -C builddir -j${MAKE_J} +make clean diff --git a/opal-ci/build-ubuntu-16.04.sh b/opal-ci/build-ubuntu-16.04.sh new file mode 100755 index 0000000..8352be8 --- /dev/null +++ b/opal-ci/build-ubuntu-16.04.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -uo pipefail +set -e + +MAKE_J=`grep -c processor /proc/cpuinfo` + +export CROSS=powerpc64le-linux-gnu- + +make -j${MAKE_J} all +(cd opal-ci; ./build-qemu-powernv.sh) +./opal-ci/fetch-debian-jessie-installer.sh +make -j${MAKE_J} check +(make clean; cd external/gard && CROSS= make -j${MAKE_J}) +(cd external/pflash; ./build-all-arch.sh) +make clean +SKIBOOT_GCOV=1 make -j${MAKE_J} +SKIBOOT_GCOV=1 make -j${MAKE_J} check + +make clean +rm -rf builddir +mkdir builddir +make SRC=`pwd` -f ../Makefile -C builddir -j${MAKE_J} +make clean |