From 9658d0dc17c270138523c41a982425e276b24271 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 9 Aug 2023 10:59:43 +0100 Subject: [PATCH] ci: Run "macOS native x86_64" job on GitHub Actions Also, the "macOS native arm64" task has been removed from Cirrus CI. --- .cirrus.yml | 17 ------ .github/workflows/ci.yml | 59 +++++++++++++++++++ ...ve_arm64.sh => 00_setup_env_mac_native.sh} | 6 +- 3 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/ci.yml rename ci/test/{00_setup_env_mac_native_arm64.sh => 00_setup_env_mac_native.sh} (81%) diff --git a/.cirrus.yml b/.cirrus.yml index 4a6e73ac85b..cf68110ec1b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -334,20 +334,3 @@ task: env: MACOS_SDK: "Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers" << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - -task: - name: 'macOS 13 native arm64 [gui, sqlite only] [no depends]' - macos_instance: - # Use latest image, but hardcode version to avoid silent upgrades (and breaks) - image: ghcr.io/cirruslabs/macos-ventura-xcode:14.3.1 # https://cirrus-ci.org/guide/macOS - << : *BASE_TEMPLATE - check_clang_script: - - clang --version - brew_install_script: - - brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt - << : *MAIN_TEMPLATE - env: - << : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV - CI_USE_APT_INSTALL: "no" - PACKAGE_MANAGER_INSTALL: "echo" # Nothing to do - FILE_ENV: "./ci/test/00_setup_env_mac_native_arm64.sh" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..f6d22f033fe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +# Copyright (c) 2023 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +name: CI +on: + # See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request. + pull_request: + # See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push. + push: + branches: + - '**' + tags-ignore: + - '**' + +env: + DANGER_RUN_CI_ON_HOST: 1 + TEST_RUNNER_TIMEOUT_FACTOR: 40 + +jobs: + macos-native-x86_64: + name: macOS 13 native, x86_64 [no depends, sqlite only, gui] + # Use latest image, but hardcode version to avoid silent upgrades (and breaks). + # See: https://github.com/actions/runner-images#available-images. + runs-on: macos-13 + + # No need to run on the read-only mirror, unless it is a PR. + if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request' + + timeout-minutes: 120 + + env: + MAKEJOBS: '-j4' + CI_USE_APT_INSTALL: 'no' + PACKAGE_MANAGER_INSTALL: 'echo' # Nothing to do + FILE_ENV: './ci/test/00_setup_env_mac_native.sh' + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Clang version + run: clang --version + + - name: Install Homebrew packages + run: brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt + + - name: Set Ccache directory + run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" + + - name: Ccache cache + uses: actions/cache@v3 + with: + path: ${{ env.CCACHE_DIR }} + key: ${{ github.job }}-ccache-cache-${{ github.run_id }} + restore-keys: ${{ github.job }}-ccache-cache + + - name: CI script + run: ./ci/test_run_all.sh diff --git a/ci/test/00_setup_env_mac_native_arm64.sh b/ci/test/00_setup_env_mac_native.sh similarity index 81% rename from ci/test/00_setup_env_mac_native_arm64.sh rename to ci/test/00_setup_env_mac_native.sh index eee72db4354..c9f65bf397b 100755 --- a/ci/test/00_setup_env_mac_native_arm64.sh +++ b/ci/test/00_setup_env_mac_native.sh @@ -1,18 +1,18 @@ #!/usr/bin/env bash # -# Copyright (c) 2019-2022 The Bitcoin Core developers +# Copyright (c) 2019-present 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 HOST=arm64-apple-darwin +export HOST=x86_64-apple-darwin export PIP_PACKAGES="zmq" export GOAL="install" export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" -export CCACHE_MAXSIZE=300M +export CCACHE_MAXSIZE=400M export RUN_FUZZ_TESTS=true export FUZZ_TESTS_CONFIG="--exclude banman" # https://github.com/bitcoin/bitcoin/issues/27924