mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Merge branch 'develop' into vault
This commit is contained in:
54
.github/workflows/nix.yml
vendored
54
.github/workflows/nix.yml
vendored
@@ -163,6 +163,60 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||||
|
|
||||||
|
reference-fee-test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- linux
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
configuration:
|
||||||
|
- Debug
|
||||||
|
cmake-args:
|
||||||
|
- "-DUNIT_TEST_REFERENCE_FEE=200"
|
||||||
|
- "-DUNIT_TEST_REFERENCE_FEE=1000"
|
||||||
|
needs: dependencies
|
||||||
|
runs-on: [self-hosted, heavy]
|
||||||
|
container: rippleci/rippled-build-ubuntu:aaf5e3e
|
||||||
|
env:
|
||||||
|
build_dir: .build
|
||||||
|
steps:
|
||||||
|
- name: upgrade conan
|
||||||
|
run: |
|
||||||
|
pip install --upgrade "conan<2"
|
||||||
|
- name: download cache
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }}
|
||||||
|
- name: extract cache
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.conan
|
||||||
|
tar -xzf conan.tar -C ~/.conan
|
||||||
|
- name: check environment
|
||||||
|
run: |
|
||||||
|
env | sort
|
||||||
|
echo ${PATH} | tr ':' '\n'
|
||||||
|
conan --version
|
||||||
|
cmake --version
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: dependencies
|
||||||
|
uses: ./.github/actions/dependencies
|
||||||
|
env:
|
||||||
|
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
|
||||||
|
with:
|
||||||
|
configuration: ${{ matrix.configuration }}
|
||||||
|
- name: build
|
||||||
|
uses: ./.github/actions/build
|
||||||
|
with:
|
||||||
|
generator: Ninja
|
||||||
|
configuration: ${{ matrix.configuration }}
|
||||||
|
cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}"
|
||||||
|
- name: test
|
||||||
|
run: |
|
||||||
|
${build_dir}/rippled --unittest --unittest-jobs $(nproc)
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|||||||
@@ -136,6 +136,9 @@ if(xrpld)
|
|||||||
add_executable(rippled)
|
add_executable(rippled)
|
||||||
if(tests)
|
if(tests)
|
||||||
target_compile_definitions(rippled PUBLIC ENABLE_TESTS)
|
target_compile_definitions(rippled PUBLIC ENABLE_TESTS)
|
||||||
|
target_compile_definitions(rippled PRIVATE
|
||||||
|
UNIT_TEST_REFERENCE_FEE=${UNIT_TEST_REFERENCE_FEE}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(rippled
|
target_include_directories(rippled
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ option(assert "Enables asserts, even in release builds" OFF)
|
|||||||
option(xrpld "Build xrpld" ON)
|
option(xrpld "Build xrpld" ON)
|
||||||
|
|
||||||
option(tests "Build tests" ON)
|
option(tests "Build tests" ON)
|
||||||
|
if(tests)
|
||||||
|
# This setting allows making a separate workflow to test fees other than default 10
|
||||||
|
if(NOT UNIT_TEST_REFERENCE_FEE)
|
||||||
|
set(UNIT_TEST_REFERENCE_FEE "10" CACHE STRING "")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
option(unity "Creates a build using UNITY support in cmake. This is the default" ON)
|
option(unity "Creates a build using UNITY support in cmake. This is the default" ON)
|
||||||
if(unity)
|
if(unity)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ setupConfigForUnitTests(Config& cfg)
|
|||||||
using namespace jtx;
|
using namespace jtx;
|
||||||
// Default fees to old values, so tests don't have to worry about changes in
|
// Default fees to old values, so tests don't have to worry about changes in
|
||||||
// Config.h
|
// Config.h
|
||||||
cfg.FEES.reference_fee = 10;
|
cfg.FEES.reference_fee = UNIT_TEST_REFERENCE_FEE;
|
||||||
cfg.FEES.account_reserve = XRP(200).value().xrp().drops();
|
cfg.FEES.account_reserve = XRP(200).value().xrp().drops();
|
||||||
cfg.FEES.owner_reserve = XRP(50).value().xrp().drops();
|
cfg.FEES.owner_reserve = XRP(50).value().xrp().drops();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user