From fc8d6cf5e29c63221fd5b5c276180eb7f00778fd Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Fri, 27 Nov 2015 23:48:47 +0100
Subject: [PATCH] Improves travis-ci build time

- Compilation is cached with ccache
- Apt packages are cached too
- Make uses the `-j2` flag since the container has 2 cores
---
 .travis.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b822821c0b..cd5d60fffb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,12 +23,14 @@ addons:
       - dc
       - cabextract
 
-install:
-  - git clone `doc/repo REGRESSIONS`
+cache:
+  - ccache
+  - apt
 
 script:
+  - git clone --depth 1 `doc/repo REGRESSIONS`
   - ./configure --prefix=`pwd`/install > /dev/null
-  - make -s > /dev/null
+  - make -s -j2 > /dev/null
   - make install > /dev/null
   - export PATH=${TRAVIS_BUILD_DIR}/install/bin:${PATH}
   - export LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/install/lib:${LD_LIBRARY_PATH}