Skip to content

Commit b8cf7b7

Browse files
authored
Merge pull request ElementsProject#1412 from psgreco/master-fix-macos
CI: Fix macos native build
2 parents 8a948be + 49f151f commit b8cf7b7

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

.cirrus.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,30 @@ base_template: &BASE_TEMPLATE
3535

3636
main_template: &MAIN_TEMPLATE
3737
timeout_in: 120m # https://cirrus-ci.org/faq/#instance-timed-out
38+
ccache_cache:
39+
folder: "/tmp/ccache_dir"
40+
ci_script:
41+
- ./ci/test_run_all.sh
42+
43+
global_task_template: &GLOBAL_TASK_TEMPLATE
44+
<< : *BASE_TEMPLATE
3845
container:
3946
# https://cirrus-ci.org/faq/#are-there-any-limits
4047
# Each project has 16 CPU in total, assign 2 to each container, so that 8 tasks run in parallel
4148
cpu: 2
4249
greedy: true
4350
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
44-
ccache_cache:
45-
folder: "/tmp/ccache_dir"
4651
depends_built_cache:
4752
folder: "depends/built"
4853
fingerprint_script: echo $CIRRUS_TASK_NAME $(git rev-list -1 HEAD ./depends)
49-
ci_script:
50-
- ./ci/test_run_all.sh
54+
<< : *MAIN_TEMPLATE
5155

52-
global_task_template: &GLOBAL_TASK_TEMPLATE
56+
macos_native_task_template: &MACOS_NATIVE_TASK_TEMPLATE
5357
<< : *BASE_TEMPLATE
58+
check_clang_script:
59+
- clang --version
60+
brew_install_script:
61+
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
5462
<< : *MAIN_TEMPLATE
5563

5664
compute_credits_template: &CREDITS_TEMPLATE
@@ -287,18 +295,16 @@ task:
287295
FILE_ENV: "./ci/test/00_setup_env_mac.sh"
288296

289297
task:
290-
name: 'macOS 12 native [gui, system sqlite only] [no depends]'
291-
brew_install_script:
292-
- brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt
293-
<< : *GLOBAL_TASK_TEMPLATE
298+
name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]'
294299
macos_instance:
295300
# Use latest image, but hardcode version to avoid silent upgrades (and breaks)
296-
image: monterey-xcode-13.2 # https://cirrus-ci.org/guide/macOS
301+
image: ghcr.io/cirruslabs/macos-ventura-xcode:14.1 # https://cirrus-ci.org/guide/macOS
302+
<< : *MACOS_NATIVE_TASK_TEMPLATE
297303
env:
298304
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
299305
CI_USE_APT_INSTALL: "no"
300306
PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do
301-
FILE_ENV: "./ci/test/00_setup_env_mac_host.sh"
307+
FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh"
302308

303309
task:
304310
name: 'ARM64 Android APK [focal]'
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export HOST=x86_64-apple-darwin
10-
export PIP_PACKAGES="zmq lief"
9+
export HOST=arm64-apple-darwin
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
# ELEMENTS: add -fno-stack-check to work around clang bug on macos
13-
export BITCOIN_CONFIG="--with-gui --enable-reduce-exports CXXFLAGS=-fno-stack-check"
15+
export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports CXXFLAGS=-fno-stack-check"
1416
export CI_OS_NAME="macos"
1517
export NO_DEPENDS=1
1618
export OSX_SDK=""
1719
export CCACHE_SIZE=300M
18-
export RUN_SECURITY_TESTS="true"

ci/test/04_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ if [[ $QEMU_USER_CMD == qemu-s390* ]]; then
1111
fi
1212

1313
if [ "$CI_OS_NAME" == "macos" ]; then
14-
sudo -H pip3 install --upgrade pip
14+
sudo -H pip3 install --upgrade --break-system-packages pip
1515
# shellcheck disable=SC2086
16-
IN_GETOPT_BIN="/usr/local/opt/gnu-getopt/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
16+
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
1717
fi
1818

1919
# Create folders that are mounted into the docker

0 commit comments

Comments
 (0)