diff --git a/.travis.yml b/.travis.yml index 87e4ec2f3d8a..a986d07d7c94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: c +cache: ccache + env: matrix: - RUN_ON_CONTAINER=ubuntu-12.04 @@ -28,7 +30,7 @@ before_install: script: - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then docker build -t ${RUN_ON_CONTAINER} -f opal-ci/Dockerfile-${RUN_ON_CONTAINER} . && - docker run --rm -t $RUN_ON_CONTAINER; + docker run --volume $HOME/.ccache:/root/.ccache --rm -t $RUN_ON_CONTAINER; fi - if [ ${COVERITY_SCAN_BRANCH} == 1 ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && diff --git a/opal-ci/Dockerfile-centos6 b/opal-ci/Dockerfile-centos6 index 5cd9a7a49898..d4cf436382c1 100644 --- a/opal-ci/Dockerfile-centos6 +++ b/opal-ci/Dockerfile-centos6 @@ -1,6 +1,6 @@ FROM centos:6 RUN yum -y update && yum clean all -RUN yum -y install wget xterm gcc git xz +RUN yum -y install wget xterm gcc git xz ccache 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 diff --git a/opal-ci/Dockerfile-centos7 b/opal-ci/Dockerfile-centos7 index c9d4c87b4407..47e9138dcec8 100644 --- a/opal-ci/Dockerfile-centos7 +++ b/opal-ci/Dockerfile-centos7 @@ -1,6 +1,6 @@ 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 yum -y install wget xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache 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 diff --git a/opal-ci/Dockerfile-fedora24 b/opal-ci/Dockerfile-fedora24 index 7caa88419ed0..d92affd397da 100644 --- a/opal-ci/Dockerfile-fedora24 +++ b/opal-ci/Dockerfile-fedora24 @@ -1,5 +1,5 @@ FROM fedora:24 -RUN dnf -y install wget xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel +RUN dnf -y install wget xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache RUN dnf -y install gcc-powerpc64-linux-gnu COPY . /build/ WORKDIR /build diff --git a/opal-ci/Dockerfile-ubuntu-12.04 b/opal-ci/Dockerfile-ubuntu-12.04 index 42026a24ce83..fd7bd093a552 100644 --- a/opal-ci/Dockerfile-ubuntu-12.04 +++ b/opal-ci/Dockerfile-ubuntu-12.04 @@ -3,7 +3,7 @@ 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-4.8 libstdc++6 valgrind expect xterm ccache 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 diff --git a/opal-ci/Dockerfile-ubuntu-16.04 b/opal-ci/Dockerfile-ubuntu-16.04 index 2fb299be5a15..8dea58de2a4d 100644 --- a/opal-ci/Dockerfile-ubuntu-16.04 +++ b/opal-ci/Dockerfile-ubuntu-16.04 @@ -1,6 +1,6 @@ FROM ubuntu:16.04 RUN apt-get update -qq -RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc +RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc ccache 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 diff --git a/opal-ci/Dockerfile-ubuntu-latest b/opal-ci/Dockerfile-ubuntu-latest index 28fb904860af..683a5a187eb2 100644 --- a/opal-ci/Dockerfile-ubuntu-latest +++ b/opal-ci/Dockerfile-ubuntu-latest @@ -1,6 +1,6 @@ FROM ubuntu:latest RUN apt-get update -qq -RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc +RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc ccache 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 diff --git a/opal-ci/build-qemu-powernv.sh b/opal-ci/build-qemu-powernv.sh index 3b0385360e65..cbd72d37b55d 100755 --- a/opal-ci/build-qemu-powernv.sh +++ b/opal-ci/build-qemu-powernv.sh @@ -4,5 +4,7 @@ set -e git clone --depth=1 -b qemu-powernv-for-skiboot-3 git://github.com/open-power/qemu.git cd qemu git submodule update --init dtc +export CC="ccache gcc" +export CXX="ccache g++" ./configure --target-list=ppc64-softmmu --disable-werror make -j `grep -c processor /proc/cpuinfo`