summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2019-12-10 09:44:14 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2019-12-10 11:43:40 +0100
commit82ac066f356aabe17c65dac0137dad2b903ff954 (patch)
tree68a29abaa18267e1de068c69d929a1ee471ff2e2 /.travis.yml
parent651cfe6936352bbbd85326e94aec09bdff6399f7 (diff)
.travis.yml: Enable caching for Homebrew to speed up builds
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml24
1 files changed, 23 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 282a640abf..b7fe0067d0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -73,6 +73,10 @@ jobs:
- name: OSX/clang/SCons build
os: osx
compiler: clang
+ cache:
+ directories:
+ - $HOME/Library/Caches/Homebrew
+ - /usr/local/Homebrew
# Workaround for bug in libopus's opus.h including <opus_multistream.h>
# instead of <opus/opus_multistream.h>.
# Virtual X (Xvfb) is needed for analyzer waveform tests
@@ -90,11 +94,22 @@ jobs:
# lldb doesn't provide an easy way to exit 1 on error:
# https://bugs.llvm.org/show_bug.cgi?id=27326
- lldb ./mixxx-test --batch -o run -o quit -k 'thread backtrace all' -k "script import os; os._exit(1)"
+ before_cache:
+ # Avoid indefinite cache growth
+ - brew cleanup
+ # Cache only .git files under "/usr/local/Homebrew" so "brew update"
+ # does not take 5min every build
+ # Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12
+ - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete
- name: OSX/clang/CMake build
os: osx
compiler: clang
- cache: ccache
+ cache:
+ ccache: true
+ directories:
+ - $HOME/Library/Caches/Homebrew
+ - /usr/local/Homebrew
# Workaround for bug in libopus's opus.h including <opus_multistream.h>
# instead of <opus/opus_multistream.h>.
# Virtual X (Xvfb) is needed for analyzer waveform tests
@@ -117,6 +132,13 @@ jobs:
# Run tests and benchmarks
- cmake --build . --target test
- cmake --build . --target benchmark
+ before_cache:
+ # Avoid indefinite cache growth
+ - brew cleanup
+ # Cache only .git files under "/usr/local/Homebrew" so "brew update"
+ # does not take 5min every build
+ # Source: https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/12
+ - find /usr/local/Homebrew \! -regex ".+\.git.+" -delete
git:
depth: 1