Files
pezkuwi-sdk/.github/workflows/check-pezframe-omni-bencher.yml
T
pezkuwichain cf23fed9c5 fix(ci): remove wasm32v1-none target to fix serde_core compilation (#346)
* docs: update workflow plan with completed CI fixes

* fix(ci): remove wasm32v1-none target installation to fix serde_core compilation

This removes the explicit `rustup target add wasm32v1-none` step from CI
workflows. When wasm32v1-none is installed, the wasm-builder uses it instead
of wasm32-unknown-unknown, which causes serde_core 1.0.228 to fail compilation
with "relaxing a default bound only does something for ?Sized" errors.

By not installing wasm32v1-none, the wasm-builder automatically falls back to
wasm32-unknown-unknown which compiles successfully.

This aligns with Polkadot SDK's CI configuration which also does not explicitly
install wasm32v1-none.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:41:10 +03:00

127 lines
4.8 KiB
YAML

name: Short benchmarks (pezframe-omni-bencher)
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
ARTIFACTS_NAME: pezframe-omni-bencher-artifacts
jobs:
isdraft:
uses: ./.github/workflows/reusable-isdraft.yml
preflight:
needs: isdraft
uses: ./.github/workflows/reusable-preflight.yml
quick-benchmarks-omni:
runs-on: ${{ needs.preflight.outputs.RUNNER_BENCHMARK }}
needs: [preflight]
if: ${{ needs.preflight.outputs.changes_rust }}
env:
RUSTFLAGS: "-C debug-assertions"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions"
RUST_LOG: "frame_omni_bencher=info,pezkuwi_sdk_frame=info"
timeout-minutes: 60
container:
image: ${{ needs.preflight.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Clean cargo cache to free disk space
run: |
cargo clean 2>/dev/null || true
rm -rf ~/.cargo/registry/cache 2>/dev/null || true
rm -rf ~/.cargo/git/db 2>/dev/null || true
- name: script
id: required
run: |
cargo build --locked --quiet --release -p asset-hub-zagros-runtime --features runtime-benchmarks
cargo run --locked --release -p pezframe-omni-bencher --quiet -- v1 benchmark pezpallet --runtime target/release/wbuild/asset-hub-zagros-runtime/asset_hub_zagros_runtime.compact.compressed.wasm --all --steps 2 --repeat 1 --quiet
runtime-matrix:
runs-on: ubuntu-latest
needs: [preflight]
if: ${{ needs.preflight.outputs.changes_rust }}
timeout-minutes: 30
outputs:
runtime: ${{ steps.runtime.outputs.runtime }}
container:
image: ${{ needs.preflight.outputs.IMAGE }}
name: Extract runtimes from matrix
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- id: runtime
run: |
RUNTIMES=$(jq '[.[] | select(.package != null)]' .github/workflows/runtimes-matrix.json)
RUNTIMES=$(echo $RUNTIMES | jq -c .)
echo "runtime=$RUNTIMES"
echo "runtime=$RUNTIMES" >> $GITHUB_OUTPUT
run-pezframe-omni-bencher:
runs-on: ${{ needs.preflight.outputs.RUNNER_BENCHMARK }}
needs: [preflight, runtime-matrix]
if: ${{ needs.preflight.outputs.changes_rust }}
timeout-minutes: 60
strategy:
fail-fast: false # keep running other workflows even if one fails, to see the logs of all possible failures
matrix:
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
bench_cmd: ["pallet", "overhead"]
container:
image: ${{ needs.preflight.outputs.IMAGE }}
env:
PACKAGE_NAME: ${{ matrix.runtime.package }}
FLAGS: ${{ matrix.runtime.bench_flags }}
RUST_LOG: "frame_omni_bencher=info,pezkuwi_sdk_frame=info"
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: script (benchmark ${{ matrix.bench_cmd }})
id: required
shell: bash
run: |
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME
BENCH_CMD=${{ matrix.bench_cmd }}
cargo build --release --locked -p $PACKAGE_NAME -p pezframe-omni-bencher --features=${{ matrix.runtime.bench_features }} --quiet
echo "Running short $BENCH_CMD benchmarking for PACKAGE_NAME=$PACKAGE_NAME and RUNTIME_BLOB_PATH=$RUNTIME_BLOB_PATH"
ls -lrt $RUNTIME_BLOB_PATH
if [[ "$BENCH_CMD" == "pallet" ]]; then
cmd="./target/release/pezframe-omni-bencher v1 benchmark pezpallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1 $FLAGS"
elif [[ "$BENCH_CMD" == "overhead" ]]; then
cmd="./target/release/pezframe-omni-bencher v1 benchmark overhead --runtime $RUNTIME_BLOB_PATH"
else
echo "Error: Unknown BENCH_CMD value: $BENCH_CMD"
exit 1
fi
echo "Running command: $cmd"
eval "$cmd"
confirm-pezframe-omni-benchers-passed:
runs-on: ubuntu-latest
name: All benchmarks passed
needs: [quick-benchmarks-omni, run-pezframe-omni-bencher]
if: always() && !cancelled()
steps:
- run: |
tee resultfile <<< '${{ toJSON(needs) }}'
FAILURES=$(cat resultfile | grep '"result": "failure"' | wc -l)
if [ $FAILURES -gt 0 ]; then
echo "### At least one required job failed ❌" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY
fi