Fixes #636
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2023-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. | |
name: CI | |
on: | |
# See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request. | |
pull_request: | |
# See: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push. | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
concurrency: | |
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }} | |
cancel-in-progress: true | |
env: | |
CI_FAILFAST_TEST_LEAVE_DANGLING: 1 # GHA does not care about dangling processes and setting this variable avoids killing the CI script itself on error | |
MAKEJOBS: '-j10' | |
jobs: | |
macos-native-arm64: | |
name: ${{ matrix.job-name }} | |
# Use any image to support the xcode-select below, but hardcode version to avoid silent upgrades (and breaks). | |
# See: https://github.com/actions/runner-images#available-images. | |
runs-on: macos-14 | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
job-type: [standard] | |
include: | |
- job-type: standard | |
file-env: './ci/test/00_setup_env_mac_native.sh' | |
job-name: 'macOS 14 native, arm64, no depends, sqlite only, gui' | |
env: | |
DANGER_RUN_CI_ON_HOST: 1 | |
BASE_ROOT_DIR: ${{ github.workspace }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Clang version | |
run: | | |
# Use the earliest Xcode supported by the version of macOS denoted in | |
# doc/release-notes-empty-template.md and providing at least the | |
# minimum clang version denoted in doc/dependencies.md. | |
# See: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes | |
sudo xcode-select --switch /Applications/Xcode_15.0.app | |
clang --version | |
- name: Install Homebrew packages | |
env: | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
run: | | |
# A workaround for "The `brew link` step did not complete successfully" error. | |
brew install --quiet python@3 || brew link --overwrite python@3 | |
brew install --quiet coreutils ninja pkgconf gnu-getopt ccache boost libevent zeromq qt@5 qrencode | |
- name: Set Ccache directory | |
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" | |
- name: Restore Ccache cache | |
id: ccache-cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }} | |
restore-keys: ${{ github.job }}-${{ matrix.job-type }}-ccache- | |
- name: CI script | |
run: ./ci/test_run_all.sh | |
env: | |
FILE_ENV: ${{ matrix.file-env }} | |
- name: Save Ccache cache | |
uses: actions/cache/save@v4 | |
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache | |
key: ${{ github.job }}-${{ matrix.job-type }}-ccache-${{ github.run_id }} | |
asan-lsan-ubsan-integer-no-depends-usdt: | |
name: 'ASan + LSan + UBSan + integer, no depends, USDT' | |
runs-on: ubuntu-24.04 # has to match container in ci/test/00_setup_env_native_asan.sh for tracing tools | |
timeout-minutes: 120 | |
env: | |
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh" | |
DANGER_CI_ON_HOST_FOLDERS: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set CI directories | |
run: | | |
echo "CCACHE_DIR=${{ runner.temp }}/ccache_dir" >> "$GITHUB_ENV" | |
echo "BASE_ROOT_DIR=${{ runner.temp }}" >> "$GITHUB_ENV" | |
echo "BASE_BUILD_DIR=${{ runner.temp }}/build-asan" >> "$GITHUB_ENV" | |
- name: Restore Ccache cache | |
id: ccache-cache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ github.job }}-ccache-${{ github.run_id }} | |
restore-keys: ${{ github.job }}-ccache- | |
- name: Enable bpfcc script | |
# In the image build step, no external environment variables are available, | |
# so any settings will need to be written to the settings env file: | |
run: sed -i "s|\${INSTALL_BCC_TRACING_TOOLS}|true|g" ./ci/test/00_setup_env_native_asan.sh | |
- name: CI script | |
run: ./ci/test_run_all.sh | |
- name: Save Ccache cache | |
uses: actions/cache/save@v4 | |
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache | |
key: ${{ github.job }}-ccache-${{ github.run_id }} |