mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Merge branch 'ximinez/lending-refactoring-4' into ximinez/lending-XLS-66
This commit is contained in:
34
.github/workflows/build-test.yml
vendored
34
.github/workflows/build-test.yml
vendored
@@ -101,6 +101,7 @@ jobs:
|
|||||||
echo 'CMake arguments: ${{ matrix.cmake_args }}'
|
echo 'CMake arguments: ${{ matrix.cmake_args }}'
|
||||||
echo 'CMake target: ${{ matrix.cmake_target }}'
|
echo 'CMake target: ${{ matrix.cmake_target }}'
|
||||||
echo 'Config name: ${{ matrix.config_name }}'
|
echo 'Config name: ${{ matrix.config_name }}'
|
||||||
|
|
||||||
- name: Clean workspace (MacOS)
|
- name: Clean workspace (MacOS)
|
||||||
if: ${{ inputs.os == 'macos' }}
|
if: ${{ inputs.os == 'macos' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -111,18 +112,12 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
find "${WORKSPACE}" -depth 1 | xargs rm -rfv
|
find "${WORKSPACE}" -depth 1 | xargs rm -rfv
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
- name: Set up Python (Windows)
|
- name: Prepare runner
|
||||||
if: ${{ inputs.os == 'windows' }}
|
uses: XRPLF/actions/.github/actions/prepare-runner@638e0dc11ea230f91bd26622fb542116bb5254d5
|
||||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
|
||||||
with:
|
|
||||||
python-version: 3.13
|
|
||||||
- name: Install build tools (Windows)
|
|
||||||
if: ${{ inputs.os == 'windows' }}
|
|
||||||
run: |
|
|
||||||
echo 'Installing build tools.'
|
|
||||||
pip install wheel conan
|
|
||||||
- name: Check configuration (Windows)
|
- name: Check configuration (Windows)
|
||||||
if: ${{ inputs.os == 'windows' }}
|
if: ${{ inputs.os == 'windows' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -134,11 +129,6 @@ jobs:
|
|||||||
|
|
||||||
echo 'Checking Conan version.'
|
echo 'Checking Conan version.'
|
||||||
conan --version
|
conan --version
|
||||||
- name: Install build tools (MacOS)
|
|
||||||
if: ${{ inputs.os == 'macos' }}
|
|
||||||
run: |
|
|
||||||
echo 'Installing build tools.'
|
|
||||||
brew install --quiet cmake conan ninja coreutils
|
|
||||||
- name: Check configuration (Linux and MacOS)
|
- name: Check configuration (Linux and MacOS)
|
||||||
if: ${{ inputs.os == 'linux' || inputs.os == 'macos' }}
|
if: ${{ inputs.os == 'linux' || inputs.os == 'macos' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -162,18 +152,7 @@ jobs:
|
|||||||
|
|
||||||
echo 'Checking nproc version.'
|
echo 'Checking nproc version.'
|
||||||
nproc --version
|
nproc --version
|
||||||
- name: Set up Conan home directory (MacOS)
|
|
||||||
if: ${{ inputs.os == 'macos' }}
|
|
||||||
run: |
|
|
||||||
echo 'Setting up Conan home directory.'
|
|
||||||
export CONAN_HOME=${{ github.workspace }}/.conan
|
|
||||||
mkdir -p ${CONAN_HOME}
|
|
||||||
- name: Set up Conan home directory (Windows)
|
|
||||||
if: ${{ inputs.os == 'windows' }}
|
|
||||||
run: |
|
|
||||||
echo 'Setting up Conan home directory.'
|
|
||||||
set CONAN_HOME=${{ github.workspace }}\.conan
|
|
||||||
mkdir -p %CONAN_HOME%
|
|
||||||
- name: Set up Conan configuration
|
- name: Set up Conan configuration
|
||||||
run: |
|
run: |
|
||||||
echo 'Installing configuration.'
|
echo 'Installing configuration.'
|
||||||
@@ -196,6 +175,7 @@ jobs:
|
|||||||
|
|
||||||
echo 'Listing Conan remotes.'
|
echo 'Listing Conan remotes.'
|
||||||
conan remote list
|
conan remote list
|
||||||
|
|
||||||
- name: Build dependencies
|
- name: Build dependencies
|
||||||
uses: ./.github/actions/build-deps
|
uses: ./.github/actions/build-deps
|
||||||
with:
|
with:
|
||||||
|
|||||||
70
.github/workflows/on-pr.yml
vendored
70
.github/workflows/on-pr.yml
vendored
@@ -28,30 +28,26 @@ env:
|
|||||||
CONAN_REMOTE_URL: https://conan.ripplex.io
|
CONAN_REMOTE_URL: https://conan.ripplex.io
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# This job determines whether the workflow should run. It runs when the PR is
|
# This job determines whether the rest of the workflow should run. It runs
|
||||||
# not a draft or has the 'DraftRunCI' label.
|
# when the PR is not a draft (which should also cover merge-group) or
|
||||||
|
# has the 'DraftRunCI' label.
|
||||||
should-run:
|
should-run:
|
||||||
if: ${{ !github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
if: ${{ !github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
|
||||||
- name: No-op
|
|
||||||
run: true
|
|
||||||
|
|
||||||
# This job checks whether any files have changed that should cause the next
|
|
||||||
# jobs to run. We do it this way rather than using `paths` in the `on:`
|
|
||||||
# section, because all required checks must pass, even for changes that do not
|
|
||||||
# modify anything that affects those checks. We would therefore like to make
|
|
||||||
# the checks required only if the job runs, but GitHub does not support that
|
|
||||||
# directly. By always executing the workflow on new commits and by using the
|
|
||||||
# changed-files action below, we ensure that Github considers any skipped jobs
|
|
||||||
# to have passed, and in turn the required checks as well.
|
|
||||||
any-changed:
|
|
||||||
needs: should-run
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
- name: Determine changed files
|
- name: Determine changed files
|
||||||
|
# This step checks whether any files have changed that should
|
||||||
|
# cause the next jobs to run. We do it this way rather than
|
||||||
|
# using `paths` in the `on:` section, because all required
|
||||||
|
# checks must pass, even for changes that do not modify anything
|
||||||
|
# that affects those checks. We would therefore like to make the
|
||||||
|
# checks required only if the job runs, but GitHub does not
|
||||||
|
# support that directly. By always executing the workflow on new
|
||||||
|
# commits and by using the changed-files action below, we ensure
|
||||||
|
# that Github considers any skipped jobs to have passed, and in
|
||||||
|
# turn the required checks as well.
|
||||||
id: changes
|
id: changes
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
|
||||||
with:
|
with:
|
||||||
@@ -79,24 +75,40 @@ jobs:
|
|||||||
tests/**
|
tests/**
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
conanfile.py
|
conanfile.py
|
||||||
|
- name: Check whether to run
|
||||||
|
# This step determines whether the rest of the workflow should
|
||||||
|
# run. The rest of the workflow will run if this job runs AND at
|
||||||
|
# least one of:
|
||||||
|
# * Any of the files checked in the `changes` step were modified
|
||||||
|
# * The PR is NOT a draft and is labeled "Ready to merge"
|
||||||
|
# * The workflow is running from the merge queue
|
||||||
|
id: go
|
||||||
|
env:
|
||||||
|
FILES: ${{ steps.changes.outputs.any_changed }}
|
||||||
|
DRAFT: ${{ github.event.pull_request.draft }}
|
||||||
|
READY: ${{ contains(github.event.pull_request.labels.*.name, 'Ready to merge') }}
|
||||||
|
MERGE: ${{ github.event_name == 'merge_group' }}
|
||||||
|
run: |
|
||||||
|
echo "go=${{ (env.DRAFT != 'true' && env.READY == 'true') || env.FILES == 'true' || env.MERGE == 'true' }}" >> "${GITHUB_OUTPUT}"
|
||||||
|
cat "${GITHUB_OUTPUT}"
|
||||||
outputs:
|
outputs:
|
||||||
changed: ${{ steps.changes.outputs.any_changed }}
|
go: ${{ steps.go.outputs.go == 'true' }}
|
||||||
|
|
||||||
check-format:
|
check-format:
|
||||||
needs: any-changed
|
needs: should-run
|
||||||
if: needs.any-changed.outputs.changed == 'true'
|
if: needs.should-run.outputs.go == 'true'
|
||||||
uses: ./.github/workflows/check-format.yml
|
uses: ./.github/workflows/check-format.yml
|
||||||
|
|
||||||
check-levelization:
|
check-levelization:
|
||||||
needs: any-changed
|
needs: should-run
|
||||||
if: needs.any-changed.outputs.changed == 'true'
|
if: needs.should-run.outputs.go == 'true'
|
||||||
uses: ./.github/workflows/check-levelization.yml
|
uses: ./.github/workflows/check-levelization.yml
|
||||||
|
|
||||||
# This job works around the limitation that GitHub Actions does not support
|
# This job works around the limitation that GitHub Actions does not support
|
||||||
# using environment variables as inputs for reusable workflows.
|
# using environment variables as inputs for reusable workflows.
|
||||||
generate-outputs:
|
generate-outputs:
|
||||||
needs: any-changed
|
needs: should-run
|
||||||
if: needs.any-changed.outputs.changed == 'true'
|
if: needs.should-run.outputs.go == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: No-op
|
- name: No-op
|
||||||
@@ -130,3 +142,13 @@ jobs:
|
|||||||
clio_notify_token: ${{ secrets.CLIO_NOTIFY_TOKEN }}
|
clio_notify_token: ${{ secrets.CLIO_NOTIFY_TOKEN }}
|
||||||
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
conan_remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||||
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
conan_remote_password: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||||
|
|
||||||
|
passed:
|
||||||
|
needs:
|
||||||
|
- build-test
|
||||||
|
- check-format
|
||||||
|
- check-levelization
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: No-op
|
||||||
|
run: true
|
||||||
|
|||||||
@@ -101,6 +101,9 @@
|
|||||||
# 2025-05-12, Jingchen Wu
|
# 2025-05-12, Jingchen Wu
|
||||||
# - add -fprofile-update=atomic to ensure atomic profile generation
|
# - add -fprofile-update=atomic to ensure atomic profile generation
|
||||||
#
|
#
|
||||||
|
# 2025-08-28, Bronek Kozicki
|
||||||
|
# - fix "At least one COMMAND must be given" CMake warning from policy CMP0175
|
||||||
|
#
|
||||||
# USAGE:
|
# USAGE:
|
||||||
#
|
#
|
||||||
# 1. Copy this file into your cmake modules path.
|
# 1. Copy this file into your cmake modules path.
|
||||||
@@ -446,7 +449,7 @@ function(setup_target_for_coverage_gcovr)
|
|||||||
|
|
||||||
# Show info where to find the report
|
# Show info where to find the report
|
||||||
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
|
add_custom_command(TARGET ${Coverage_NAME} POST_BUILD
|
||||||
COMMAND ;
|
COMMAND echo
|
||||||
COMMENT "Code coverage report saved in ${GCOVR_OUTPUT_FILE} formatted as ${Coverage_FORMAT}"
|
COMMENT "Code coverage report saved in ${GCOVR_OUTPUT_FILE} formatted as ${Coverage_FORMAT}"
|
||||||
)
|
)
|
||||||
endfunction() # setup_target_for_coverage_gcovr
|
endfunction() # setup_target_for_coverage_gcovr
|
||||||
|
|||||||
@@ -14,12 +14,6 @@ find_package(Boost 1.82 REQUIRED
|
|||||||
|
|
||||||
add_library(ripple_boost INTERFACE)
|
add_library(ripple_boost INTERFACE)
|
||||||
add_library(Ripple::boost ALIAS ripple_boost)
|
add_library(Ripple::boost ALIAS ripple_boost)
|
||||||
if(XCODE)
|
|
||||||
target_include_directories(ripple_boost BEFORE INTERFACE ${Boost_INCLUDE_DIRS})
|
|
||||||
target_compile_options(ripple_boost INTERFACE --system-header-prefix="boost/")
|
|
||||||
else()
|
|
||||||
target_include_directories(ripple_boost SYSTEM BEFORE INTERFACE ${Boost_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(ripple_boost
|
target_link_libraries(ripple_boost
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace BuildInfo {
|
|||||||
// and follow the format described at http://semver.org/
|
// and follow the format described at http://semver.org/
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// clang-format off
|
// clang-format off
|
||||||
char const* const versionString = "2.6.0-rc3"
|
char const* const versionString = "2.6.0"
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#if defined(DEBUG) || defined(SANITIZER)
|
#if defined(DEBUG) || defined(SANITIZER)
|
||||||
|
|||||||
@@ -3137,7 +3137,6 @@ rippleUnlockEscrowMPT(
|
|||||||
auto const delta = amount.mpt().value();
|
auto const delta = amount.mpt().value();
|
||||||
|
|
||||||
// Underflow check for subtraction
|
// Underflow check for subtraction
|
||||||
// LCOV_EXCL_START
|
|
||||||
if (!canSubtract(STAmount(mptIssue, locked), STAmount(mptIssue, delta)))
|
if (!canSubtract(STAmount(mptIssue, locked), STAmount(mptIssue, delta)))
|
||||||
{ // LCOV_EXCL_START
|
{ // LCOV_EXCL_START
|
||||||
JLOG(j.error())
|
JLOG(j.error())
|
||||||
|
|||||||
Reference in New Issue
Block a user