Skip to content

Commit 309fb19

Browse files
committed
Merge remote-tracking branch 'XRPLF/ximinez/lending-refactoring-4' into ximinez/lending-XLS-66
* XRPLF/ximinez/lending-refactoring-4: fix: Modify jobs to use '>>' instead of 'tee' for GITHUB_OUTPUT (#5699) refactor: Revamp CI workflows (#5661) refactor: Decouple net from xrpld and move rpc-related classes to the rpc folder (#5477) Set version to 2.6.0-rc2 docs: Updates list of maintainers and reviewers (#5687) fix: Change log to debug level for AMM offer retrieval and IOU payment check (#5686) fix: Add -Wno-deprecated-declarations for Clang only (#5680) Update .git-blame-ignore-revs for #5657 (#5675) Fix BUILD.md instruction (#5676) Set version to 2.6.0-rc1 fix: Improve logging of the reason to refuse a peer connection (#5664) fix: Make test suite names match the directory name (#5597) chore: Run prettier on all files (#5657) chore: Set CONAN_REMOTE_URL also for forks (#5662) chore: Cleanup bin/ directory (#5660) perf: Optimize hash performance by avoiding allocating hash state object (#5469)
2 parents bc3c9e1 + 3867945 commit 309fb19

File tree

247 files changed

+8251
-9371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+8251
-9371
lines changed

.clang-format

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Language: Cpp
2+
Language: Cpp
33
AccessModifierOffset: -4
44
AlignAfterOpenBracket: AlwaysBreak
55
AlignConsecutiveAssignments: false
@@ -19,52 +19,52 @@ AlwaysBreakTemplateDeclarations: true
1919
BinPackArguments: false
2020
BinPackParameters: false
2121
BraceWrapping:
22-
AfterClass: true
22+
AfterClass: true
2323
AfterControlStatement: true
24-
AfterEnum: false
25-
AfterFunction: true
26-
AfterNamespace: false
24+
AfterEnum: false
25+
AfterFunction: true
26+
AfterNamespace: false
2727
AfterObjCDeclaration: true
28-
AfterStruct: true
29-
AfterUnion: true
30-
BeforeCatch: true
31-
BeforeElse: true
32-
IndentBraces: false
28+
AfterStruct: true
29+
AfterUnion: true
30+
BeforeCatch: true
31+
BeforeElse: true
32+
IndentBraces: false
3333
BreakBeforeBinaryOperators: false
3434
BreakBeforeBraces: Custom
3535
BreakBeforeTernaryOperators: true
3636
BreakConstructorInitializersBeforeComma: true
37-
ColumnLimit: 80
38-
CommentPragmas: '^ IWYU pragma:'
37+
ColumnLimit: 80
38+
CommentPragmas: "^ IWYU pragma:"
3939
ConstructorInitializerAllOnOneLineOrOnePerLine: true
4040
ConstructorInitializerIndentWidth: 4
4141
ContinuationIndentWidth: 4
4242
Cpp11BracedListStyle: true
4343
DerivePointerAlignment: false
44-
DisableFormat: false
44+
DisableFormat: false
4545
ExperimentalAutoDetectBinPacking: false
46-
ForEachMacros: [ Q_FOREACH, BOOST_FOREACH ]
47-
IncludeBlocks: Regroup
46+
ForEachMacros: [Q_FOREACH, BOOST_FOREACH]
47+
IncludeBlocks: Regroup
4848
IncludeCategories:
49-
- Regex: '^<(test)/'
50-
Priority: 0
51-
- Regex: '^<(xrpld)/'
52-
Priority: 1
53-
- Regex: '^<(xrpl)/'
54-
Priority: 2
55-
- Regex: '^<(boost)/'
56-
Priority: 3
57-
- Regex: '^.*/'
58-
Priority: 4
59-
- Regex: '^.*\.h'
60-
Priority: 5
61-
- Regex: '.*'
62-
Priority: 6
63-
IncludeIsMainRegex: '$'
49+
- Regex: "^<(test)/"
50+
Priority: 0
51+
- Regex: "^<(xrpld)/"
52+
Priority: 1
53+
- Regex: "^<(xrpl)/"
54+
Priority: 2
55+
- Regex: "^<(boost)/"
56+
Priority: 3
57+
- Regex: "^.*/"
58+
Priority: 4
59+
- Regex: '^.*\.h'
60+
Priority: 5
61+
- Regex: ".*"
62+
Priority: 6
63+
IncludeIsMainRegex: "$"
6464
IndentCaseLabels: true
6565
IndentFunctionDeclarationAfterType: false
6666
IndentRequiresClause: true
67-
IndentWidth: 4
67+
IndentWidth: 4
6868
IndentWrappedFunctionNames: false
6969
KeepEmptyLinesAtTheStartOfBlocks: false
7070
MaxEmptyLinesToKeep: 1
@@ -78,20 +78,25 @@ PenaltyBreakString: 1000
7878
PenaltyExcessCharacter: 1000000
7979
PenaltyReturnTypeOnItsOwnLine: 200
8080
PointerAlignment: Left
81-
ReflowComments: true
81+
ReflowComments: true
8282
RequiresClausePosition: OwnLine
83-
SortIncludes: true
83+
SortIncludes: true
8484
SpaceAfterCStyleCast: false
8585
SpaceBeforeAssignmentOperators: true
8686
SpaceBeforeParens: ControlStatements
8787
SpaceInEmptyParentheses: false
8888
SpacesBeforeTrailingComments: 2
89-
SpacesInAngles: false
89+
SpacesInAngles: false
9090
SpacesInContainerLiterals: true
9191
SpacesInCStyleCastParentheses: false
9292
SpacesInParentheses: false
9393
SpacesInSquareBrackets: false
94-
Standard: Cpp11
95-
TabWidth: 8
96-
UseTab: Never
97-
QualifierAlignment: Right
94+
Standard: Cpp11
95+
TabWidth: 8
96+
UseTab: Never
97+
QualifierAlignment: Right
98+
---
99+
Language: JavaScript
100+
---
101+
Language: Json
102+
IndentWidth: 2

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ github_checks:
2727
parsers:
2828
cobertura:
2929
partials_as_hits: true
30-
handle_missing_conditions : true
30+
handle_missing_conditions: true
3131

3232
slack_app: false
3333

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ b9d007813378ad0ff45660dc07285b823c7e9855
1111
fe9a5365b8a52d4acc42eb27369247e6f238a4f9
1212
9a93577314e6a8d4b4a8368cc9d2b15a5d8303e8
1313
552377c76f55b403a1c876df873a23d780fcc81c
14+
97f0747e103f13e26e45b731731059b32f7679ac

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,35 @@
22
name: Bug Report
33
about: Create a report to help us improve rippled
44
title: "[Title with short description] (Version: [rippled version])"
5-
labels: ''
6-
assignees: ''
7-
5+
labels: ""
6+
assignees: ""
87
---
8+
99
<!-- Please search existing issues to avoid creating duplicates.-->
1010

1111
## Issue Description
12+
1213
<!--Provide a summary for your issue/bug.-->
1314

1415
## Steps to Reproduce
16+
1517
<!--List in detail the exact steps to reproduce the unexpected behavior of the software.-->
1618

1719
## Expected Result
20+
1821
<!--Explain in detail what behavior you expected to happen.-->
1922

2023
## Actual Result
24+
2125
<!--Explain in detail what behavior actually happened.-->
2226

2327
## Environment
28+
2429
<!--Please describe your environment setup (such as Ubuntu 18.04 with Boost 1.70).-->
2530
<!-- If you are using a formal release, please use the version returned by './rippled --version' as the version number-->
2631
<!-- If you are working off of develop, please add the git hash via 'git rev-parse HEAD'-->
2732

2833
## Supporting Files
34+
2935
<!--If you have supporting files such as a log, feel free to post a link here using Github Gist.-->
3036
<!--Consider adding configuration files with private information removed via Github Gist. -->
31-

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@ name: Feature Request
33
about: Suggest a new feature for the rippled project
44
title: "[Title with short description] (Version: [rippled version])"
55
labels: Feature Request
6-
assignees: ''
7-
6+
assignees: ""
87
---
8+
99
<!-- Please search existing issues to avoid creating duplicates.-->
1010

1111
## Summary
12+
1213
<!-- Provide a summary to the feature request-->
1314

1415
## Motivation
16+
1517
<!-- Why do we need this feature?-->
1618

1719
## Solution
20+
1821
<!-- What is the solution?-->
1922

2023
## Paths Not Taken
24+
2125
<!-- What other alternatives have been considered?-->
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This action installs and optionally uploads Conan dependencies to a remote
2+
# repository. The dependencies will only be uploaded if the credentials are
3+
# provided.
4+
name: Build Conan dependencies
5+
6+
inputs:
7+
build_dir:
8+
description: 'The directory where to build.'
9+
required: true
10+
type: string
11+
build_type:
12+
description: 'The build type to use.'
13+
required: true
14+
type: choice
15+
options:
16+
- 'Debug'
17+
- 'Release'
18+
conan_remote_name:
19+
description: 'The name of the Conan remote to use.'
20+
required: true
21+
type: string
22+
conan_remote_url:
23+
description: 'The URL of the Conan endpoint to use.'
24+
required: true
25+
type: string
26+
conan_remote_username:
27+
description: 'The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
28+
required: false
29+
type: string
30+
default: ''
31+
conan_remote_password:
32+
description: 'The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
33+
required: false
34+
type: string
35+
default: ''
36+
force_build:
37+
description: 'Force building of all dependencies.'
38+
required: false
39+
type: boolean
40+
default: false
41+
force_upload:
42+
description: 'Force uploading of all dependencies.'
43+
required: false
44+
type: boolean
45+
default: false
46+
47+
runs:
48+
using: composite
49+
steps:
50+
- name: Install Conan dependencies
51+
shell: bash
52+
run: |
53+
echo 'Installing dependencies.'
54+
mkdir -p ${{ inputs.build_dir }}
55+
cd ${{ inputs.build_dir }}
56+
conan install \
57+
--output-folder . \
58+
--build ${{ inputs.force_build && '"*"' || 'missing' }} \
59+
--options:host '&:tests=True' \
60+
--options:host '&:xrpld=True' \
61+
--settings:all build_type=${{ inputs.build_type }} \
62+
--format=json ..
63+
- name: Upload Conan dependencies
64+
if: ${{ inputs.conan_remote_username && inputs.conan_remote_password }}
65+
shell: bash
66+
working-directory: ${{ inputs.build_dir }}
67+
run: |
68+
echo "Logging into Conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}."
69+
conan remote login ${{ inputs.conan_remote_name }} "${{ inputs.conan_remote_username }}" --password "${{ inputs.conan_remote_password }}"
70+
echo 'Uploading dependencies.'
71+
conan upload '*' --confirm --check ${{ inputs.force_upload && '--force' || '' }} --remote=${{ inputs.conan_remote_name }}
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# This action build and tests the binary. The Conan dependencies must have
2+
# already been installed (see the build-deps action).
3+
name: Build and Test
4+
5+
inputs:
6+
build_dir:
7+
description: 'The directory where to build.'
8+
required: true
9+
type: string
10+
build_type:
11+
description: 'The build type to use.'
12+
required: true
13+
type: choice
14+
options:
15+
- 'Debug'
16+
- 'Release'
17+
cmake_args:
18+
description: 'Additional arguments to pass to CMake.'
19+
required: false
20+
type: string
21+
default: ''
22+
cmake_target:
23+
description: 'The CMake target to build.'
24+
required: true
25+
type: string
26+
codecov_token:
27+
description: 'The Codecov token to use for uploading coverage reports.'
28+
required: false
29+
type: string
30+
default: ''
31+
os:
32+
description: 'The operating system to use for the build (linux, macos, or windows).'
33+
required: true
34+
type: choice
35+
options:
36+
- 'linux'
37+
- 'macos'
38+
- 'windows'
39+
40+
runs:
41+
using: composite
42+
steps:
43+
- name: Configure CMake
44+
shell: bash
45+
working-directory: ${{ inputs.build_dir }}
46+
run: |
47+
echo 'Configuring CMake.'
48+
cmake \
49+
-G '${{ inputs.os == 'windows' && 'Visual Studio 17 2022' || 'Ninja' }}' \
50+
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
51+
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
52+
${{ inputs.cmake_args }} \
53+
..
54+
- name: Build the binary
55+
shell: bash
56+
working-directory: ${{ inputs.build_dir }}
57+
run: |
58+
echo 'Building binary.'
59+
cmake \
60+
--build . \
61+
--config ${{ inputs.build_type }} \
62+
--parallel $(nproc) \
63+
--target ${{ inputs.cmake_target }}
64+
- name: Check linking
65+
if: ${{ inputs.os == 'linux' }}
66+
shell: bash
67+
working-directory: ${{ inputs.build_dir }}
68+
run: |
69+
echo 'Checking linking.'
70+
ldd ./rippled
71+
if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
72+
echo 'The binary is statically linked.'
73+
else
74+
echo 'The binary is dynamically linked.'
75+
exit 1
76+
fi
77+
- name: Verify voidstar
78+
if: ${{ contains(inputs.cmake_args, '-Dvoidstar=ON') }}
79+
shell: bash
80+
working-directory: ${{ inputs.build_dir }}
81+
run: |
82+
echo 'Verifying presence of instrumentation.'
83+
./rippled --version | grep libvoidstar
84+
- name: Test the binary
85+
if: ${{ inputs.cmake_target != 'coverage' }}
86+
shell: bash
87+
working-directory: ${{ inputs.build_dir }}/${{ inputs.os == 'windows' && inputs.build_type || '' }}
88+
run: |
89+
echo 'Testing binary.'
90+
./rippled --unittest --unittest-jobs $(nproc)
91+
ctest -j $(nproc) --output-on-failure
92+
- name: Upload coverage report
93+
if: ${{ inputs.cmake_target == 'coverage' && inputs.codecov_token }}
94+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
95+
with:
96+
disable_search: true
97+
disable_telem: true
98+
fail_ci_if_error: true
99+
files: ${{ inputs.build_dir }}/coverage.xml
100+
plugins: noop
101+
token: ${{ inputs.codecov_token }}
102+
verbose: true

0 commit comments

Comments
 (0)