Skip to content

Commit

Permalink
Download frame-omni-bencher from release artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jun 14, 2024
1 parent f5a2177 commit d6d41c4
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
workflow_dispatch:

env:
FRAME_OMNI_BENCHER_RELEASE_VERSION: polkadot-v1.11.0

# cancel previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -83,6 +86,13 @@ jobs:
with:
shared-key: "fellowship-cache-tests"

- name: Download frame-omni-bencher
run: |
curl -sL https://github.com/paritytech/polkadot-sdk/releases/download/$FRAME_OMNI_BENCHER_RELEASE_VERSION/frame-omni-bencher -o frame-omni-bencher
chmod +x ./frame-omni-bencher
./frame-omni-bencher --version
shell: bash

- name: Test ${{ matrix.runtime.name }}
run: cargo test -p ${{ matrix.runtime.package }} --release --locked -q
env:
Expand All @@ -99,22 +109,13 @@ jobs:
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
echo "Preparing wasm for benchmarking RUNTIME_BLOB_PATH=$RUNTIME_BLOB_PATH"
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
./frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1
env:
RUSTFLAGS: "-C debug-assertions -D warnings"

Expand Down

0 comments on commit d6d41c4

Please sign in to comment.