Skip to content

CCACHE_COMPILERCHECK: '%compiler% -v' #518

CCACHE_COMPILERCHECK: '%compiler% -v'

CCACHE_COMPILERCHECK: '%compiler% -v' #518

Workflow file for this run

# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
name: CMake
on:
# Running for pushes is enough in the cmake-staging branch.
# pull_request:
push:
branches:
- '**'
tags-ignore:
- '**'
concurrency:
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
cancel-in-progress: true
env:
CCACHE_COMPILERCHECK: '%compiler% -v'
jobs:
macos-native-x86_64:
name: '${{ matrix.os.name }}, ${{ matrix.xcode.name }}'
runs-on: ${{ matrix.os.os }}
strategy:
fail-fast: false
matrix:
os:
- name: 'macOS 13 native, x86_64'
os: macos-13
- name: 'macOS 14 native, arm64'
os: macos-14
xcode:
- name: 'Xcode 14.3'
id: 'xcode-14.3'
path: '/Applications/Xcode_14.3.app'
# For -Wno-error=unreachable-code, please refer to https://github.com/bitcoin/bitcoin/issues/29334
configure_env: 'env CXXFLAGS="-Wno-error=unreachable-code"'
- name: 'Xcode 15.2'
id: 'xcode-15.2'
path: '/Applications/Xcode_15.2.app'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clang version, ${{ runner.arch }}
run: |
sudo xcode-select --switch ${{ matrix.xcode.path }}
clang --version
- name: Workaround for Homebrew python link
if: matrix.os.os == 'macos-13'
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew install python@3 || brew link --overwrite python@3
- name: Install Homebrew packages
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: |
brew install ccache cmake pkg-config boost libevent berkeley-db@4 qt@5 libnatpmp miniupnpc zeromq tree
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV"
- name: CMake version
run: |
cmake --version
ctest --version
- name: Restore Ccache cache
uses: actions/cache/restore@v4
id: ccache-cache
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.os.os }}-${{ matrix.xcode.id }}-ccache-${{ github.run_id }}
restore-keys: ${{ matrix.os.os }}-${{ matrix.xcode.id }}-ccache-
- name: Generate build system
run: |
${{ matrix.xcode.configure_env }} cmake -B build -DWERROR=ON
- name: Build
run: |
ccache --zero-stats
cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: Ccache stats
run: |
ccache --version | head -n 1
ccache --show-stats --verbose
- 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 }}
key: ${{ matrix.os.os }}-${{ matrix.xcode.id }}-ccache-${{ github.run_id }}
- name: Test
run: |
ctest --test-dir build -j $(sysctl -n hw.logicalcpu)
- name: Install and run
run: |
cmake --install build --prefix install
tree install
./install/bin/bitcoind -version