-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Add validator-keys to xrpld project #7555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -235,6 +235,9 @@ jobs: | |
| run: | | ||
| loader="$(/tmp/loader-path.sh)" | ||
| patchelf --set-interpreter "${loader}" --remove-rpath "${{ env.BUILD_DIR }}/xrpld" | ||
| if [ -x "${{ env.BUILD_DIR }}/validator-keys" ]; then | ||
| patchelf --set-interpreter "${loader}" --remove-rpath "${{ env.BUILD_DIR }}/validator-keys" | ||
| fi | ||
|
|
||
| # We're only running aarch64 Linux builds in Ubuntu-based images, so this is kept simple | ||
| - name: Install libatomic (Linux aarch64) | ||
|
|
@@ -253,12 +256,21 @@ jobs: | |
| curl ${CCACHE_REMOTE_STORAGE%|*}/status || true | ||
| fi | ||
|
|
||
| - name: Stage binary artifacts (Linux) | ||
| if: ${{ github.event.repository.visibility == 'public' && runner.os == 'Linux' }} | ||
| run: | | ||
| mkdir -p "${BUILD_DIR}/artifacts" | ||
| cp "${BUILD_DIR}/xrpld" "${BUILD_DIR}/artifacts/xrpld" | ||
| if [ -x "${BUILD_DIR}/validator-keys" ]; then | ||
| cp "${BUILD_DIR}/validator-keys" "${BUILD_DIR}/artifacts/validator-keys" | ||
| fi | ||
|
|
||
| - name: Upload the binary (Linux) | ||
| if: ${{ github.event.repository.visibility == 'public' && runner.os == 'Linux' }} | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: xrpld-${{ inputs.config_name }} | ||
| path: ${{ env.BUILD_DIR }}/xrpld | ||
| path: ${{ env.BUILD_DIR }}/artifacts/* | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This changes the interface we provide, so outside scripts relying on our binaries might fail. |
||
| retention-days: 3 | ||
| if-no-files-found: error | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # Build the Conan package and run the consumer test package. | ||
| name: Test Conan package | ||
|
|
||
| # This workflow can only be triggered by other workflows. | ||
| on: | ||
| workflow_call: | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| test-conan-package: | ||
| runs-on: ubuntu-latest | ||
| container: ghcr.io/xrplf/xrpld/nix-ubuntu:sha-63ffdc3 | ||
| timeout-minutes: 90 | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | ||
|
|
||
| - name: Set up Conan | ||
| uses: ./.github/actions/setup-conan | ||
|
|
||
| - name: Export Conan package under test | ||
| run: conan export . --version=head | ||
|
|
||
| - name: Run Conan package test | ||
| working-directory: tests/conan | ||
| run: | | ||
| conan test . xrpl/head \ | ||
| --profile:all ci \ | ||
| --build=missing \ | ||
| --settings:all build_type=Release \ | ||
| --conf:all tools.build:jobs="$(nproc)" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't use nproc directly |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -133,9 +133,9 @@ endif() | |
|
|
||
| include(XrplCore) | ||
| include(XrplProtocolAutogen) | ||
| include(XrplValidatorKeys) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This order change hides the problem. |
||
| include(XrplInstall) | ||
| include(XrplPackaging) | ||
| include(XrplValidatorKeys) | ||
|
|
||
| if(tests) | ||
| include(CTest) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,22 @@ | ||
| option( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it would make sense to move this file content to validator-kets-tool/CMakeLists.txt? |
||
| validator_keys | ||
| "Enables building of validator-keys tool as a separate target (imported via FetchContent)" | ||
| "Enables building of the vendored validator-keys tool as a separate target" | ||
| OFF | ||
| ) | ||
|
|
||
| if(validator_keys) | ||
| git_branch(current_branch) | ||
| # default to tracking VK master branch unless we are on release | ||
| if(NOT (current_branch STREQUAL "release")) | ||
| set(current_branch "master") | ||
| endif() | ||
| message(STATUS "Tracking ValidatorKeys branch: ${current_branch}") | ||
| include(GNUInstallDirs) | ||
|
|
||
| FetchContent_Declare( | ||
| validator_keys | ||
| GIT_REPOSITORY https://github.com/ripple/validator-keys-tool.git | ||
| GIT_TAG "${current_branch}" | ||
| add_subdirectory( | ||
| "${CMAKE_SOURCE_DIR}/validator-keys-tool" | ||
| "${CMAKE_BINARY_DIR}/validator-keys-tool" | ||
| ) | ||
| FetchContent_MakeAvailable(validator_keys) | ||
| set_target_properties( | ||
| validator-keys | ||
| PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
| ) | ||
| install(TARGETS validator-keys RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
| install( | ||
| TARGETS validator-keys | ||
| RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT runtime | ||
| ) | ||
| endif() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to duplicate the binary name, I think