Prepare brew cache before upload.

develop
Roman Telezhynskyi 2021-09-25 08:50:43 +03:00
parent 888b40817c
commit d7c25f370e
1 changed files with 6 additions and 0 deletions

View File

@ -75,6 +75,12 @@ macos_task_template: &MACOS_TASK_TEMPLATE
- make -j$(nproc)
deploy_script:
- $CIRRUS_WORKING_DIR/scripts/cirrus-deploy.sh
before_cache_script:
- brew cleanup
# 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
- find /usr/local/Homebrew \! -regex ".+\.git.+" -delete
- find $HOME/Library/Caches/Homebrew \! -regex ".+\.git.+" -delete
env:
COMPILER: clang