79
79
fail-fast : false # keep running other workflows even if one fails, to see the logs of all possible failures
80
80
matrix :
81
81
runtime : ${{ fromJSON(needs.runtime-matrix.outputs.runtime) }}
82
+ bench_cmd : ["pallet", "overhead"]
82
83
container :
83
84
image : ${{ needs.preflight.outputs.IMAGE }}
84
85
env :
@@ -89,16 +90,26 @@ jobs:
89
90
- name : Checkout
90
91
uses : actions/checkout@v4
91
92
92
- - name : script
93
+ - name : script (benchmark ${{ matrix.bench_cmd }})
93
94
id : required
95
+ shell : bash
94
96
run : |
95
97
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
96
98
RUNTIME_BLOB_PATH=./target/release/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME
99
+ BENCH_CMD=${{ matrix.bench_cmd }}
97
100
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"
99
102
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
100
112
101
- cmd="./target/release/frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1 $FLAGS"
102
113
echo "Running command: $cmd"
103
114
eval "$cmd"
104
115
- name : Stop all workflows if failed
0 commit comments