Cache for Homebrew. [skip appveyor]

This commit is contained in:
Roman Telezhynskyi 2020-11-16 10:46:14 +02:00
parent 6645ac228c
commit e658e76bfc

View File

@ -30,12 +30,25 @@ jobs:
- DEPLOY=true - DEPLOY=true
- LEGACY=false - LEGACY=false
osx_image: xcode11 osx_image: xcode11
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
- os: osx - os: osx
compiler: clang compiler: clang
env: env:
- DEPLOY=true - DEPLOY=true
- LEGACY=true - LEGACY=true
osx_image: xcode9.2 osx_image: xcode9.2
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
# Credit https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/9
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
before_install: before_install:
- | - |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
@ -63,6 +76,7 @@ before_install:
else else
unset SSL_CERT_FILE; unset SSL_CERT_FILE;
brew tap-new ${USER}/local-qt; brew tap-new ${USER}/local-qt;
brew update > /dev/null;
brew extract --version 5.11 qt ${USER}/local-qt; brew extract --version 5.11 qt ${USER}/local-qt;
brew install ${USER}/local-qt/qt@5.11; brew install ${USER}/local-qt/qt@5.11;
fi fi