mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-29 18:10:34 +00:00
ci: test validator keys tool as libxrpl consumer
This commit is contained in:
9
.github/workflows/on-pr.yml
vendored
9
.github/workflows/on-pr.yml
vendored
@@ -67,6 +67,7 @@ jobs:
|
||||
.github/workflows/reusable-package.yml
|
||||
.github/workflows/reusable-strategy-matrix.yml
|
||||
.github/workflows/reusable-test.yml
|
||||
.github/workflows/reusable-test-conan-package.yml
|
||||
.github/workflows/reusable-upload-recipe.yml
|
||||
.clang-tidy
|
||||
.codecov.yml
|
||||
@@ -77,6 +78,7 @@ jobs:
|
||||
include/**
|
||||
src/**
|
||||
tests/**
|
||||
validator-keys-tool/**
|
||||
CMakeLists.txt
|
||||
conanfile.py
|
||||
conan.lock
|
||||
@@ -145,10 +147,16 @@ jobs:
|
||||
if: ${{ needs.should-run.outputs.go == 'true' }}
|
||||
uses: ./.github/workflows/reusable-package.yml
|
||||
|
||||
test-conan-package:
|
||||
needs: should-run
|
||||
if: ${{ needs.should-run.outputs.go == 'true' }}
|
||||
uses: ./.github/workflows/reusable-test-conan-package.yml
|
||||
|
||||
upload-recipe:
|
||||
needs:
|
||||
- should-run
|
||||
- build-test
|
||||
- test-conan-package
|
||||
# Only run when committing to a PR that targets a release branch.
|
||||
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
|
||||
@@ -180,6 +188,7 @@ jobs:
|
||||
- clang-tidy
|
||||
- build-test
|
||||
- package
|
||||
- test-conan-package
|
||||
- upload-recipe
|
||||
- notify-clio
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
5
.github/workflows/on-tag.yml
vendored
5
.github/workflows/on-tag.yml
vendored
@@ -16,8 +16,13 @@ defaults:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
test-conan-package:
|
||||
if: ${{ github.repository == 'XRPLF/rippled' }}
|
||||
uses: ./.github/workflows/reusable-test-conan-package.yml
|
||||
|
||||
upload-recipe:
|
||||
if: ${{ github.repository == 'XRPLF/rippled' }}
|
||||
needs: test-conan-package
|
||||
uses: ./.github/workflows/reusable-upload-recipe.yml
|
||||
secrets:
|
||||
remote_username: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
|
||||
9
.github/workflows/on-trigger.yml
vendored
9
.github/workflows/on-trigger.yml
vendored
@@ -24,6 +24,7 @@ on:
|
||||
- ".github/workflows/reusable-package.yml"
|
||||
- ".github/workflows/reusable-strategy-matrix.yml"
|
||||
- ".github/workflows/reusable-test.yml"
|
||||
- ".github/workflows/reusable-test-conan-package.yml"
|
||||
- ".github/workflows/reusable-upload-recipe.yml"
|
||||
- ".clang-tidy"
|
||||
- ".codecov.yml"
|
||||
@@ -34,6 +35,7 @@ on:
|
||||
- "include/**"
|
||||
- "src/**"
|
||||
- "tests/**"
|
||||
- "validator-keys-tool/**"
|
||||
- "CMakeLists.txt"
|
||||
- "conanfile.py"
|
||||
- "conan.lock"
|
||||
@@ -91,8 +93,13 @@ jobs:
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
test-conan-package:
|
||||
uses: ./.github/workflows/reusable-test-conan-package.yml
|
||||
|
||||
upload-recipe:
|
||||
needs: build-test
|
||||
needs:
|
||||
- build-test
|
||||
- test-conan-package
|
||||
# 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
|
||||
|
||||
14
.github/workflows/reusable-build-test-config.yml
vendored
14
.github/workflows/reusable-build-test-config.yml
vendored
@@ -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/*
|
||||
retention-days: 3
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
4
.github/workflows/reusable-package.yml
vendored
4
.github/workflows/reusable-package.yml
vendored
@@ -77,8 +77,8 @@ jobs:
|
||||
name: ${{ matrix.artifact_name }}
|
||||
path: ${{ env.BUILD_DIR }}
|
||||
|
||||
- name: Make binary executable
|
||||
run: chmod +x "${BUILD_DIR}/xrpld"
|
||||
- name: Make binaries executable
|
||||
run: chmod +x "${BUILD_DIR}/xrpld" "${BUILD_DIR}/validator-keys"
|
||||
|
||||
- name: Build package
|
||||
env:
|
||||
|
||||
35
.github/workflows/reusable-test-conan-package.yml
vendored
Normal file
35
.github/workflows/reusable-test-conan-package.yml
vendored
Normal file
@@ -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)"
|
||||
Reference in New Issue
Block a user