aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Jodoin <dominic@travis-ci.com>2018-12-10 12:58:45 -0500
committerGitHub <noreply@github.com>2018-12-10 12:58:45 -0500
commitb5c08cb9f4f1673bd943cbaea87b827c228d08e6 (patch)
tree1f154d82c36906af10e3761c9fac394358539aba
parent695cf7c96249de50360a7d2951dc88eb3aea0695 (diff)
downloadgoogletest-b5c08cb9f4f1673bd943cbaea87b827c228d08e6.tar.gz
googletest-b5c08cb9f4f1673bd943cbaea87b827c228d08e6.tar.bz2
googletest-b5c08cb9f4f1673bd943cbaea87b827c228d08e6.zip
Cache gcc and clang APT packages
-rw-r--r--.travis.yml21
1 files changed, 18 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 2b0ac21a..2bcf752f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -44,6 +44,17 @@ matrix:
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
if: type != pull_request
+before_install:
+ - |
+ if [ ! -f ${TRAVIS_BUILD_DIR}/apt-cache/pkgcache.bin ]; then
+ mkdir -p ${TRAVIS_BUILD_DIR}/apt-cache/archives/partial
+ mkdir -p ${TRAVIS_BUILD_DIR}/apt-cache/partial
+ mkdir -p ${TRAVIS_BUILD_DIR}/apt-cache/lists
+ sudo apt-get -y -o Dir::cache=${TRAVIS_BUILD_DIR}/apt-cache -o Dir::State::Lists=${TRAVIS_BUILD_DIR}/apt-cache/lists update
+ sudo apt-get install --download-only -o Dir::cache=${TRAVIS_BUILD_DIR}/apt-cache -o Dir::State::Lists=${TRAVIS_BUILD_DIR}/apt-cache/lists g++-4.9 clang-3.9
+ fi
+ - sudo apt-get install --no-download -o Dir::cache=${TRAVIS_BUILD_DIR}/apt-cache -o Dir::State::Lists=${TRAVIS_BUILD_DIR}/apt-cache/lists g++-4.9 clang-3.9
+
# These are the install and build (script) phases for the most common entries in the matrix. They could be included
# in each entry in the matrix, but that is just repetitive.
install:
@@ -63,9 +74,13 @@ addons:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
- packages:
- - g++-4.9
- - clang-3.9
+
+before_cache:
+ - sudo chown -R $USER ${TRAVIS_BUILD_DIR}/apt-cache
+
+cache:
+ directories:
+ - apt-cache
notifications:
email: false