From d7c25f370e64d860967bc7c455c9e85e5867e1d1 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 25 Sep 2021 08:50:43 +0300 Subject: [PATCH] Prepare brew cache before upload. --- .cirrus.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 46aa1ff9f..de179d023 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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