Skip to content

Commit 846c5fb

Browse files
authored
Report arm64 minimal baseline binary size only for continuous integration (#5913)
* Report binary size only for continuous integration
1 parent c49d5f1 commit 846c5fb

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

tools/ci_build/github/azure-pipelines/linux-cpu-minimal-build-ci-pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
-e BUILD_BUILDNUMBER \
9696
-e BUILD_SOURCEVERSION=$(Build.SourceVersion) \
9797
-e BUILD_ID=$(Build.BuildId) \
98+
-e BUILD_REASON=$(Build.Reason) \
9899
-e DASHBOARD_MYSQL_ORT_PASSWORD=$(dashboard-mysql-ort-password) \
99100
onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntimecentoscpubuild:ch3 \
100101
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_android_baseline_and_report_bin_size.sh

tools/ci_build/github/linux/ort_minimal/build_full_ort_and_create_ort_files.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# and the exclude ops config file, which will be used in the build_minimal_ort_and_run_tests.sh
55

66
set -e
7+
set -x
78

89
# Validate the operator kernel registrations. The ORT model uses hashes for kernel registrations, so if these
910
# are incorrect we will produce a model that will break when the registrations are fixed.

tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Extra E2E test cases (converted by build_full_ort_and_create_ort_files.sh) will be run by onnx_test_runner
88

99
set -e
10+
set -x
1011

1112
# Clear the previous build
1213
rm -rf /build/Debug

tools/ci_build/github/linux/ort_minimal/build_minimal_ort_android_baseline_and_report_bin_size.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# and report the binary size to the ort mysql DB
55

66
set -e
7+
set -x
78

89
# Create an empty file to be used with build --include_ops_by_config, which will include no operators at all
910
echo -n > /home/onnxruntimedev/.test_data/include_no_operators.config
@@ -33,12 +34,19 @@ python3 -m pip install --user mysql-connector-python
3334

3435
# Post the binary size info to ort mysql DB
3536
# The report script's DB connection failure will not fail the pipeline
36-
python3 /onnxruntime_src/tools/ci_build/github/windows/post_binary_sizes_to_dashboard.py \
37-
--ignore_db_error \
38-
--commit_hash=$BUILD_SOURCEVERSION \
39-
--size_data_file=/build/MinSizeRel/binary_size_data.txt \
40-
--build_project=onnxruntime \
41-
--build_id=$BUILD_ID
37+
# To reduce noise, we only report binary size for Continuous integration (a merge to master or rel-*)
38+
if [[ $BUILD_REASON == "IndividualCI" || $BUILD_REASON == "BatchedCI" ]]; then
39+
python3 /onnxruntime_src/tools/ci_build/github/windows/post_binary_sizes_to_dashboard.py \
40+
--ignore_db_error \
41+
--commit_hash=$BUILD_SOURCEVERSION \
42+
--size_data_file=/build/MinSizeRel/binary_size_data.txt \
43+
--build_project=onnxruntime \
44+
--build_id=$BUILD_ID
45+
else
46+
echo "No binary size report for build reason: $BUILD_REASON"
47+
echo "The content of binary_size_data.txt"
48+
cat /build/MinSizeRel/binary_size_data.txt
49+
fi
4250

4351
# Clear the build
4452
rm -rf /build/MinSizeRel

0 commit comments

Comments
 (0)