Skip to content

Commit 0bd90e8

Browse files
committed
MINOR: Don't install Homebrew's aws-sdk-cpp and gRPC for JNI macOS build
The "JNI macos-15-intel x86_64" job fails in "Install dependencies": ##[error]aws-sdk-cpp: no bottle available! ##[error]grpc: no bottle available! `brew bundle` failed! 2 Brewfile dependencies failed to install Homebrew treats x86_64 macOS as a tier 3 configuration and rarely publishes bottles for it. "brew bundle" doesn't build from source, so arrow/cpp/Brewfile can no longer be installed as-is. We don't use Homebrew's aws-sdk-cpp and gRPC anyway. The JNI build uses ARROW_DEPENDENCY_USE_SHARED=OFF and Homebrew provides only shared libraries for them, so we uninstall both just after "brew bundle". We skip installing them with HOMEBREW_BUNDLE_BREW_SKIP instead of installing and uninstalling them. "brew uninstall aws-sdk-cpp" needs "|| :" now because it's no longer installed by "brew bundle". It's still called because it may be pre-installed on GitHub Actions runner images.
1 parent a11339d commit 0bd90e8

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/rc.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,29 @@ jobs:
236236
brew uninstall pkg-config@0.29.2 || :
237237
fi
238238
239-
brew bundle --file=arrow/cpp/Brewfile
239+
# We don't use Homebrew's aws-sdk-cpp and gRPC. See the
240+
# "brew uninstall" calls below for details. So we don't install
241+
# them instead of installing and uninstalling them.
242+
#
243+
# This is also needed because Homebrew doesn't provide bottles
244+
# for them on x86_64 macOS. Homebrew treats x86_64 macOS as a
245+
# tier 3 configuration and rarely builds bottles for it:
246+
#
247+
# https://docs.brew.sh/Support-Tiers#tier-3
248+
#
249+
# "brew bundle" fails with "no bottle available!" without this
250+
# because it doesn't build them from source.
251+
HOMEBREW_BUNDLE_BREW_SKIP="aws-sdk-cpp grpc" \
252+
brew bundle --file=arrow/cpp/Brewfile
240253
# We want to link aws-sdk-cpp statically but Homebrew's
241254
# aws-sdk-cpp provides only shared library. If we have
242255
# Homebrew's aws-sdk-cpp, our build mix Homebrew's
243256
# aws-sdk-cpp and bundled aws-sdk-cpp. We uninstall Homebrew's
244257
# aws-sdk-cpp to ensure using only bundled aws-sdk-cpp.
245-
brew uninstall aws-sdk-cpp
258+
#
259+
# Homebrew's aws-sdk-cpp may be pre-installed on GitHub Actions
260+
# runner images even if we skip installing it above.
261+
brew uninstall aws-sdk-cpp || :
246262
# We want to use bundled RE2 for static linking. If
247263
# Homebrew's RE2 is installed, its header file may be used.
248264
# We uninstall Homebrew's RE2 to ensure using bundled RE2.

0 commit comments

Comments
 (0)