Prepare brew cache before upload.

This commit is contained in:
Roman Telezhynskyi 2021-09-25 08:50:43 +03:00
parent 888b40817c
commit d7c25f370e

View File

@ -75,6 +75,12 @@ macos_task_template: &MACOS_TASK_TEMPLATE
- make -j$(nproc) - make -j$(nproc)
deploy_script: deploy_script:
- $CIRRUS_WORKING_DIR/scripts/cirrus-deploy.sh - $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: env:
COMPILER: clang COMPILER: clang