Skip to content

Commit

Permalink
travis: enable ccache
Browse files Browse the repository at this point in the history
Primarily this combats the long time it takes to build qemu in
our build scripts. Practically, cuts a couple of minutes from build.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
stewartsmith committed Nov 24, 2016
1 parent fc930a3 commit 93a2743
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
@@ -1,5 +1,7 @@
language: c

cache: ccache

env:
matrix:
- RUN_ON_CONTAINER=ubuntu-12.04
Expand Down Expand Up @@ -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 &&
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion opal-ci/Dockerfile-ubuntu-12.04
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
2 changes: 2 additions & 0 deletions opal-ci/build-qemu-powernv.sh
Expand Up @@ -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`

0 comments on commit 93a2743

Please sign in to comment.