0dbe3a7032
- Regenerate EQUIVOCATION_PROOF_BLOB in pezpallet-babe benchmarking: the old blob contained stale header hashes that caused check_equivocation_proof to fail with assertion error - Exclude pezpallet_revive from quick-benchmarks via --exclude-pezpallets flag: revive benchmarks require PolkaVM toolchain (riscv64emac-unknown-none-polkavm) for fixture compilation which is not available in CI. This removes continue-on-error so real benchmark failures are now visible - Increase build-rustdoc timeout from 180 to 240 minutes for VPS runner
108 lines
4.2 KiB
YAML
108 lines
4.2 KiB
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
merge_group:
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
isdraft:
|
|
uses: ./.github/workflows/reusable-isdraft.yml
|
|
preflight:
|
|
needs: isdraft
|
|
uses: ./.github/workflows/reusable-preflight.yml
|
|
|
|
# This job runs all benchmarks defined in the `/bin/node/runtime` once to check that there are no errors.
|
|
quick-benchmarks:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER }}
|
|
timeout-minutes: 180
|
|
# pezpallet_revive excluded: requires PolkaVM toolchain for fixture compilation.
|
|
# Track via: https://github.com/pezkuwichain/pezkuwi-sdk/issues/TBD
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
env:
|
|
RUSTFLAGS: "-C debug-assertions -D warnings"
|
|
RUST_BACKTRACE: "full"
|
|
WASM_BUILD_NO_COLOR: 1
|
|
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
|
|
CARGO_INCREMENTAL: 0
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Disable forklift cache wrapper
|
|
run: echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
with:
|
|
shared-key: quick-benchmarks
|
|
cache-on-failure: true
|
|
|
|
- name: Install wasm32v1-none target
|
|
run: rustup target add wasm32v1-none
|
|
|
|
- name: script
|
|
run: cargo run --locked --release -p pezstaging-node-cli --bin bizinikiwi-node --features runtime-benchmarks --quiet -- benchmark pezpallet --chain dev --pezpallet "*" --extrinsic "*" --exclude-pezpallets pezpallet_revive --steps 2 --repeat 1 --quiet
|
|
|
|
# cf https://github.com/pezkuwichain/pezkuwi-sdk/issues/1652
|
|
test-syscalls:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER }}
|
|
timeout-minutes: 120
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
continue-on-error: true # this rarely triggers in practice
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Disable forklift cache wrapper
|
|
run: echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
|
|
- name: Install wasm32v1-none target
|
|
run: rustup target add wasm32v1-none
|
|
- name: script
|
|
id: test
|
|
run: |
|
|
cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin pezkuwi-execute-worker --bin pezkuwi-prepare-worker --quiet
|
|
cd pezkuwi/scripts/list-syscalls
|
|
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/pezkuwi-execute-worker --only-used-syscalls | diff -u execute-worker-syscalls -
|
|
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/pezkuwi-prepare-worker --only-used-syscalls | diff -u prepare-worker-syscalls -
|
|
- name: on_failure
|
|
if: failure() && steps.test.outcome == 'failure'
|
|
run: |
|
|
echo "The x86_64 syscalls used by the worker binaries have changed. Please review if this is expected and update pezkuwi/scripts/list-syscalls/*-worker-syscalls as needed." >> $GITHUB_STEP_SUMMARY
|
|
|
|
cargo-check-all-benches:
|
|
needs: [preflight]
|
|
if: ${{ needs.preflight.outputs.changes_rust }}
|
|
runs-on: ${{ needs.preflight.outputs.RUNNER }}
|
|
timeout-minutes: 75
|
|
container:
|
|
image: ${{ needs.preflight.outputs.IMAGE }}
|
|
env:
|
|
SKIP_WASM_BUILD: 1
|
|
CARGO_INCREMENTAL: 0
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- name: Disable forklift cache wrapper
|
|
run: echo "RUSTC_WRAPPER=" >> $GITHUB_ENV
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
|
with:
|
|
shared-key: check-all-benches
|
|
cache-on-failure: true
|
|
|
|
- name: script
|
|
run: |
|
|
cargo check --workspace --locked --benches --features runtime-benchmarks --quiet
|