Don't upgrade homebrew packages in CI (#80443)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 10 Jan 2023 17:57:38 +0000 (18:57 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Jan 2023 17:57:38 +0000 (18:57 +0100)
Fixes https://github.com/dotnet/runtime/issues/80428, originally caused by https://github.com/actions/setup-python/issues/577 and https://github.com/actions/runner-images/issues/6868

eng/install-native-dependencies.sh

index a0b0b16..a06ed1a 100755 (executable)
@@ -24,7 +24,10 @@ if [ "$os" = "linux" ] && { [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; }
 elif [ "$os" = "maccatalyst" ] || [ "$os" = "osx" ] || [ "$os" = "macos" ] || [ "$os" = "tvos" ] || [ "$os" = "ios" ]; then
     echo "Installed xcode version: $(xcode-select -p)"
 
-    brew update --preinstall
+    export HOMEBREW_NO_INSTALL_CLEANUP=1
+    export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
+    # Skip brew update for now, see https://github.com/actions/setup-python/issues/577
+    # brew update --preinstall
     brew bundle --no-upgrade --no-lock --file "$(dirname "$0")/Brewfile"
 else
     echo "Must pass 'Linux', 'macOS', 'maccatalyst', 'iOS' or 'tvOS' as first argument."