Skip to content

Commit

Permalink
PoC for short benchmarking in CI with frame-omni-bencher
Browse files Browse the repository at this point in the history
Update .github/workflows/test.yml

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

add time to cmd
  • Loading branch information
bkontur committed May 24, 2024
1 parent 0cf3bdd commit 0ed5d61
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,30 @@ jobs:
RUSTFLAGS: "-C debug-assertions -D warnings"
SKIP_WASM_BUILD: 1

- name: Test benchmarks ${{ matrix.runtime.name }}
run: |
PACKAGE_NAME=${{ matrix.runtime.package }}
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
RUNTIME_BLOB_PATH=./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME
# TODO: remove
echo "Running benchmarking for RUNTIME_BLOB_PATH=$RUNTIME_BLOB_PATH"
# build wasm
cargo build --profile production -p ${{ matrix.runtime.package }} --features=runtime-benchmarks -q --locked
# TODO: remove
ls -lrt $RUNTIME_BLOB_PATH
# TODO: get `frame-omni-bencher` somehow - GHA? or download released binary? or whatever?
# TODO: we just try to build in-place
time git clone https://github.com/paritytech/polkadot-sdk --branch master --depth 1
git branch
cd ./polkadot-sdk
time cargo build --locked --release -p frame-omni-bencher
cd ..
# run benchmarking
echo "Running benchmarking for RUNTIME_BLOB_PATH=$RUNTIME_BLOB_PATH"
./polkadot-sdk/target/release/frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1
env:
RUSTFLAGS: "-C debug-assertions -D warnings"

integration-test:
needs: [integration-test-matrix]
continue-on-error: true
Expand Down

0 comments on commit 0ed5d61

Please sign in to comment.