mirror of
https://github.com/wownero/wownero.git
synced 2026-10-21 01:18:35 +02:00
159 lines
6.0 KiB
YAML
159 lines
6.0 KiB
YAML
name: Wownero FCMP testnet
|
|
|
|
on:
|
|
push:
|
|
branches: [fcmp-testnet]
|
|
pull_request:
|
|
branches: [fcmp-testnet]
|
|
workflow_dispatch:
|
|
inputs:
|
|
build_run_id:
|
|
description: Successful push build at this source commit
|
|
required: true
|
|
type: string
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
concurrency:
|
|
group: wow-fcmp-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
RUSTUP_TOOLCHAIN: 1.93.0
|
|
CARGO_BUILD_JOBS: 2
|
|
CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL: 3
|
|
|
|
jobs:
|
|
build:
|
|
if: github.event_name != 'workflow_dispatch'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: ubuntu-24.04
|
|
architecture: x86_64
|
|
- runner: ubuntu-24.04-arm
|
|
architecture: aarch64
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 90
|
|
steps:
|
|
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
persist-credentials: false
|
|
- name: Verify artifact guards
|
|
run: python3 -m unittest discover -s contrib/ci -p 'test_*.py'
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential cmake pkg-config libboost-all-dev \
|
|
libssl-dev libzmq3-dev libunbound-dev libsodium-dev libunwind-dev \
|
|
libreadline-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler
|
|
rustup toolchain install 1.93.0 --profile minimal
|
|
- name: Configure and build
|
|
run: |
|
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DARCH=default \
|
|
-DBUILD_TESTS=ON -DBUILD_GUI_DEPS=OFF \
|
|
-DWOWNERO_FCMP_TESTNET=ON -DBUILD_WOW_MINER_PROOF_EXPERIMENT=ON
|
|
cmake --build build --parallel 2 --target daemon simplewallet wallet_rpc_server \
|
|
wow_miner_proof_tests wow_testnet_tests wow_release_regressions \
|
|
wow_pow_vectors wow_local_network
|
|
- name: Verify native tests
|
|
run: |
|
|
ctest --test-dir build --output-on-failure -R '^wow_(miner_proof|testnet|release_regressions)$'
|
|
build/tests/wow_miner_proof/wow_pow_vectors | tee pow-vectors.log
|
|
build/tests/wow_miner_proof/wow_local_network --rpc-read-check
|
|
- name: Package research artifacts
|
|
env:
|
|
WOW_ARCHITECTURE: ${{ matrix.architecture }}
|
|
run: |
|
|
python3 contrib/ci/fcmp_testnet_artifacts.py package build package
|
|
tar -czf "wownero-fcmp-${WOW_ARCHITECTURE}.tar.gz" -C package .
|
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
with:
|
|
name: wow-fcmp-${{ matrix.architecture }}-${{ github.sha }}
|
|
path: wownero-fcmp-${{ matrix.architecture }}.tar.gz
|
|
if-no-files-found: error
|
|
retention-days: 30
|
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
if: always()
|
|
with:
|
|
name: wow-fcmp-checks-${{ matrix.architecture }}-${{ github.sha }}
|
|
path: |
|
|
build/Testing/Temporary/LastTest.log
|
|
pow-vectors.log
|
|
if-no-files-found: warn
|
|
retention-days: 30
|
|
|
|
network:
|
|
if: github.event_name == 'workflow_dispatch'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: ubuntu-24.04
|
|
architecture: x86_64
|
|
- runner: ubuntu-24.04-arm
|
|
architecture: aarch64
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Verify build admission
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
WOW_BUILD_RUN_ID: ${{ inputs.build_run_id }}
|
|
run: |
|
|
if [[ ! "$WOW_BUILD_RUN_ID" =~ ^[0-9]+$ ]]; then
|
|
echo 'Build run ID must be numeric' >&2
|
|
exit 1
|
|
fi
|
|
gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${WOW_BUILD_RUN_ID}" > build-run.json
|
|
python3 - <<'PY'
|
|
import json, os
|
|
with open('build-run.json') as stream:
|
|
run = json.load(stream)
|
|
expected = {'status': 'completed', 'conclusion': 'success', 'event': 'push',
|
|
'head_sha': os.environ['GITHUB_SHA'], 'head_branch': 'fcmp-testnet',
|
|
'path': '.github/workflows/build.yml'}
|
|
for name, value in expected.items():
|
|
if run.get(name) != value:
|
|
raise SystemExit('Build admission refused: ' + name + ' does not match the required build')
|
|
PY
|
|
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
with:
|
|
name: wow-fcmp-${{ matrix.architecture }}-${{ github.sha }}
|
|
run-id: ${{ inputs.build_run_id }}
|
|
github-token: ${{ github.token }}
|
|
path: artifacts
|
|
- name: Install runtime dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libboost-all-dev libssl-dev libzmq3-dev libunbound-dev \
|
|
libsodium-dev libunwind-dev libreadline-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev
|
|
- name: Verify package and run network acceptance
|
|
env:
|
|
WOW_ARCHITECTURE: ${{ matrix.architecture }}
|
|
run: |
|
|
python3 contrib/ci/fcmp_testnet_artifacts.py unpack \
|
|
"artifacts/wownero-fcmp-${WOW_ARCHITECTURE}.tar.gz" package
|
|
python3 contrib/ci/fcmp_testnet_artifacts.py verify package
|
|
package/libexec/wow_local_network "$PWD/package/bin/wownero-fcmp-testnetd" \
|
|
"$RUNNER_TEMP/wow-fcmp-network" 2>&1 | tee network.log
|
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
if: always()
|
|
with:
|
|
name: wow-fcmp-network-${{ matrix.architecture }}-${{ github.sha }}
|
|
path: network.log
|
|
if-no-files-found: warn
|
|
retention-days: 30
|