Skip to content

Commit 103e9ba

Browse files
authored
Merge branch 'develop' into server_definitions2
2 parents 7e7f497 + 40198d9 commit 103e9ba

29 files changed

+133
-1072
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ description: "Install Conan dependencies, optionally forcing a rebuild of all de
44
# Note that actions do not support 'type' and all inputs are strings, see
55
# https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#inputs.
66
inputs:
7-
build_dir:
8-
description: "The directory where to build."
9-
required: true
107
build_type:
118
description: 'The build type to use ("Debug", "Release").'
129
required: true
@@ -28,22 +25,18 @@ runs:
2825
- name: Install Conan dependencies
2926
shell: bash
3027
env:
31-
BUILD_DIR: ${{ inputs.build_dir }}
3228
BUILD_NPROC: ${{ inputs.build_nproc }}
3329
BUILD_OPTION: ${{ inputs.force_build == 'true' && '*' || 'missing' }}
3430
BUILD_TYPE: ${{ inputs.build_type }}
3531
LOG_VERBOSITY: ${{ inputs.log_verbosity }}
3632
run: |
3733
echo 'Installing dependencies.'
38-
mkdir -p "${BUILD_DIR}"
39-
cd "${BUILD_DIR}"
4034
conan install \
41-
--output-folder . \
4235
--build="${BUILD_OPTION}" \
4336
--options:host='&:tests=True' \
4437
--options:host='&:xrpld=True' \
4538
--settings:all build_type="${BUILD_TYPE}" \
4639
--conf:all tools.build:jobs=${BUILD_NPROC} \
4740
--conf:all tools.build:verbosity="${LOG_VERBOSITY}" \
4841
--conf:all tools.compilation:verbosity="${LOG_VERBOSITY}" \
49-
..
42+
.

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defaults:
2222
shell: bash
2323

2424
env:
25-
BUILD_DIR: .build
25+
BUILD_DIR: build
2626
NPROC_SUBTRACT: 2
2727

2828
jobs:
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
3737

3838
- name: Get number of processors
39-
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
39+
uses: XRPLF/actions/get-nproc@2ece4ec6ab7de266859a6f053571425b2bd684b6
4040
id: nproc
4141
with:
4242
subtract: ${{ env.NPROC_SUBTRACT }}

.github/workflows/reusable-build-test-config.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ name: Build and test configuration
33
on:
44
workflow_call:
55
inputs:
6-
build_dir:
7-
description: "The directory where to build."
8-
required: true
9-
type: string
10-
116
build_only:
127
description: 'Whether to only build or to build and test the code ("true", "false").'
138
required: true
@@ -59,6 +54,11 @@ defaults:
5954
run:
6055
shell: bash
6156

57+
env:
58+
# Conan installs the generators in the build/generators directory, see the
59+
# layout() method in conanfile.py. We then run CMake from the build directory.
60+
BUILD_DIR: build
61+
6262
jobs:
6363
build-and-test:
6464
name: ${{ inputs.config_name }}
@@ -71,21 +71,21 @@ jobs:
7171
steps:
7272
- name: Cleanup workspace (macOS and Windows)
7373
if: ${{ runner.os == 'macOS' || runner.os == 'Windows' }}
74-
uses: XRPLF/actions/.github/actions/cleanup-workspace@01b244d2718865d427b499822fbd3f15e7197fcc
74+
uses: XRPLF/actions/cleanup-workspace@2ece4ec6ab7de266859a6f053571425b2bd684b6
7575

7676
- name: Checkout repository
7777
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
7878

7979
- name: Prepare runner
80-
uses: XRPLF/actions/.github/actions/prepare-runner@99685816bb60a95a66852f212f382580e180df3a
80+
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
8181
with:
8282
disable_ccache: false
8383

8484
- name: Print build environment
8585
uses: ./.github/actions/print-env
8686

8787
- name: Get number of processors
88-
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
88+
uses: XRPLF/actions/get-nproc@2ece4ec6ab7de266859a6f053571425b2bd684b6
8989
id: nproc
9090
with:
9191
subtract: ${{ inputs.nproc_subtract }}
@@ -96,15 +96,14 @@ jobs:
9696
- name: Build dependencies
9797
uses: ./.github/actions/build-deps
9898
with:
99-
build_dir: ${{ inputs.build_dir }}
10099
build_nproc: ${{ steps.nproc.outputs.nproc }}
101100
build_type: ${{ inputs.build_type }}
102101
# Set the verbosity to "quiet" for Windows to avoid an excessive
103102
# amount of logs. For other OSes, the "verbose" logs are more useful.
104103
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
105104

106105
- name: Configure CMake
107-
working-directory: ${{ inputs.build_dir }}
106+
working-directory: ${{ env.BUILD_DIR }}
108107
env:
109108
BUILD_TYPE: ${{ inputs.build_type }}
110109
CMAKE_ARGS: ${{ inputs.cmake_args }}
@@ -117,7 +116,7 @@ jobs:
117116
..
118117
119118
- name: Build the binary
120-
working-directory: ${{ inputs.build_dir }}
119+
working-directory: ${{ env.BUILD_DIR }}
121120
env:
122121
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
123122
BUILD_TYPE: ${{ inputs.build_type }}
@@ -132,8 +131,6 @@ jobs:
132131
- name: Upload the binary (Linux)
133132
if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }}
134133
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
135-
env:
136-
BUILD_DIR: ${{ inputs.build_dir }}
137134
with:
138135
name: xrpld-${{ inputs.config_name }}
139136
path: ${{ env.BUILD_DIR }}/xrpld
@@ -142,7 +139,7 @@ jobs:
142139

143140
- name: Check linking (Linux)
144141
if: ${{ runner.os == 'Linux' }}
145-
working-directory: ${{ inputs.build_dir }}
142+
working-directory: ${{ env.BUILD_DIR }}
146143
run: |
147144
ldd ./xrpld
148145
if [ "$(ldd ./xrpld | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then
@@ -154,13 +151,13 @@ jobs:
154151
155152
- name: Verify presence of instrumentation (Linux)
156153
if: ${{ runner.os == 'Linux' && env.ENABLED_VOIDSTAR == 'true' }}
157-
working-directory: ${{ inputs.build_dir }}
154+
working-directory: ${{ env.BUILD_DIR }}
158155
run: |
159156
./xrpld --version | grep libvoidstar
160157
161158
- name: Run the separate tests
162159
if: ${{ !inputs.build_only }}
163-
working-directory: ${{ inputs.build_dir }}
160+
working-directory: ${{ env.BUILD_DIR }}
164161
# Windows locks some of the build files while running tests, and parallel jobs can collide
165162
env:
166163
BUILD_TYPE: ${{ inputs.build_type }}
@@ -173,7 +170,7 @@ jobs:
173170
174171
- name: Run the embedded tests
175172
if: ${{ !inputs.build_only }}
176-
working-directory: ${{ runner.os == 'Windows' && format('{0}/{1}', inputs.build_dir, inputs.build_type) || inputs.build_dir }}
173+
working-directory: ${{ runner.os == 'Windows' && format('{0}/{1}', env.BUILD_DIR, inputs.build_type) || env.BUILD_DIR }}
177174
env:
178175
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
179176
run: |
@@ -189,7 +186,7 @@ jobs:
189186
190187
- name: Prepare coverage report
191188
if: ${{ !inputs.build_only && env.ENABLED_COVERAGE == 'true' }}
192-
working-directory: ${{ inputs.build_dir }}
189+
working-directory: ${{ env.BUILD_DIR }}
193190
env:
194191
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
195192
BUILD_TYPE: ${{ inputs.build_type }}
@@ -207,7 +204,7 @@ jobs:
207204
disable_search: true
208205
disable_telem: true
209206
fail_ci_if_error: true
210-
files: ${{ inputs.build_dir }}/coverage.xml
207+
files: ${{ env.BUILD_DIR }}/coverage.xml
211208
plugins: noop
212209
token: ${{ secrets.CODECOV_TOKEN }}
213210
verbose: true

.github/workflows/reusable-build-test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ name: Build and test
88
on:
99
workflow_call:
1010
inputs:
11-
build_dir:
12-
description: "The directory where to build."
13-
required: false
14-
type: string
15-
default: ".build"
1611
os:
1712
description: 'The operating system to use for the build ("linux", "macos", "windows").'
1813
required: true
@@ -46,7 +41,6 @@ jobs:
4641
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
4742
max-parallel: 10
4843
with:
49-
build_dir: ${{ inputs.build_dir }}
5044
build_only: ${{ matrix.build_only }}
5145
build_type: ${{ matrix.build_type }}
5246
cmake_args: ${{ matrix.cmake_args }}

.github/workflows/upload-conan-deps.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,21 @@ jobs:
6464
steps:
6565
- name: Cleanup workspace (macOS and Windows)
6666
if: ${{ runner.os == 'macOS' || runner.os == 'Windows' }}
67-
uses: XRPLF/actions/.github/actions/cleanup-workspace@01b244d2718865d427b499822fbd3f15e7197fcc
67+
uses: XRPLF/actions/cleanup-workspace@2ece4ec6ab7de266859a6f053571425b2bd684b6
6868

6969
- name: Checkout repository
7070
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
7171

7272
- name: Prepare runner
73-
uses: XRPLF/actions/.github/actions/prepare-runner@99685816bb60a95a66852f212f382580e180df3a
73+
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
7474
with:
7575
disable_ccache: false
7676

7777
- name: Print build environment
7878
uses: ./.github/actions/print-env
7979

8080
- name: Get number of processors
81-
uses: XRPLF/actions/.github/actions/get-nproc@046b1620f6bfd6cd0985dc82c3df02786801fe0a
81+
uses: XRPLF/actions/get-nproc@2ece4ec6ab7de266859a6f053571425b2bd684b6
8282
id: nproc
8383
with:
8484
subtract: ${{ env.NPROC_SUBTRACT }}
@@ -92,7 +92,6 @@ jobs:
9292
- name: Build dependencies
9393
uses: ./.github/actions/build-deps
9494
with:
95-
build_dir: .build
9695
build_nproc: ${{ steps.nproc.outputs.nproc }}
9796
build_type: ${{ matrix.build_type }}
9897
force_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }}

0 commit comments

Comments
 (0)