From 3baf5454f2d7ec30f360a684ec7e05cdad38667b Mon Sep 17 00:00:00 2001 From: Bart Date: Wed, 11 Mar 2026 11:48:40 +0100 Subject: [PATCH 1/4] ci: Only upload artifacts in the XRPLF/rippled repository (#6523) This change will only attempt to upload artifacts for CI runs performed in the XRPLF/rippled repository. --- .github/workflows/on-pr.yml | 5 ++--- .github/workflows/on-tag.yml | 3 +-- .github/workflows/on-trigger.yml | 4 ++-- .github/workflows/reusable-build-test-config.yml | 4 ++-- .github/workflows/upload-conan-deps.yml | 4 ++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index b0010fe0ba..f54a95e223 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -141,9 +141,8 @@ jobs: needs: - should-run - build-test - # Only run when committing to a PR that targets a release branch in the - # XRPLF repository. - if: ${{ github.repository_owner == 'XRPLF' && needs.should-run.outputs.go == 'true' && startsWith(github.ref, 'refs/heads/release') }} + # Only run when committing to a PR that targets a release branch. + if: ${{ github.repository == 'XRPLF/rippled' && needs.should-run.outputs.go == 'true' && startsWith(github.ref, 'refs/heads/release') }} uses: ./.github/workflows/reusable-upload-recipe.yml secrets: remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }} diff --git a/.github/workflows/on-tag.yml b/.github/workflows/on-tag.yml index c6361b4016..af3ea4309e 100644 --- a/.github/workflows/on-tag.yml +++ b/.github/workflows/on-tag.yml @@ -17,8 +17,7 @@ defaults: jobs: upload-recipe: - # Only run when a tag is pushed to the XRPLF repository. - if: ${{ github.repository_owner == 'XRPLF' }} + if: ${{ github.repository == 'XRPLF/rippled' }} uses: ./.github/workflows/reusable-upload-recipe.yml secrets: remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }} diff --git a/.github/workflows/on-trigger.yml b/.github/workflows/on-trigger.yml index c7e0e8c3aa..5856c67bd3 100644 --- a/.github/workflows/on-trigger.yml +++ b/.github/workflows/on-trigger.yml @@ -92,8 +92,8 @@ jobs: upload-recipe: needs: build-test - # Only run when pushing to the develop branch in the XRPLF repository. - if: ${{ github.repository_owner == 'XRPLF' && github.event_name == 'push' && github.ref == 'refs/heads/develop' }} + # Only run when pushing to the develop branch. + if: ${{ github.repository == 'XRPLF/rippled' && github.event_name == 'push' && github.ref == 'refs/heads/develop' }} uses: ./.github/workflows/reusable-upload-recipe.yml secrets: remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }} diff --git a/.github/workflows/reusable-build-test-config.yml b/.github/workflows/reusable-build-test-config.yml index 75fe546b18..66f46709cd 100644 --- a/.github/workflows/reusable-build-test-config.yml +++ b/.github/workflows/reusable-build-test-config.yml @@ -176,7 +176,7 @@ jobs: fi - name: Upload the binary (Linux) - if: ${{ github.repository_owner == 'XRPLF' && runner.os == 'Linux' }} + if: ${{ github.repository == 'XRPLF/rippled' && runner.os == 'Linux' }} uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 with: name: xrpld-${{ inputs.config_name }} @@ -266,7 +266,7 @@ jobs: --target coverage - name: Upload coverage report - if: ${{ github.repository_owner == 'XRPLF' && !inputs.build_only && env.COVERAGE_ENABLED == 'true' }} + if: ${{ github.repository == 'XRPLF/rippled' && !inputs.build_only && env.COVERAGE_ENABLED == 'true' }} uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: disable_search: true diff --git a/.github/workflows/upload-conan-deps.yml b/.github/workflows/upload-conan-deps.yml index df8aa43a18..d0fea4b8ae 100644 --- a/.github/workflows/upload-conan-deps.yml +++ b/.github/workflows/upload-conan-deps.yml @@ -103,11 +103,11 @@ jobs: sanitizers: ${{ matrix.sanitizers }} - name: Log into Conan remote - if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} + if: ${{ github.repository == 'XRPLF/rippled' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.CONAN_REMOTE_USERNAME }}" --password "${{ secrets.CONAN_REMOTE_PASSWORD }}" - name: Upload Conan packages - if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} + if: ${{ github.repository == 'XRPLF/rippled' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }} env: FORCE_OPTION: ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }} run: conan upload "*" --remote="${CONAN_REMOTE_NAME}" --confirm ${FORCE_OPTION} From 01c977bbfe4a36eb8ab65084fa5781d44d8bc6e5 Mon Sep 17 00:00:00 2001 From: Bart Date: Wed, 11 Mar 2026 13:43:58 +0100 Subject: [PATCH 2/4] ci: Fix rules used to determine when to upload Conan recipes (#6524) The refs as previously used pointed to the source branch, not the target branch. However, determining the target branch is different depending on the GitHub event. The pull request logic was incorrect and needed to be fixed, and the logic inside the workflow could be simplified. Both modifications have been made in this commit. --- .github/workflows/on-pr.yml | 2 +- .github/workflows/reusable-upload-recipe.yml | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index f54a95e223..66893d19d3 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -142,7 +142,7 @@ jobs: - should-run - build-test # Only run when committing to a PR that targets a release branch. - if: ${{ github.repository == 'XRPLF/rippled' && needs.should-run.outputs.go == 'true' && startsWith(github.ref, 'refs/heads/release') }} + if: ${{ github.repository == 'XRPLF/rippled' && needs.should-run.outputs.go == 'true' && github.event_name == 'pull_request' && startsWith(github.event.pull_request.base.ref, 'release') }} uses: ./.github/workflows/reusable-upload-recipe.yml secrets: remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }} diff --git a/.github/workflows/reusable-upload-recipe.yml b/.github/workflows/reusable-upload-recipe.yml index 6245fd06e1..178dd65b8e 100644 --- a/.github/workflows/reusable-upload-recipe.yml +++ b/.github/workflows/reusable-upload-recipe.yml @@ -69,22 +69,28 @@ jobs: conan export . --version=${{ steps.version.outputs.version }} conan upload --confirm --check --remote="${REMOTE_NAME}" xrpl/${{ steps.version.outputs.version }} + # When this workflow is triggered by a push event, it will always be when merging into the + # 'develop' branch, see on-trigger.yml. - name: Upload Conan recipe (develop) - if: ${{ github.ref == 'refs/heads/develop' }} + if: ${{ github.event_name == 'push' }} env: REMOTE_NAME: ${{ inputs.remote_name }} run: | conan export . --version=develop conan upload --confirm --check --remote="${REMOTE_NAME}" xrpl/develop + # When this workflow is triggered by a pull request event, it will always be when merging into + # one of the 'release' branches, see on-pr.yml. - name: Upload Conan recipe (rc) - if: ${{ startsWith(github.ref, 'refs/heads/release') }} + if: ${{ github.event_name == 'pull_request' }} env: REMOTE_NAME: ${{ inputs.remote_name }} run: | conan export . --version=rc conan upload --confirm --check --remote="${REMOTE_NAME}" xrpl/rc + # When this workflow is triggered by a tag event, it will always be when tagging a final + # release, see on-tag.yml. - name: Upload Conan recipe (release) if: ${{ github.event_name == 'tag' }} env: From bee2d112c6cc067e478d5f9dbc9748ad927382c4 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Wed, 11 Mar 2026 13:18:18 +0000 Subject: [PATCH 3/4] ci: Fix how clang-tidy is run when .clang-tidy is changed (#6521) --- .clang-tidy | 2 +- .github/workflows/reusable-clang-tidy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index dd95153ff5..fc067fde6f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -100,9 +100,9 @@ Checks: "-*, # bugprone-crtp-constructor-accessibility, # bugprone-move-forwarding-reference, # bugprone-switch-missing-default-case, +# bugprone-unused-raii, # bugprone-unused-return-value, # bugprone-use-after-move, -# bugprone-unused-raii, # # cppcoreguidelines-misleading-capture-default-by-value, # cppcoreguidelines-init-variables, diff --git a/.github/workflows/reusable-clang-tidy.yml b/.github/workflows/reusable-clang-tidy.yml index 5319c1627a..3d4bc3b2e3 100644 --- a/.github/workflows/reusable-clang-tidy.yml +++ b/.github/workflows/reusable-clang-tidy.yml @@ -51,5 +51,5 @@ jobs: if: ${{ always() && !cancelled() && (!inputs.check_only_changed || needs.determine-files.outputs.any_cpp_changed == 'true' || needs.determine-files.outputs.clang_tidy_config_changed == 'true') }} uses: ./.github/workflows/reusable-clang-tidy-files.yml with: - files: ${{ (needs.determine-files.outputs.clang_tidy_config_changed == 'true' && '') || (inputs.check_only_changed && needs.determine-files.outputs.all_changed_files || '') }} + files: ${{ needs.determine-files.outputs.clang_tidy_config_changed == 'true' && '' || (inputs.check_only_changed && needs.determine-files.outputs.all_changed_files || '') }} create_issue_on_failure: ${{ inputs.create_issue_on_failure }} From 7b3724b7a35596a39e6ee740f5a16bf08d5ed54f Mon Sep 17 00:00:00 2001 From: Alex Kremer Date: Wed, 11 Mar 2026 14:04:26 +0000 Subject: [PATCH 4/4] fix: Add missed clang-tidy `bugprone-inc-dec-conditions` check (#6526) --- src/xrpld/app/ledger/detail/LedgerReplayer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xrpld/app/ledger/detail/LedgerReplayer.cpp b/src/xrpld/app/ledger/detail/LedgerReplayer.cpp index f649eb4d95..5aacf5b5a6 100644 --- a/src/xrpld/app/ledger/detail/LedgerReplayer.cpp +++ b/src/xrpld/app/ledger/detail/LedgerReplayer.cpp @@ -98,8 +98,12 @@ LedgerReplayer::createDeltas(std::shared_ptr task) { auto skipListItem = std::find(parameter.skipList_.begin(), parameter.skipList_.end(), parameter.startHash_); - if (skipListItem == parameter.skipList_.end() || - ++skipListItem == parameter.skipList_.end()) + auto const wasLast = skipListItem == parameter.skipList_.end(); + if (not wasLast) + ++skipListItem; + auto const isLast = skipListItem == parameter.skipList_.end(); + + if (wasLast || isLast) { JLOG(j_.error()) << "Task parameter error when creating deltas " << parameter.finishHash_;