File tree 2 files changed +33
-7
lines changed
2 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ jobs:
102
102
echo "Pallets: $pallets_str"
103
103
if [ -z "${pallets_str}" -o $pallets_str = 'all' ]; then
104
104
echo "Running benchmarks for all pallets..."
105
- ./scripts/run_benchmarks.sh -s
105
+ ./scripts/run_benchmarks.sh -s -n
106
106
else
107
107
IFS=',' read -r -a pallets <<< "$pallets_str"
108
108
echo "Running benchmarks for pallets: ${pallets[*]}..."
109
- ./scripts/run_benchmarks.sh -s "${pallets[@]}"
109
+ ./scripts/run_benchmarks.sh -s -n "${pallets[@]}"
110
110
echo "Finished benchmarks for pallets: ${pallets[*]}."
111
111
fi
112
112
@@ -121,3 +121,19 @@ jobs:
121
121
with :
122
122
commit_message : " Update weights"
123
123
file_pattern : " pallets/**/*.rs runtime/common/src/weights/*"
124
+
125
+ test :
126
+ if : github.repository == 'frequency-chain/frequency'
127
+ name : Post Benchmark Tests
128
+ runs-on : ubicloud-standard-16
129
+ container : ghcr.io/frequency-chain/frequency/ci-base-image:1.4.0
130
+ permissions :
131
+ contents : read
132
+ steps :
133
+ - name : Check Out Repo
134
+ uses : actions/checkout@v4
135
+ with :
136
+ ref : ${{github.event.inputs.branch}}
137
+
138
+ - name : Run Tests
139
+ run : cargo test --features runtime-benchmarks,frequency-lint-check --workspace --release
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ ALL_CUSTOM_PALLETS=( \
38
38
declare -a CUSTOM_PALLETS
39
39
declare -a EXTERNAL_PALLETS
40
40
skip_build=false
41
+ skip_tests=false
41
42
build_only=false
42
43
OVERHEAD=
43
44
VERBOSE=
@@ -56,6 +57,8 @@ function usage() {
56
57
57
58
-s Skip the build step; use existing binary for the current profile
58
59
60
+ -n Skip the test step
61
+
59
62
-b Build only; exit after building the binary
60
63
61
64
-t <profile> Use '--profile=<profile>' in the build step & for locating the
@@ -97,7 +100,7 @@ function is_custom_pallet() {
97
100
return 1
98
101
}
99
102
100
- while getopts ' d:hp:st :vb' flag; do
103
+ while getopts ' d:hp:snt :vb' flag; do
101
104
case " ${flag} " in
102
105
d)
103
106
# Set project directory
@@ -111,6 +114,10 @@ while getopts 'd:hp:st:vb' flag; do
111
114
# Skip build.
112
115
skip_build=true
113
116
;;
117
+ n)
118
+ # Skip tests.
119
+ skip_tests=true
120
+ ;;
114
121
b)
115
122
# Build only
116
123
build_only=true
@@ -255,7 +262,10 @@ then
255
262
${BENCHMARK} overhead --weight-path=runtime/common/src/weights --chain=dev --warmup=10 --repeat=100 --header=" ./HEADER-APACHE2" || exit_err
256
263
fi
257
264
258
- echo " Running tests..."
259
- CMD=" cargo test --profile=${PROFILE} --features=runtime-benchmarks,frequency-lint-check --workspace"
260
- echo ${CMD}
261
- ${CMD} || exit_err
265
+ if [[ ${skip_tests} == false ]]
266
+ then
267
+ echo " Running tests..."
268
+ CMD=" cargo test --profile=${PROFILE} --features=runtime-benchmarks,frequency-lint-check --workspace"
269
+ echo ${CMD}
270
+ ${CMD} || exit_err
271
+ fi
You can’t perform that action at this time.
0 commit comments