Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Workaround for build-dep conflicts on macOS. #906

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/scripts/homebrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ dependencies=(
sdl2_mixer
)

function cleanup_python() {
# Workaround for sdl2_mixer, installs a new Python version
# that fails to clean up state of the old one.
rm -rf \
/usr/local/bin/{2to3*,idle3*,pydoc3*,python3*} \
/usr/local/share/man/man1/python3* \
/usr/local/lib/pkgconfig/python3* \
/usr/local/Frameworks/Python.framework
}

function install_arm64() {
export CPU="arm64"
Expand All @@ -41,6 +50,8 @@ function install_arm64() {
export HOMEBREW_NO_INSTALL_CLEANUP="true"
export HOMEBREW_DIR="/Users/runner/Library/Caches/Homebrew/downloads"

cleanup_python

brew reinstall --quiet pkg-config
brew fetch --force --bottle-tag=arm64_sonoma "${dependencies[@]}"

Expand All @@ -52,7 +63,11 @@ function install_arm64() {

function install_intel() {
export CPU="x86_64"
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK="true"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used in the arm64 case already, avoids wasting time on updating unrelated packages.

export HOMEBREW_NO_INSTALL_CLEANUP="true"

cleanup_python

brew reinstall --quiet pkg-config
brew install --quiet "${dependencies[@]}"
}
Expand Down
Loading