77# and the models from <repo root>/onnxruntime/test/testdata/, run UT, and use onnx_test_runner to
88# test the ort format models generated in step 1.
99# Exceptions are enabled in this step to help debugging in case of CI failure.
10+ # This step builds and tests ORT with and without type reduction enabled.
1011# 4. Build baseline minimal ORT for Android arm64-v8a including no kernels and disable exceptions
1112# This step is to report the baseline binary size for Android
1213jobs :
@@ -15,11 +16,23 @@ jobs:
1516 workspace :
1617 clean : all
1718 pool : Linux-CPU
19+
20+ variables :
21+ test_data_directory : $(Build.SourcesDirectory)/.test_data
22+
1823 steps :
1924 - checkout : self
2025 clean : true
2126 submodules : recursive
2227
28+ - task : CmdLine@2
29+ displayName : Create test data directory
30+ inputs :
31+ script : |
32+ # Create a folder for all test data
33+ mkdir -p $(test_data_directory)
34+ workingDirectory : $(Build.SourcesDirectory)
35+
2336 - template : templates/get-docker-image-steps.yml
2437 parameters :
2538 Dockerfile : tools/ci_build/github/linux/docker/Dockerfile.centos
@@ -31,23 +44,22 @@ jobs:
3144 displayName : Build full onnxruntime and generate ORT format test files
3245 inputs :
3346 script : |
34- # Create a folder for all test data
35- mkdir -p $HOME/.test_data
3647 docker run --rm \
3748 --volume $(Build.SourcesDirectory):/onnxruntime_src \
3849 --volume $(Build.BinariesDirectory):/build \
39- --volume $HOME/.test_data :/home/onnxruntimedev/.test_data \
50+ --volume $(test_data_directory) :/home/onnxruntimedev/.test_data \
4051 -e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
4152 -e NIGHTLY_BUILD \
4253 -e BUILD_BUILDNUMBER \
4354 onnxruntimecentoscpubuild \
4455 /bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_full_ort_and_create_ort_files.sh
4556 workingDirectory : $(Build.SourcesDirectory)
57+
4658 - task : CmdLine@2
47- displayName : Build minimal onnxruntime with exceptions disabled
59+ displayName : Build minimal onnxruntime [ exceptions DISABLED, type reduction DISABLED]
4860 inputs :
4961 script : |
50- # We will try to build the ORT minimal with exception disabled
62+ # We will try to build minimal ORT with exceptions disabled
5163 # Only the building process is verified here, no test will be performed
5264 docker run --rm \
5365 --volume $(Build.SourcesDirectory):/onnxruntime_src \
@@ -66,31 +78,59 @@ jobs:
6678 --minimal_build \
6779 --disable_exceptions
6880 workingDirectory : $(Build.SourcesDirectory)
81+
6982 - task : CmdLine@2
70- displayName : Build minimal onnxruntime and run tests with exceptions enabled
83+ displayName : Build minimal onnxruntime [exceptions ENABLED, type reduction DISABLED] and run tests
7184 inputs :
7285 script : |
7386 docker run --rm \
7487 --volume $(Build.SourcesDirectory):/onnxruntime_src \
7588 --volume $(Build.BinariesDirectory):/build \
76- --volume $HOME/.test_data :/home/onnxruntimedev/.test_data \
89+ --volume $(test_data_directory) :/home/onnxruntimedev/.test_data \
7790 -e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
7891 -e NIGHTLY_BUILD \
7992 -e BUILD_BUILDNUMBER \
8093 onnxruntimecentoscpubuild \
81- /bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh
94+ /bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh \
95+ --build-directory /build/without_type_reduction \
96+ --reduced-ops-config /home/onnxruntimedev/.test_data/required_ops.ort_models.config
8297 workingDirectory : $(Build.SourcesDirectory)
98+
99+ - script : git checkout -- .
100+ displayName : Discard local changes to Git repository files
101+ workingDirectory : $(Build.SourcesDirectory)
102+
103+ - task : CmdLine@2
104+ displayName : Build minimal onnxruntime [exceptions ENABLED, type reduction ENABLED] and run tests
105+ inputs :
106+ script : |
107+ docker run --rm \
108+ --volume $(Build.SourcesDirectory):/onnxruntime_src \
109+ --volume $(Build.BinariesDirectory):/build \
110+ --volume $(test_data_directory):/home/onnxruntimedev/.test_data \
111+ -e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
112+ -e NIGHTLY_BUILD \
113+ -e BUILD_BUILDNUMBER \
114+ onnxruntimecentoscpubuild \
115+ /bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh \
116+ --build-directory /build/with_type_reduction \
117+ --reduced-ops-config /home/onnxruntimedev/.test_data/required_ops_and_types.ort_models.config \
118+ --enable-type-reduction
119+ workingDirectory : $(Build.SourcesDirectory)
120+
121+ - script : git checkout -- .
122+ displayName : Discard local changes to Git repository files
123+ workingDirectory : $(Build.SourcesDirectory)
124+
83125 - task : CmdLine@2
84126 displayName : Build onnxruntime minimal baseline for Android arm64-v8a and report binary size
85127 inputs :
86128 script : |
87- # Create a folder for all test data
88- mkdir -p $HOME/.test_data
89129 docker run --rm \
90130 --volume $(Build.SourcesDirectory):/onnxruntime_src \
91131 --volume $(Build.BinariesDirectory):/build \
92132 --volume $ANDROID_HOME:/android_home \
93- --volume $HOME/.test_data :/home/onnxruntimedev/.test_data \
133+ --volume $(test_data_directory) :/home/onnxruntimedev/.test_data \
94134 -e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \
95135 -e NIGHTLY_BUILD \
96136 -e BUILD_BUILDNUMBER \
0 commit comments