Skip to content

Commit fa0d5a6

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into server_definitions2
2 parents 034198e + 095dc4d commit fa0d5a6

Some content is hidden

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

52 files changed

+5400
-5495
lines changed

.clang-format

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,8 @@ Language: JavaScript
100100
---
101101
Language: Json
102102
IndentWidth: 2
103+
---
104+
Language: Proto
105+
BasedOnStyle: Google
106+
ColumnLimit: 0
107+
IndentWidth: 2

.github/actions/build-deps/action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@ name: Build Conan dependencies
77
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
88
inputs:
99
build_dir:
10-
description: 'The directory where to build.'
10+
description: "The directory where to build."
1111
required: true
1212
build_type:
1313
description: 'The build type to use ("Debug", "Release").'
1414
required: true
1515
conan_remote_name:
16-
description: 'The name of the Conan remote to use.'
16+
description: "The name of the Conan remote to use."
1717
required: true
1818
conan_remote_url:
19-
description: 'The URL of the Conan endpoint to use.'
19+
description: "The URL of the Conan endpoint to use."
2020
required: true
2121
conan_remote_username:
22-
description: 'The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
22+
description: "The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
2323
required: false
24-
default: ''
24+
default: ""
2525
conan_remote_password:
26-
description: 'The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
26+
description: "The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
2727
required: false
28-
default: ''
28+
default: ""
2929
force_build:
3030
description: 'Force building of all dependencies ("true", "false").'
3131
required: false
32-
default: 'false'
32+
default: "false"
3333
force_upload:
3434
description: 'Force uploading of all dependencies ("true", "false").'
3535
required: false
36-
default: 'false'
36+
default: "false"
3737

3838
runs:
3939
using: composite

.github/actions/build-test/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ name: Build and Test
66
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
77
inputs:
88
build_dir:
9-
description: 'The directory where to build.'
9+
description: "The directory where to build."
1010
required: true
1111
build_only:
1212
description: 'Whether to only build or to build and test the code ("true", "false").'
1313
required: false
14-
default: 'false'
14+
default: "false"
1515
build_type:
1616
description: 'The build type to use ("Debug", "Release").'
1717
required: true
1818
cmake_args:
19-
description: 'Additional arguments to pass to CMake.'
19+
description: "Additional arguments to pass to CMake."
2020
required: false
21-
default: ''
21+
default: ""
2222
cmake_target:
23-
description: 'The CMake target to build.'
23+
description: "The CMake target to build."
2424
required: true
2525
codecov_token:
26-
description: 'The Codecov token to use for uploading coverage reports.'
26+
description: "The Codecov token to use for uploading coverage reports."
2727
required: false
28-
default: ''
28+
default: ""
2929
os:
3030
description: 'The operating system to use for the build ("linux", "macos", "windows").'
3131
required: true
@@ -75,7 +75,7 @@ runs:
7575
echo 'Verifying presence of instrumentation.'
7676
./rippled --version | grep libvoidstar
7777
- name: Test the binary
78-
if: ${{ inputs.build_only == 'true' }}
78+
if: ${{ inputs.build_only == 'false' }}
7979
shell: bash
8080
working-directory: ${{ inputs.build_dir }}/${{ inputs.os == 'windows' && inputs.build_type || '' }}
8181
run: |

.github/scripts/levelization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 .github/scripts/levelization/results/paths.txt | grep -w B`
114+
A .github/scripts/levelization/results/paths.txt | grep -w B`

.github/scripts/strategy-matrix/generate.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ def generate_strategy_matrix(all: bool, architecture: list[dict], os: list[dict]
4848
skip = True
4949
if os['distro_version'] == 'bookworm':
5050
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-13' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/arm64':
51-
cmake_args = f'{cmake_args} -DUNIT_TEST_REFERENCE_FEE=500'
51+
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=500 {cmake_args}'
5252
skip = False
5353
if f'{os['compiler_name']}-{os['compiler_version']}' == 'gcc-15' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/amd64':
54-
cmake_args = f'{cmake_args} -Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 -DCMAKE_CXX_FLAGS=-O0'
54+
cmake_args = f'-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_C_FLAGS=-O0 -DCMAKE_CXX_FLAGS=-O0 {cmake_args}'
5555
cmake_target = 'coverage'
5656
build_only = True
5757
skip = False
5858
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-16' and build_type == 'Debug' and '-Dunity=OFF' in cmake_args and architecture['platform'] == 'linux/arm64':
59-
cmake_args = f'{cmake_args} -Dvoidstar=ON'
59+
cmake_args = f'-Dvoidstar=ON {cmake_args}'
6060
skip = False
6161
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-17' and build_type == 'Release' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
62-
cmake_args = f'{cmake_args} -DUNIT_TEST_REFERENCE_FEE=1000'
62+
cmake_args = f'-DUNIT_TEST_REFERENCE_FEE=1000 {cmake_args}'
6363
skip = False
6464
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and build_type == 'Debug' and '-Dunity=ON' in cmake_args and architecture['platform'] == 'linux/amd64':
6565
skip = False
@@ -123,6 +123,10 @@ def generate_strategy_matrix(all: bool, architecture: list[dict], os: list[dict]
123123
if os['distro_name'] == 'rhel' and architecture['platform'] == 'linux/arm64':
124124
continue
125125

126+
# We skip all clang-20 on arm64 due to boost 1.86 build error
127+
if f'{os['compiler_name']}-{os['compiler_version']}' == 'clang-20' and architecture['platform'] == 'linux/arm64':
128+
continue
129+
126130
# Generate a unique name for the configuration, e.g. macos-arm64-debug
127131
# or debian-bookworm-gcc-12-amd64-release-unity.
128132
config_name = os['distro_name']
@@ -137,14 +141,17 @@ def generate_strategy_matrix(all: bool, architecture: list[dict], os: list[dict]
137141
if '-Dunity=ON' in cmake_args:
138142
config_name += '-unity'
139143

144+
# Add the configuration to the list, with the most unique fields first,
145+
# so that they are easier to identify in the GitHub Actions UI, as long
146+
# names get truncated.
140147
configurations.append({
141-
'architecture': architecture,
142-
'os': os,
143-
'build_type': build_type,
144-
'build_only': 'true' if build_only else 'false',
148+
'config_name': config_name,
145149
'cmake_args': cmake_args,
146150
'cmake_target': cmake_target,
147-
'config_name': config_name,
151+
'build_only': 'true' if build_only else 'false',
152+
'build_type': build_type,
153+
'os': os,
154+
'architecture': architecture,
148155
})
149156

150157
return {'include': configurations}

.github/workflows/build-test.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ on:
99
workflow_call:
1010
inputs:
1111
build_dir:
12-
description: 'The directory where to build.'
12+
description: "The directory where to build."
1313
required: false
1414
type: string
15-
default: '.build'
15+
default: ".build"
1616
conan_remote_name:
17-
description: 'The name of the Conan remote to use.'
17+
description: "The name of the Conan remote to use."
1818
required: true
1919
type: string
2020
conan_remote_url:
21-
description: 'The URL of the Conan endpoint to use.'
21+
description: "The URL of the Conan endpoint to use."
2222
required: true
2323
type: string
2424
dependencies_force_build:
25-
description: 'Force building of all dependencies.'
25+
description: "Force building of all dependencies."
2626
required: false
2727
type: boolean
2828
default: false
2929
dependencies_force_upload:
30-
description: 'Force uploading of all dependencies.'
30+
description: "Force uploading of all dependencies."
3131
required: false
3232
type: boolean
3333
default: false
@@ -40,16 +40,16 @@ on:
4040
description: 'The strategy matrix to use for generating the configurations ("minimal", "all").'
4141
required: false
4242
type: string
43-
default: 'minimal'
43+
default: "minimal"
4444
secrets:
4545
codecov_token:
46-
description: 'The Codecov token to use for uploading coverage reports.'
46+
description: "The Codecov token to use for uploading coverage reports."
4747
required: false
4848
conan_remote_username:
49-
description: 'The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
49+
description: "The username for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
5050
required: false
5151
conan_remote_password:
52-
description: 'The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded.'
52+
description: "The password for logging into the Conan remote. If not provided, the dependencies will not be uploaded."
5353
required: false
5454

5555
concurrency:
@@ -88,6 +88,19 @@ jobs:
8888
runs-on: ${{ matrix.architecture.runner }}
8989
container: ${{ inputs.os == 'linux' && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version) || null }}
9090
steps:
91+
- name: Check strategy matrix
92+
run: |
93+
echo 'Operating system distro name: ${{ matrix.os.distro_name }}'
94+
echo 'Operating system distro version: ${{ matrix.os.distro_version }}'
95+
echo 'Operating system compiler name: ${{ matrix.os.compiler_name }}'
96+
echo 'Operating system compiler version: ${{ matrix.os.compiler_version }}'
97+
echo 'Architecture platform: ${{ matrix.architecture.platform }}'
98+
echo 'Architecture runner: ${{ toJson(matrix.architecture.runner) }}'
99+
echo 'Build type: ${{ matrix.build_type }}'
100+
echo 'Build only: ${{ matrix.build_only }}'
101+
echo 'CMake arguments: ${{ matrix.cmake_args }}'
102+
echo 'CMake target: ${{ matrix.cmake_target }}'
103+
echo 'Config name: ${{ matrix.config_name }}'
91104
- name: Clean workspace (MacOS)
92105
if: ${{ inputs.os == 'macos' }}
93106
run: |
@@ -125,7 +138,7 @@ jobs:
125138
if: ${{ inputs.os == 'macos' }}
126139
run: |
127140
echo 'Installing build tools.'
128-
brew install cmake conan ninja coreutils
141+
brew install --quiet cmake conan ninja coreutils
129142
- name: Check configuration (Linux and MacOS)
130143
if: ${{ inputs.os == 'linux' || inputs.os == 'macos' }}
131144
run: |

.github/workflows/check-missing-commits.yml

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,45 @@ jobs:
1818
check:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
23-
with:
24-
fetch-depth: 0
25-
- name: Check for missing commits
26-
env:
27-
MESSAGE: |
21+
- name: Checkout repository
22+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
23+
with:
24+
fetch-depth: 0
25+
- name: Check for missing commits
26+
env:
27+
MESSAGE: |
2828
29-
If you are reading this, then the commits indicated above are missing
30-
from the "develop" and/or "release" branch. Do a reverse-merge as soon
31-
as possible. See CONTRIBUTING.md for instructions.
32-
run: |
33-
set -o pipefail
34-
# Branches are ordered by how "canonical" they are. Every commit in one
35-
# branch should be in all the branches behind it.
36-
order=(master release develop)
37-
branches=()
38-
for branch in "${order[@]}"; do
39-
# Check that the branches exist so that this job will work on forked
40-
# repos, which don't necessarily have master and release branches.
41-
echo "Checking if ${branch} exists."
42-
if git ls-remote --exit-code --heads origin \
43-
refs/heads/${branch} > /dev/null; then
44-
branches+=(origin/${branch})
45-
fi
46-
done
29+
If you are reading this, then the commits indicated above are missing
30+
from the "develop" and/or "release" branch. Do a reverse-merge as soon
31+
as possible. See CONTRIBUTING.md for instructions.
32+
run: |
33+
set -o pipefail
34+
# Branches are ordered by how "canonical" they are. Every commit in one
35+
# branch should be in all the branches behind it.
36+
order=(master release develop)
37+
branches=()
38+
for branch in "${order[@]}"; do
39+
# Check that the branches exist so that this job will work on forked
40+
# repos, which don't necessarily have master and release branches.
41+
echo "Checking if ${branch} exists."
42+
if git ls-remote --exit-code --heads origin \
43+
refs/heads/${branch} > /dev/null; then
44+
branches+=(origin/${branch})
45+
fi
46+
done
47+
48+
prior=()
49+
for branch in "${branches[@]}"; do
50+
if [[ ${#prior[@]} -ne 0 ]]; then
51+
echo "Checking ${prior[@]} for commits missing from ${branch}."
52+
git log --oneline --no-merges "${prior[@]}" \
53+
^$branch | tee -a "missing-commits.txt"
54+
echo
55+
fi
56+
prior+=("${branch}")
57+
done
4758
48-
prior=()
49-
for branch in "${branches[@]}"; do
50-
if [[ ${#prior[@]} -ne 0 ]]; then
51-
echo "Checking ${prior[@]} for commits missing from ${branch}."
52-
git log --oneline --no-merges "${prior[@]}" \
53-
^$branch | tee -a "missing-commits.txt"
54-
echo
59+
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
60+
echo "${MESSAGE}"
61+
exit 1
5562
fi
56-
prior+=("${branch}")
57-
done
58-
59-
if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then
60-
echo "${MESSAGE}"
61-
exit 1
62-
fi

.github/workflows/notify-clio.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ on:
88
workflow_call:
99
inputs:
1010
conan_remote_name:
11-
description: 'The name of the Conan remote to use.'
11+
description: "The name of the Conan remote to use."
1212
required: true
1313
type: string
1414
conan_remote_url:
15-
description: 'The URL of the Conan endpoint to use.'
15+
description: "The URL of the Conan endpoint to use."
1616
required: true
1717
type: string
1818
secrets:
1919
clio_notify_token:
20-
description: 'The GitHub token to notify Clio about new versions.'
20+
description: "The GitHub token to notify Clio about new versions."
2121
required: true
2222
conan_remote_username:
23-
description: 'The username for logging into the Conan remote.'
23+
description: "The username for logging into the Conan remote."
2424
required: true
2525
conan_remote_password:
26-
description: 'The password for logging into the Conan remote.'
26+
description: "The password for logging into the Conan remote."
2727
required: true
2828

2929
concurrency:
@@ -36,6 +36,7 @@ defaults:
3636

3737
jobs:
3838
upload:
39+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
3940
runs-on: ubuntu-latest
4041
container: ghcr.io/xrplf/ci/ubuntu-noble:gcc-13
4142
steps:

0 commit comments

Comments
 (0)