Skip to content

Commit bd55b7a

Browse files
committed
Merge bitcoin/bitcoin#29610: ci: Fix "macOS native" job
acc06bc ci, macos: Use `--break-system-packages` with Homebrew's python (Hennadii Stepanov) ae5f720 ci: Add workaround for Homebrew's python link error (Hennadii Stepanov) Pull request description: Homebrew [promoted](Homebrew/homebrew-core#150390) `python@3.12` to the default `python3`. Now, our "macOS native" CI job is facing the following issues: 1. Installing `qt@5` [requires](https://github.com/bitcoin/bitcoin/actions/runs/8216848118/job/22471875454#step:4:51) re-installing `python@3.12`: ``` ==> Fetching dependencies for qt@5: readline, python@3.12 and gettext ``` 2. Re-installing `python@3.12` [fails](https://github.com/bitcoin/bitcoin/actions/runs/8216848118/job/22471875454#step:4:127) due to symbolic link conflicts on macOS `x86_64`: ``` ==> Pouring python@3.12--3.12.2_1.ventura.bottle.tar.gz Error: The `brew link` step did not complete successfully ``` 3. Homebrew's `python@3.12` is marked as externally managed (according to PEP 668), necessitating different approaches for installing Python packages. This pull request resolves all the issues mentioned above. ACKs for top commit: m3dwards: reACK bitcoin/bitcoin@acc06bc to get the CI passing again. Tree-SHA512: 82cf72bff328f1e0725342431ac14ad4bae7a758186d97db6c7a558e4b661dcbf3fabe536978e26e709c5f6f7f5c11aac46642634c6685f1291592d8d825ad87
2 parents 31be1a4 + acc06bc commit bd55b7a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ jobs:
9696
- name: Install Homebrew packages
9797
env:
9898
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
99-
run: brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
99+
run: |
100+
# A workaround for "The `brew link` step did not complete successfully" error.
101+
brew install python@3 || brew link --overwrite python@3
102+
brew install automake libtool pkg-config gnu-getopt ccache boost libevent miniupnpc libnatpmp zeromq qt@5 qrencode
100103
101104
- name: Set Ccache directory
102105
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV"

ci/test/00_setup_env_mac_native.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
export LC_ALL=C.UTF-8
88

99
export HOST=x86_64-apple-darwin
10-
export PIP_PACKAGES="zmq"
10+
# Homebrew's python@3.12 is marked as externally managed (PEP 668).
11+
# Therefore, `--break-system-packages` is needed.
12+
export PIP_PACKAGES="--break-system-packages zmq"
1113
export GOAL="install"
1214
export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports"
1315
export CI_OS_NAME="macos"

0 commit comments

Comments
 (0)