Skip to content

Commit 38b93fb

Browse files
xunkai55tflite-support-robot
authored andcommitted
#devinfra Add more tests in presubmit and keep it fast with multi jobs.
PiperOrigin-RevId: 398370141
1 parent 0d52f32 commit 38b93fb

File tree

5 files changed

+35
-96
lines changed

5 files changed

+35
-96
lines changed

tensorflow_lite_support/opensource/opensource_only.files

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ tensorflow_lite_support/tools/build_rules/http_files.bzl
3535
tensorflow_lite_support/tools/ci_build/build_all.sh
3636
tensorflow_lite_support/tools/ci_build/common.sh
3737
tensorflow_lite_support/tools/ci_build/common_win.bat
38-
tensorflow_lite_support/tools/ci_build/test_all.sh
39-
tensorflow_lite_support/tools/ci_build/tests/run_metadata_tests.sh
40-
tensorflow_lite_support/tools/ci_build/tests/run_support_lib_tests.sh
4138
tensorflow_lite_support/tools/pip_package/BUILD
4239
tensorflow_lite_support/tools/pip_package/MANIFEST.in
4340
tensorflow_lite_support/tools/pip_package/README

tensorflow_lite_support/tools/ci_build/build_all.sh

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,50 @@ set -ex
1919

2020
bash tensorflow_lite_support/custom_ops/tf_configure.sh
2121

22+
# TODO(b/200756963): Make it possible to build flatbuffer schema libraries with
23+
# more jobs.
2224
bazel build -c opt --config=monolithic \
23-
//tensorflow_lite_support/java:tensorflowlite_support \
24-
//tensorflow_lite_support/codegen/python:codegen \
2525
//tensorflow_lite_support/metadata/java:tensorflowlite_support_metadata_lib \
26-
//tensorflow_lite_support/metadata/cc:metadata_extractor \
26+
//tensorflow_lite_support/metadata/cc:metadata_extractor
27+
28+
export BAZEL_PARALLEL="-j 32"
29+
30+
# General targets.
31+
bazel build -c opt ${BAZEL_PARALLEL} --config=monolithic \
32+
//tensorflow_lite_support/codegen/python:codegen \
2733
//tensorflow_lite_support/custom_ops/kernel:all \
2834
//tensorflow_lite_support/custom_ops/python:tflite_text_api \
29-
//tensorflow_lite_support/cc/task/audio:audio_classifier \
30-
//tensorflow_lite_support/cc/task/vision:image_embedder
31-
32-
# Build ODML.
33-
bazel build -c opt --config=monolithic --config=android_arm64 \
34-
//tensorflow_lite_support/odml/java/image
35+
//tensorflow_lite_support/examples/task/audio/desktop:audio_classifier_demo
3536

36-
# Build Task libraries.
37-
bazel build -c opt --config=monolithic \
37+
# Android targets.
38+
bazel build -c opt ${BAZEL_PARALLEL} --config=monolithic \
3839
--config=android_arm64 --fat_apk_cpu=x86,x86_64,arm64-v8a,armeabi-v7a \
40+
//tensorflow_lite_support/java:tensorflowlite_support \
41+
//tensorflow_lite_support/cc/task/vision:image_embedder \
42+
//tensorflow_lite_support/odml/java/image \
3943
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core:base-task-api.aar \
4044
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/text:task-library-text \
4145
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision:task-library-vision \
42-
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/audio:task-library-audio
43-
44-
# Build A@S delegate plugin libraries.
45-
bazel build -c opt \
46-
--config=android_arm64 --fat_apk_cpu=x86,x86_64,arm64-v8a,armeabi-v7a \
46+
//tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/audio:task-library-audio \
4747
//tensorflow_lite_support/acceleration/configuration:gpu-delegate-plugin
4848

49-
# Build desktop demos.
50-
bazel build -c opt --config=monolithic \
51-
//tensorflow_lite_support/examples/task/audio/desktop:audio_classifier_demo
52-
53-
bazel clean --expunge
54-
# Build Coral plugin.
55-
bazel build --sandbox_debug --subcommands --define=darwinn_portable=1 \
49+
bazel clean
50+
# Coral plugin.
51+
bazel build -c opt ${BAZEL_PARALLEL} --define=darwinn_portable=1 \
5652
//tensorflow_lite_support/acceleration/configuration:edgetpu_coral_plugin
53+
54+
# Tests.
55+
56+
bazel clean
57+
58+
bazel test $BAZEL_PARALLEL --test_output=all \
59+
//tensorflow_lite_support/cc/test/task/vision:all \
60+
//tensorflow_lite_support/custom_ops/kernel/sentencepiece:all \
61+
//tensorflow_lite_support/metadata/python/tests:metadata_test \
62+
//tensorflow_lite_support/metadata/python/tests/metadata_writers:all \
63+
64+
bazel test $BAZEL_PARALLEL --test_output=all --build_tests_only \
65+
--build_tag_filters=-tflite_emulator_test_android \
66+
--test_tag_filters=-tflite_emulator_test_android \
67+
//tensorflow_lite_support/java/src/javatests/org/tensorflow/lite/support/...
68+

tensorflow_lite_support/tools/ci_build/test_all.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

tensorflow_lite_support/tools/ci_build/tests/run_metadata_tests.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

tensorflow_lite_support/tools/ci_build/tests/run_support_lib_tests.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)