From ebc2bb77d83accfb445a553201fb653fa3b79cf3 Mon Sep 17 00:00:00 2001 From: Bindea Cristian Date: Fri, 20 Sep 2024 15:10:10 +0300 Subject: [PATCH] ci/macOS: on macOS 12 do not upgrade existing packages Signed-off-by: Bindea Cristian --- ci/macOS/install_macos_deps.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ci/macOS/install_macos_deps.sh b/ci/macOS/install_macos_deps.sh index 3b0df3a357..3661118721 100755 --- a/ci/macOS/install_macos_deps.sh +++ b/ci/macOS/install_macos_deps.sh @@ -22,9 +22,16 @@ install_packages() { rm /usr/local/bin/python3-config || true brew update - brew upgrade || true #ignore homebrew upgrade errors + # Workaround for brew taking a long time to upgrade existing packages + # Check if macOS version and upgrade packages only if the version is greater than 12 + if (( $(echo "$(sw_vers -productVersion) > 12.0" | bc -1) )); then + brew upgrade --display-times || true #ignore homebrew upgrade errors + brew install --display-times $PACKAGES + else + HOMEBREW_NO_AUTO_UPDATE=1 brew install --display-times $PACKAGES + fi + brew search ${QT_FORMULAE} - brew install --display-times $PACKAGES for pkg in gcc bison gettext cmake python; do brew link --overwrite --force $pkg done