mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Align telemetry workflow build with main CI pipeline
Match reusable-build-test-config.yml exactly: - Use XRPLF/actions/prepare-runner for system-level ccache setup - Use XRPLF/actions/get-nproc for dynamic parallelism - Remove redundant Conan package cache (remote is the cache) - Remove explicit CMake compiler launchers (prepare-runner handles it) - Add CCACHE_SLOPPINESS and print-env step - Pin action versions to commit SHAs - Move secrets and github.event.inputs to env blocks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
77
.github/workflows/telemetry-validation.yml
vendored
77
.github/workflows/telemetry-validation.yml
vendored
@@ -60,9 +60,10 @@ concurrency:
|
||||
|
||||
env:
|
||||
BUILD_DIR: build
|
||||
CCACHE_REMOTE_ONLY: true
|
||||
CCACHE_REMOTE_STORAGE: "http://cache.dev.ripplex.io:8080|layout=bazel"
|
||||
CCACHE_NAMESPACE: telemetry-validation
|
||||
CCACHE_REMOTE_ONLY: true
|
||||
CCACHE_REMOTE_STORAGE: http://cache.dev.ripplex.io:8080|layout=bazel
|
||||
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime
|
||||
|
||||
jobs:
|
||||
validate-telemetry:
|
||||
@@ -72,44 +73,41 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl jq bc python3 python3-pip ninja-build ccache
|
||||
- name: Prepare runner
|
||||
uses: XRPLF/actions/prepare-runner@2cbf481018d930656e9276fcc20dc0e3a0be5b6d
|
||||
with:
|
||||
enable_ccache: true
|
||||
|
||||
- name: Print build environment
|
||||
uses: ./.github/actions/print-env
|
||||
|
||||
- name: Get number of processors
|
||||
uses: XRPLF/actions/get-nproc@cf0433aa74563aead044a1e395610c96d65a37cf
|
||||
id: nproc
|
||||
with:
|
||||
subtract: 2
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: pip3 install -r docker/telemetry/workload/requirements.txt
|
||||
|
||||
- name: Install Conan
|
||||
run: pip3 install conan
|
||||
|
||||
# ── Build steps (mirrors main CI: setup-conan → build-deps → cmake) ──
|
||||
|
||||
- name: Set up Conan
|
||||
- name: Setup Conan
|
||||
uses: ./.github/actions/setup-conan
|
||||
|
||||
- name: Log into Conan remote
|
||||
if: ${{ github.repository == 'XRPLF/rippled' }}
|
||||
run: conan remote login xrplf "${{ secrets.CONAN_REMOTE_USERNAME }}" --password "${{ secrets.CONAN_REMOTE_PASSWORD }}"
|
||||
env:
|
||||
CONAN_USER: ${{ secrets.CONAN_REMOTE_USERNAME }}
|
||||
CONAN_PASS: ${{ secrets.CONAN_REMOTE_PASSWORD }}
|
||||
run: conan remote login xrplf "$CONAN_USER" --password "$CONAN_PASS"
|
||||
|
||||
- name: Cache Conan packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.conan2/p
|
||||
key: telemetry-conan-${{ runner.os }}-${{ hashFiles('conanfile.py') }}
|
||||
restore-keys: |
|
||||
telemetry-conan-${{ runner.os }}-
|
||||
|
||||
# Use the same build-deps action as the main CI pipeline.
|
||||
# This runs conan install with --options:host='&:xrpld=True' which
|
||||
# sets xrpld=ON and telemetry=True (default) in the generated
|
||||
# CMake toolchain — no manual -D flags needed.
|
||||
- name: Build dependencies
|
||||
uses: ./.github/actions/build-deps
|
||||
with:
|
||||
build_nproc: 4
|
||||
build_nproc: ${{ steps.nproc.outputs.nproc }}
|
||||
build_type: Release
|
||||
|
||||
- name: Configure CMake
|
||||
@@ -119,19 +117,22 @@ jobs:
|
||||
-G Ninja \
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
..
|
||||
|
||||
- name: Build xrpld
|
||||
working-directory: ${{ env.BUILD_DIR }}
|
||||
env:
|
||||
BUILD_NPROC: ${{ steps.nproc.outputs.nproc }}
|
||||
run: |
|
||||
cmake \
|
||||
--build . \
|
||||
--config Release \
|
||||
--parallel $(nproc) \
|
||||
--parallel "${BUILD_NPROC}" \
|
||||
--target xrpld
|
||||
|
||||
- name: Show ccache statistics
|
||||
run: ccache --show-stats -vv
|
||||
|
||||
# ── Telemetry validation steps ──
|
||||
|
||||
- name: Make scripts executable
|
||||
@@ -140,14 +141,18 @@ jobs:
|
||||
- name: Run full telemetry validation
|
||||
id: validation
|
||||
env:
|
||||
XRPLD: ${{ env.BUILD_DIR }}/xrpld
|
||||
RPC_RATE: ${{ github.event.inputs.rpc_rate || '50' }}
|
||||
RPC_DURATION: ${{ github.event.inputs.rpc_duration || '120' }}
|
||||
TX_TPS: ${{ github.event.inputs.tx_tps || '5' }}
|
||||
TX_DURATION: ${{ github.event.inputs.tx_duration || '120' }}
|
||||
RUN_BENCHMARK: ${{ github.event.inputs.run_benchmark }}
|
||||
run: |
|
||||
ARGS="--xrpld ${{ env.BUILD_DIR }}/xrpld --skip-loki"
|
||||
ARGS="$ARGS --rpc-rate ${{ github.event.inputs.rpc_rate || '50' }}"
|
||||
ARGS="$ARGS --rpc-duration ${{ github.event.inputs.rpc_duration || '120' }}"
|
||||
ARGS="$ARGS --tx-tps ${{ github.event.inputs.tx_tps || '5' }}"
|
||||
ARGS="$ARGS --tx-duration ${{ github.event.inputs.tx_duration || '120' }}"
|
||||
if [ "${{ github.event.inputs.run_benchmark }}" = "true" ]; then
|
||||
ARGS="$ARGS --rpc-rate $RPC_RATE"
|
||||
ARGS="$ARGS --rpc-duration $RPC_DURATION"
|
||||
ARGS="$ARGS --tx-tps $TX_TPS"
|
||||
ARGS="$ARGS --tx-duration $TX_DURATION"
|
||||
if [ "$RUN_BENCHMARK" = "true" ]; then
|
||||
ARGS="$ARGS --with-benchmark"
|
||||
fi
|
||||
docker/telemetry/workload/run-full-validation.sh $ARGS
|
||||
@@ -155,7 +160,7 @@ jobs:
|
||||
|
||||
- name: Upload validation reports
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: telemetry-validation-reports
|
||||
path: /tmp/xrpld-validation/reports/
|
||||
@@ -163,7 +168,7 @@ jobs:
|
||||
|
||||
- name: Upload node logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: xrpld-node-logs
|
||||
path: /tmp/xrpld-validation/node*/debug.log
|
||||
|
||||
Reference in New Issue
Block a user