Skip to content

Commit 455082d

Browse files
authored
Merge branch 'develop' into bugfix/workaround-amendmentcenter-exception
2 parents e81a4ba + bb3159b commit 455082d

22 files changed

+1328
-47
lines changed

.github/actions/cmake/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ runs:
5757
STATIC: "${{ inputs.static == 'true' && 'ON' || 'OFF' }}"
5858
TIME_TRACE: "${{ inputs.time_trace == 'true' && 'ON' || 'OFF' }}"
5959
PACKAGE: "${{ inputs.package == 'true' && 'ON' || 'OFF' }}"
60+
# GitHub creates a merge commit for a PR
61+
# https://www.kenmuse.com/blog/the-many-shas-of-a-github-pull-request/
62+
#
63+
# We:
64+
# - explicitly provide branch name
65+
# - use `github.head_ref` to get the SHA of last commit in the PR branch
66+
#
67+
# This way it works both for PRs and pushes to branches.
68+
GITHUB_BRANCH_NAME: "${{ github.head_ref || github.ref_name }}"
69+
GITHUB_HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
6070
run: |
6171
cmake \
6272
-B "${BUILD_DIR}" \

.github/workflows/check-libxrpl.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
fetch-depth: 0
3030

3131
- name: Prepare runner
32-
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
32+
uses: XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
3333
with:
34-
disable_ccache: true
34+
enable_ccache: false
3535

3636
- name: Update libXRPL version requirement
3737
run: |

.github/workflows/clang-tidy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
fetch-depth: 0
4545

4646
- name: Prepare runner
47-
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
47+
uses: XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
4848
with:
49-
disable_ccache: true
49+
enable_ccache: false
5050

5151
- name: Run conan
5252
uses: ./.github/actions/conan

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
lfs: true
2828

2929
- name: Prepare runner
30-
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
30+
uses: XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
3131
with:
32-
disable_ccache: true
32+
enable_ccache: false
3333

3434
- name: Create build directory
3535
run: mkdir build_docs

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
run-hooks:
11-
uses: XRPLF/actions/.github/workflows/pre-commit.yml@34790936fae4c6c751f62ec8c06696f9c1a5753a
11+
uses: XRPLF/actions/.github/workflows/pre-commit.yml@5ca417783f0312ab26d6f48b85c78edf1de99bbd
1212
with:
1313
runs_on: heavy
1414
container: '{ "image": "ghcr.io/xrplf/clio-pre-commit:067449c3f8ae6755ea84752ea2962b589fe56c8f" }'

.github/workflows/reusable-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ jobs:
9999
ref: ${{ github.ref }}
100100

101101
- name: Prepare runner
102-
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
102+
uses: XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
103103
with:
104-
disable_ccache: ${{ !inputs.download_ccache }}
104+
enable_ccache: ${{ inputs.download_ccache }}
105105

106106
- name: Setup conan on macOS
107107
if: ${{ runner.os == 'macOS' }}

.github/workflows/reusable-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ jobs:
6060
fetch-depth: 0
6161

6262
- name: Prepare runner
63-
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
63+
uses: XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
6464
with:
65-
disable_ccache: true
65+
enable_ccache: false
6666

6767
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
6868
with:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ jobs:
7878
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7979

8080
- name: Prepare runner
81-
uses: XRPLF/actions/prepare-runner@2ece4ec6ab7de266859a6f053571425b2bd684b6
81+
uses: XRPLF/actions/prepare-runner@65da1c59e81965eeb257caa3587b9d45066fb925
8282
with:
83-
disable_ccache: true
83+
enable_ccache: false
8484

8585
- name: Setup conan on macOS
8686
if: ${{ runner.os == 'macOS' }}

cmake/ClioVersion.cmake

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
find_package(Git REQUIRED)
22

3+
if (DEFINED ENV{GITHUB_BRANCH_NAME})
4+
set(GIT_BUILD_BRANCH $ENV{GITHUB_BRANCH_NAME})
5+
set(GIT_COMMIT_HASH $ENV{GITHUB_HEAD_SHA})
6+
else ()
7+
set(GIT_COMMAND branch --show-current)
8+
execute_process(
9+
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_BUILD_BRANCH
10+
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
11+
)
12+
13+
set(GIT_COMMAND rev-parse HEAD)
14+
execute_process(
15+
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMIT_HASH
16+
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
17+
)
18+
endif ()
19+
20+
set(GIT_COMMAND show -s --date=format:%Y%m%d%H%M%S --format=%cd)
21+
execute_process(
22+
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_DATE
23+
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
24+
)
25+
26+
message(STATUS "Git branch: ${GIT_BUILD_BRANCH}")
27+
message(STATUS "Git commit hash: ${GIT_COMMIT_HASH}")
28+
message(STATUS "Build date: ${BUILD_DATE}")
29+
330
set(GIT_COMMAND describe --tags --exact-match)
431
execute_process(
532
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND}
@@ -12,31 +39,16 @@ execute_process(
1239

1340
if (RC EQUAL 0)
1441
message(STATUS "Found tag '${TAG}' in git. Will use it as Clio version")
42+
1543
set(CLIO_VERSION "${TAG}")
1644
set(DOC_CLIO_VERSION "${TAG}")
1745
else ()
1846
message(STATUS "Error finding tag in git: ${ERR}")
19-
message(STATUS "Will use 'YYYYMMDDHMS-<branch>-<git-rev>' as Clio version")
20-
21-
set(GIT_COMMAND show -s --date=format:%Y%m%d%H%M%S --format=%cd)
22-
execute_process(
23-
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE DATE
24-
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
25-
)
26-
27-
set(GIT_COMMAND branch --show-current)
28-
execute_process(
29-
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BRANCH
30-
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
31-
)
47+
message(STATUS "Will use 'YYYYMMDDHMS-<branch>-<git short rev>' as Clio version")
3248

33-
set(GIT_COMMAND rev-parse --short HEAD)
34-
execute_process(
35-
COMMAND ${GIT_EXECUTABLE} ${GIT_COMMAND} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE REV
36-
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY
37-
)
49+
string(SUBSTRING ${GIT_COMMIT_HASH} 0 7 GIT_COMMIT_HASH_SHORT)
3850

39-
set(CLIO_VERSION "${DATE}-${BRANCH}-${REV}")
51+
set(CLIO_VERSION "${BUILD_DATE}-${GIT_BUILD_BRANCH}-${GIT_COMMIT_HASH_SHORT}")
4052
set(DOC_CLIO_VERSION "develop")
4153
endif ()
4254

docs/config-description.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,14 @@ This document provides a list of all available Clio configuration properties in
457457
- **Constraints**: None
458458
- **Description**: Max allowed difference between the latest sequence in DB and in cache file. If the cache file is too old (contains too low latest sequence) Clio will reject using it.
459459

460+
### cache.file.async_save
461+
462+
- **Required**: True
463+
- **Type**: boolean
464+
- **Default value**: `False`
465+
- **Constraints**: None
466+
- **Description**: When false, Clio waits for cache saving to finish before shutting down. When true, cache saving runs in parallel with other shutdown operations.
467+
460468
### log.channels.[].channel
461469

462470
- **Required**: False

0 commit comments

Comments
 (0)