@@ -19,38 +19,50 @@ set -ex
1919
2020bash 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.
2224bazel 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+
0 commit comments