• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# Copyright 2020 The TensorFlow Authors. All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15# ==============================================================================
16# External `build_all.sh`
17
18set -ex
19
20bazel build -c opt --config=monolithic \
21    //tensorflow_lite_support/java:tensorflowlite_support \
22    //tensorflow_lite_support/codegen/python:codegen \
23    //tensorflow_lite_support/metadata/java:tensorflowlite_support_metadata_lib \
24    //tensorflow_lite_support/metadata/cc:metadata_extractor \
25    //tensorflow_lite_support/custom_ops/kernel:all \
26    //tensorflow_lite_support/custom_ops/python:tflite_text_api
27
28# Build Task libraries.
29bazel build -c opt --config=monolithic \
30    --config=android_arm64 --fat_apk_cpu=x86,x86_64,arm64-v8a,armeabi-v7a \
31    //tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core:base-task-api.aar \
32    //tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/text:task-library-text \
33    //tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/vision:task-library-vision
34
35
36# Run Metadata tests.
37bazel clean --expunge
38
39bazel test --test_output=all \
40    //tensorflow_lite_support/metadata/python/tests:metadata_test \
41    //tensorflow_lite_support/metadata/python/tests/metadata_writers:all
42
43