mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 11:15:56 +00:00
This change moves some tests from the current unit tests that are compiled into the rippled binary to using the doctest framework.
103 lines
3.1 KiB
YAML
103 lines
3.1 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
|
|
|
|
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]
|
|
env:
|
|
# The `build` action requires these variables.
|
|
build_dir: .build
|
|
NUM_PROCESSORS: 12
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: install Conan
|
|
run: |
|
|
brew install conan@1
|
|
echo '/opt/homebrew/opt/conan@1/bin' >> $GITHUB_PATH
|
|
- name: install Ninja
|
|
if: matrix.generator == 'Ninja'
|
|
run: brew install ninja
|
|
- name: install python
|
|
run: |
|
|
if which python > /dev/null 2>&1; then
|
|
echo "Python executable exists"
|
|
else
|
|
brew install python@3.13
|
|
ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python
|
|
fi
|
|
- name: install cmake
|
|
run: |
|
|
if which cmake > /dev/null 2>&1; then
|
|
echo "cmake executable exists"
|
|
else
|
|
brew install cmake
|
|
fi
|
|
- name: install nproc
|
|
run: |
|
|
brew install coreutils
|
|
- 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 : |
|
|
conan profile new default --detect || true
|
|
conan profile update settings.compiler.cppstd=20 default
|
|
- name: build dependencies
|
|
uses: ./.github/actions/dependencies
|
|
env:
|
|
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
|
CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }}
|
|
CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }}
|
|
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
|