From ae5f72027f1776f815a6637c594f0f725a6ccb55 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 10 Mar 2024 13:08:42 +0000 Subject: [PATCH 1/2] ci: Add workaround for Homebrew's python link error Promoting Homebrew's python@3.12 to the default python3 breaks symbolic links on macOS x86_64. This change adds a workaround for that issue. Also see: https://github.com/actions/runner-images/issues/9471 etc. --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a86b00fdc6f..77e4597b6d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,7 +96,10 @@ jobs: - name: Install Homebrew packages env: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 - run: brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode + run: | + # A workaround for "The `brew link` step did not complete successfully" error. + brew install python@3 || brew link --overwrite python@3 + brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode - name: Set Ccache directory run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" From acc06bc91f80ddf4e015dcdf0b984bbdbfcb5ca3 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 10 Mar 2024 13:09:03 +0000 Subject: [PATCH 2/2] ci, macos: Use `--break-system-packages` with Homebrew's python Homebrew's python@3.12 is marked as externally managed (PEP 668), necessitating different approaches for installing Python packages. For more details, please refer to https://github.com/orgs/Homebrew/discussions/3404. --- ci/test/00_setup_env_mac_native.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_mac_native.sh b/ci/test/00_setup_env_mac_native.sh index 439fba16efd..c47f13f96ed 100755 --- a/ci/test/00_setup_env_mac_native.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -7,7 +7,9 @@ export LC_ALL=C.UTF-8 export HOST=x86_64-apple-darwin -export PIP_PACKAGES="zmq" +# Homebrew's python@3.12 is marked as externally managed (PEP 668). +# Therefore, `--break-system-packages` is needed. +export PIP_PACKAGES="--break-system-packages zmq" export GOAL="install" export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports" export CI_OS_NAME="macos"