diff options
author | Gennadiy Civil <gennadiycivil@users.noreply.github.com> | 2018-12-12 09:16:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 09:16:43 -0500 |
commit | b545089f511753905c0911d545ed2d25c867f563 (patch) | |
tree | 20d80ed8fd42162cad45fb5d8a4c58a8c5582597 | |
parent | 6cbd3753dc195595689a0fbb99e7297128a2ed26 (diff) | |
parent | 3b1f43c2e7a5ce49792f240488a9fcb7fe92d36c (diff) | |
download | googletest-b545089f511753905c0911d545ed2d25c867f563.tar.gz googletest-b545089f511753905c0911d545ed2d25c867f563.tar.bz2 googletest-b545089f511753905c0911d545ed2d25c867f563.zip |
Merge pull request #2004 from cotsog/patch-1
Cache gcc and clang APT packages
-rw-r--r-- | .travis.yml | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 2b0ac21a..8ea55db5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,18 @@ matrix: env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 if: type != pull_request +before_install: + - | + if [ "$TRAVIS_OS_NAME" != "osx" ] && [ ! -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 + - if [ "$TRAVIS_OS_NAME" != "osx" ]; then 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; fi + - if [ "$TRAVIS_OS_NAME" != "osx" ]; then sudo chown -R $USER ${TRAVIS_BUILD_DIR}/apt-cache; fi + # 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 +75,10 @@ addons: sources: - ubuntu-toolchain-r-test - llvm-toolchain-precise-3.9 - packages: - - g++-4.9 - - clang-3.9 + +cache: + directories: + - apt-cache notifications: email: false |