mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
118 lines
3.7 KiB
YAML
118 lines
3.7 KiB
YAML
name: macos
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, synchronize, ready_for_review]
|
|
push:
|
|
# If the branches list is ever changed, be sure to change it on all
|
|
# build/test jobs (nix, macos, windows, instrumentation)
|
|
branches:
|
|
# Always build the package branches
|
|
- develop
|
|
- release
|
|
- master
|
|
# Branches that opt-in to running
|
|
- "ci/**"
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
# This part of Conan configuration is specific to this workflow only; we do not want
|
|
# to pollute conan/profiles directory with settings which might not work for others
|
|
env:
|
|
CONAN_REMOTE_URL: https://conan.ripplex.io
|
|
CONAN_REMOTE_USERNAME: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
|
CONAN_REMOTE_PASSWORD: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
|
# This part of the Conan configuration is specific to this workflow only; we
|
|
# do not want to pollute the 'conan/profiles' directory with settings that
|
|
# might not work for other workflows.
|
|
CONAN_GLOBAL_CONF: |
|
|
core.download:parallel={{os.cpu_count()}}
|
|
core.upload:parallel={{os.cpu_count()}}
|
|
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
|
|
tools.build:verbosity=verbose
|
|
tools.compilation:verbosity=verbose
|
|
|
|
jobs:
|
|
test:
|
|
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- macos
|
|
generator:
|
|
- Ninja
|
|
configuration:
|
|
- Release
|
|
runs-on: [self-hosted, macOS, mac-runner-m1]
|
|
env:
|
|
# The `build` action requires these variables.
|
|
build_dir: .build
|
|
NUM_PROCESSORS: 12
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
- name: Delete old build tools installed using Homebrew
|
|
run: |
|
|
brew uninstall --force \
|
|
cmake \
|
|
conan
|
|
|
|
- name: Install build tools using Homebrew
|
|
run: |
|
|
brew install --quiet \
|
|
ca-certificates \
|
|
ninja \
|
|
python@3.14
|
|
|
|
- name: Remove old fmt using Homebrew
|
|
run: |
|
|
brew unlink fmt
|
|
brew cleanup
|
|
brew link fmt
|
|
|
|
- name: List software installed using Homebrew
|
|
run: brew list --version
|
|
|
|
- name: Install build tools using pip
|
|
shell: bash
|
|
run: |
|
|
pip3 install --break-system-packages --upgrade pip
|
|
pip3 install --break-system-packages \
|
|
cmake==4.1.2 \
|
|
conan==2.22.1
|
|
- name: check environment
|
|
run: |
|
|
env | sort
|
|
echo ${PATH} | tr ':' '\n'
|
|
python --version
|
|
conan --version
|
|
cmake --version
|
|
nproc --version
|
|
echo -n "nproc returns: "
|
|
nproc
|
|
system_profiler SPHardwareDataType
|
|
sysctl -n hw.logicalcpu
|
|
clang --version
|
|
- name: configure Conan
|
|
run: |
|
|
echo "${CONAN_GLOBAL_CONF}" > $(conan config home)/global.conf
|
|
conan config install conan/profiles/ -tf $(conan config home)/profiles/
|
|
conan profile show
|
|
- name: build dependencies
|
|
uses: ./.github/actions/dependencies
|
|
with:
|
|
configuration: ${{ matrix.configuration }}
|
|
- name: build
|
|
uses: ./.github/actions/build
|
|
with:
|
|
generator: ${{ matrix.generator }}
|
|
configuration: ${{ matrix.configuration }}
|
|
cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}"
|
|
- name: test
|
|
run: |
|
|
n=$(nproc)
|
|
echo "Using $n test jobs"
|
|
|
|
cd ${build_dir}
|
|
./rippled --unittest --unittest-jobs $n
|
|
ctest -j $n --output-on-failure
|