Skip to content

Commit 35e6bef

Browse files
authored
run frame-omni-bencher overhead command in CI for all runtimes in the runtime matrix (#7459)
As defined in #6347, we want to run the omni-benchers overhead command in the CI to be sure that it keeps working. Closes #6347
1 parent 13575cc commit 35e6bef

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/check-frame-omni-bencher.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
fail-fast: false # keep running other workflows even if one fails, to see the logs of all possible failures
8080
matrix:
8181
runtime: ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
82+
bench_cmd: ["pallet", "overhead"]
8283
container:
8384
image: ${{ needs.preflight.outputs.IMAGE }}
8485
env:
@@ -89,16 +90,26 @@ jobs:
8990
- name: Checkout
9091
uses: actions/checkout@v4
9192

92-
- name: script
93+
- name: script (benchmark ${{ matrix.bench_cmd }})
9394
id: required
95+
shell: bash
9496
run: |
9597
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
9698
RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME
99+
BENCH_CMD=${{ matrix.bench_cmd }}
97100
forklift cargo build --release --locked -p $PACKAGE_NAME -p frame-omni-bencher --features=${{ matrix.runtime.bench_features }} --quiet
98-
echo "Running short benchmarking for PACKAGE_NAME=$PACKAGE_NAME and RUNTIME_BLOB_PATH=$RUNTIME_BLOB_PATH"
101+
echo "Running short $BENCH_CMD benchmarking for PACKAGE_NAME=$PACKAGE_NAME and RUNTIME_BLOB_PATH=$RUNTIME_BLOB_PATH"
99102
ls -lrt $RUNTIME_BLOB_PATH
103+
104+
if [[ "$BENCH_CMD" == "pallet" ]]; then
105+
cmd="./target/release/frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1 $FLAGS"
106+
elif [[ "$BENCH_CMD" == "overhead" ]]; then
107+
cmd="./target/release/frame-omni-bencher v1 benchmark overhead --runtime $RUNTIME_BLOB_PATH"
108+
else
109+
echo "Error: Unknown BENCH_CMD value: $BENCH_CMD"
110+
exit 1
111+
fi
100112
101-
cmd="./target/release/frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1 $FLAGS"
102113
echo "Running command: $cmd"
103114
eval "$cmd"
104115
- name: Stop all workflows if failed

0 commit comments

Comments
 (0)