From 1b12e384a2ec81b945ec337ef74ceef0acfe32be Mon Sep 17 00:00:00 2001 From: pasta Date: Fri, 6 Oct 2023 12:42:59 -0500 Subject: [PATCH] ci: add aarch64 macos builds to ci --- .gitlab-ci.yml | 18 ++++++++++++++++-- ci/dash/matrix.sh | 2 ++ ci/test/00_setup_env_arm_mac.sh | 17 +++++++++++++++++ ci/test/00_setup_env_arm_mac_host.sh | 19 +++++++++++++++++++ 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100755 ci/test/00_setup_env_arm_mac.sh create mode 100755 ci/test/00_setup_env_arm_mac_host.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4a4e68427..33c6c21a72 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ builder-image: before_script: - echo HOST=$HOST - | - if [ "$HOST" = "x86_64-apple-darwin" ]; then + if [ "$HOST" = "x86_64-apple-darwin" || "$HOST" = "aarch64-apple-darwin" ]; then mkdir -p depends/SDKs mkdir -p depends/sdk-sources OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz" @@ -218,7 +218,12 @@ x86_64-apple-darwin: variables: HOST: x86_64-apple-darwin -### +aarch64-apple-darwin: + extends: + - .build-depends-template + - .skip-in-fast-mode-template + variables: + HOST: aarch64-apple-darwin arm-linux-build: extends: .build-template @@ -324,6 +329,7 @@ linux64_multiprocess-build: # variables: # BUILD_TARGET: linux64_valgrind + mac-build: extends: - .build-template @@ -332,6 +338,14 @@ mac-build: - x86_64-apple-darwin variables: BUILD_TARGET: mac +arm-mac-build: + extends: + - .build-template + - .skip-in-fast-mode-template + needs: + - aarch64-apple-darwin + variables: + BUILD_TARGET: arm-mac ### diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index 82a9233df1..6b3ea12a33 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -40,6 +40,8 @@ elif [ "$BUILD_TARGET" = "linux64_valgrind" ]; then source ./ci/test/00_setup_env_native_valgrind.sh elif [ "$BUILD_TARGET" = "mac" ]; then source ./ci/test/00_setup_env_mac.sh +elif [ "$BUILD_TARGET" = "arm-mac" ]; then + source ./ci/test/00_setup_env_mac.sh elif [ "$BUILD_TARGET" = "s390x" ]; then source ./ci/test/00_setup_env_s390x.sh fi diff --git a/ci/test/00_setup_env_arm_mac.sh b/ci/test/00_setup_env_arm_mac.sh new file mode 100755 index 0000000000..95e56d7199 --- /dev/null +++ b/ci/test/00_setup_env_arm_mac.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019-2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export CONTAINER_NAME=ci_arm-macos_cross +export HOST=aarch64-apple-darwin +export PACKAGES="cmake libcap-dev libz-dev libbz2-dev python3-dev python3-setuptools" +export XCODE_VERSION=12.2 +export XCODE_BUILD_ID=12B45b +export RUN_UNIT_TESTS=false +export RUN_INTEGRATION_TESTS=false +export GOAL="all deploy" +export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --enable-werror" diff --git a/ci/test/00_setup_env_arm_mac_host.sh b/ci/test/00_setup_env_arm_mac_host.sh new file mode 100755 index 0000000000..e070cc32eb --- /dev/null +++ b/ci/test/00_setup_env_arm_mac_host.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019-2020 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +export LC_ALL=C.UTF-8 + +export CONTAINER_NAME=ci_arm-macos +export HOST=aarch64-apple-darwin +export PIP_PACKAGES="zmq lief" +export RUN_UNIT_TESTS=true +export RUN_INTEGRATION_TESTS=false +export RUN_SECURITY_TESTS="true" +export GOAL="install" +export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --enable-werror" +# Run without depends +export NO_DEPENDS=1 +export OSX_SDK=""