Skip to content

Commit

Permalink
GHA: Workaround brew issue on OSX
Browse files Browse the repository at this point in the history
brew may fail to upgrade Python when there are symlinks from another
Python installation. So remove them when the install fails and try again.
  • Loading branch information
Flamefire committed Dec 22, 2022
1 parent f23b599 commit ac5ae7e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ci/setup_ccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ if ! command -v ccache &> /dev/null; then
sudo apt-get install ${NET_RETRY_COUNT:+ -o Acquire::Retries=$NET_RETRY_COUNT} -y ccache
elif command -v brew &> /dev/null; then
brew update > /dev/null
brew install ccache
if ! brew install ccache; then
# Workaround issue with unexpected symlinks: https://github.com/actions/runner-images/issues/6817
for f in 2to3 idle3 pydoc3 python3 python3-config; do
rm /usr/local/bin/$f || true
done
# Try again
brew install ccache
fi
fi
fi
ccache --set-config=cache_dir=${B2_CCACHE_DIR:-~/.ccache}
Expand Down

0 comments on commit ac5ae7e

Please sign in to comment.