From 2b04e6b5eccb6ec1f3c781d02c7e44da212d0102 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Sun, 1 Nov 2026 00:54:13 -0800 Subject: [PATCH] ci: Minor cleanups to make the logs cleaner and runs less flaky Only run brew update once as sometimes when we call it multiple times it causes lock contention issues. Also, make sure we don't call `brew uninstall` on packages (e.g. libiconv) unless it's already installed. --- .github/actions/universal-package/action.yml | 4 +--- .github/workflows/macvim-buildtest.yaml | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/universal-package/action.yml b/.github/actions/universal-package/action.yml index 81a4532dee..f93253900d 100644 --- a/.github/actions/universal-package/action.yml +++ b/.github/actions/universal-package/action.yml @@ -33,8 +33,6 @@ runs: # Need to make sure we get the latest before patching. Otherwise Homebrew may later try to get the latest # version and stomp what we have here. - brew update - brew cat ${formula} >${formula}.rb if [[ "${{ inputs.gnuiconv }}" == "true" ]]; then @@ -63,7 +61,7 @@ runs: brew trust macvim-dev/deps # Uninstall the already installed formula because we want to build our own - brew uninstall --ignore-dependencies ${formula} || true + brew list ${formula} &> /dev/null && brew uninstall --ignore-dependencies ${formula} ; true # Extract Xcode version to serve as part of the key for caching xcode_version=$(xcodebuild -version | tail -1 | sed -E 's/Build version (.*)/\1/') diff --git a/.github/workflows/macvim-buildtest.yaml b/.github/workflows/macvim-buildtest.yaml index 2d3b0b131b..046dea0d5b 100644 --- a/.github/workflows/macvim-buildtest.yaml +++ b/.github/workflows/macvim-buildtest.yaml @@ -89,6 +89,10 @@ jobs: xcode-select -p xcodebuild -version + - if: inputs.publish + run: | + brew update # Just run this once in the beginning of the run + # Set up, install, and cache GNU libiconv library to work around Apple iconv issues in newer macOS versions. - name: Set up libiconv