Skip to content

Commit 2f155d9

Browse files
authored
Merge branch 'develop' into nudbBlockSize
2 parents 53fcfda + 2851206 commit 2f155d9

121 files changed

Lines changed: 6915 additions & 6677 deletions

File tree

Some content is hidden

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

.clang-format

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
---
2+
BreakBeforeBraces: Custom
3+
BraceWrapping:
4+
AfterClass: true
5+
AfterControlStatement: true
6+
AfterEnum: false
7+
AfterFunction: true
8+
AfterNamespace: false
9+
AfterObjCDeclaration: true
10+
AfterStruct: true
11+
AfterUnion: true
12+
BeforeCatch: true
13+
BeforeElse: true
14+
IndentBraces: false
15+
KeepEmptyLinesAtTheStartOfBlocks: false
16+
MaxEmptyLinesToKeep: 1
17+
---
218
Language: Cpp
319
AccessModifierOffset: -4
420
AlignAfterOpenBracket: AlwaysBreak
@@ -18,20 +34,7 @@ AlwaysBreakBeforeMultilineStrings: true
1834
AlwaysBreakTemplateDeclarations: true
1935
BinPackArguments: false
2036
BinPackParameters: false
21-
BraceWrapping:
22-
AfterClass: true
23-
AfterControlStatement: true
24-
AfterEnum: false
25-
AfterFunction: true
26-
AfterNamespace: false
27-
AfterObjCDeclaration: true
28-
AfterStruct: true
29-
AfterUnion: true
30-
BeforeCatch: true
31-
BeforeElse: true
32-
IndentBraces: false
3337
BreakBeforeBinaryOperators: false
34-
BreakBeforeBraces: Custom
3538
BreakBeforeTernaryOperators: true
3639
BreakConstructorInitializersBeforeComma: true
3740
ColumnLimit: 80
@@ -66,8 +69,6 @@ IndentFunctionDeclarationAfterType: false
6669
IndentRequiresClause: true
6770
IndentWidth: 4
6871
IndentWrappedFunctionNames: false
69-
KeepEmptyLinesAtTheStartOfBlocks: false
70-
MaxEmptyLinesToKeep: 1
7172
NamespaceIndentation: None
7273
ObjCSpaceAfterProperty: false
7374
ObjCSpaceBeforeProtocolList: false
@@ -96,7 +97,7 @@ TabWidth: 8
9697
UseTab: Never
9798
QualifierAlignment: Right
9899
---
99-
Language: JavaScript
100-
---
101-
Language: Json
100+
Language: Proto
101+
BasedOnStyle: Google
102+
ColumnLimit: 0
102103
IndentWidth: 2

.git-blame-ignore-revs

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

.github/actions/build/action.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/actions/dependencies/action.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ that `test` code should _never_ be included in `ripple` code.)
5050

5151
## Validation
5252

53-
The [levelization.sh](levelization.sh) script takes no parameters,
53+
The [levelization](generate.sh) script takes no parameters,
5454
reads no environment variables, and can be run from any directory,
5555
as long as it is in the expected location in the rippled repo.
5656
It can be run at any time from within a checked out repo, and will
@@ -72,15 +72,15 @@ It generates many files of [results](results):
7272
desired as described above. In a perfect repo, this file will be
7373
empty.
7474
This file is committed to the repo, and is used by the [levelization
75-
Github workflow](../../.github/workflows/levelization.yml) to validate
75+
Github workflow](../../workflows/check-levelization.yml) to validate
7676
that nothing changed.
7777
- [`ordering.txt`](results/ordering.txt): A list showing relationships
7878
between modules where there are no loops as they actually exist, as
7979
opposed to how they are desired as described above.
8080
This file is committed to the repo, and is used by the [levelization
81-
Github workflow](../../.github/workflows/levelization.yml) to validate
81+
Github workflow](../../workflows/check-levelization.yml) to validate
8282
that nothing changed.
83-
- [`levelization.yml`](../../.github/workflows/levelization.yml)
83+
- [`levelization.yml`](../../workflows/check-levelization.yml)
8484
Github Actions workflow to test that levelization loops haven't
8585
changed. Unfortunately, if changes are detected, it can't tell if
8686
they are improvements or not, so if you have resolved any issues or
@@ -111,4 +111,4 @@ get those details locally.
111111
1. Run `levelization.sh`
112112
2. Grep the modules in `paths.txt`.
113113
- For example, if a cycle is found `A ~= B`, simply `grep -w
114-
A Builds/levelization/results/paths.txt | grep -w B`
114+
A .github/scripts/levelization/results/paths.txt | grep -w B`
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Usage: levelization.sh
3+
# Usage: generate.sh
44
# This script takes no parameters, reads no environment variables,
55
# and can be run from any directory, as long as it is in the expected
66
# location in the repo.
@@ -19,7 +19,7 @@ export LANG=C
1919
rm -rfv results
2020
mkdir results
2121
includes="$( pwd )/results/rawincludes.txt"
22-
pushd ../..
22+
pushd ../../..
2323
echo Raw includes:
2424
grep -r '^[ ]*#include.*/.*\.h' include src | \
2525
grep -v boost | tee ${includes}

Builds/levelization/results/loops.txt renamed to .github/scripts/levelization/results/loops.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ Loop: xrpld.app xrpld.core
1010
Loop: xrpld.app xrpld.ledger
1111
xrpld.app > xrpld.ledger
1212

13-
Loop: xrpld.app xrpld.net
14-
xrpld.app > xrpld.net
15-
1613
Loop: xrpld.app xrpld.overlay
1714
xrpld.overlay > xrpld.app
1815

@@ -25,15 +22,9 @@ Loop: xrpld.app xrpld.rpc
2522
Loop: xrpld.app xrpld.shamap
2623
xrpld.app > xrpld.shamap
2724

28-
Loop: xrpld.core xrpld.net
29-
xrpld.net > xrpld.core
30-
3125
Loop: xrpld.core xrpld.perflog
3226
xrpld.perflog == xrpld.core
3327

34-
Loop: xrpld.net xrpld.rpc
35-
xrpld.rpc ~= xrpld.net
36-
3728
Loop: xrpld.overlay xrpld.rpc
3829
xrpld.rpc ~= xrpld.overlay
3930

0 commit comments

Comments
 (0)