From 3ebcc8a2a213761d95997f05087d0ddb40dcef46 Mon Sep 17 00:00:00 2001 From: Advait Jain Date: Thu, 17 Jun 2021 14:14:34 -0700 Subject: [PATCH] Explicitly build all targets with bazel as part of CI. (#196) * Explicitly build all targets with bazel as part of CI. With #194 we removed the build_test targets. We are instead going to explicitly have a bazel build command as part of the CI checks. * fix typo --- .../lite/micro/tools/ci_build/test_bazel.sh | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tensorflow/lite/micro/tools/ci_build/test_bazel.sh b/tensorflow/lite/micro/tools/ci_build/test_bazel.sh index 0911c2a9..f07c198c 100755 --- a/tensorflow/lite/micro/tools/ci_build/test_bazel.sh +++ b/tensorflow/lite/micro/tools/ci_build/test_bazel.sh @@ -14,14 +14,6 @@ # limitations under the License. # ============================================================================== -# This script can be used to initiate a bazel build with a reduced set of -# downloads, but still sufficient to test all the TFLM targets. -# -# This is primarily intended for use from a Docker image as part of the TFLM -# github continuous integration system. There are still a number of downloads -# (e.g. java) that are not necessary and it may be possible to further reduce -# the set of external libraries and downloads. - set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -30,15 +22,25 @@ cd "${ROOT_DIR}" source tensorflow/lite/micro/tools/ci_build/helper_functions.sh +# We are using a bazel build followed by bazel test to make sure that the CI +# covers non-test binary targets as well. These were previousbly covered by +# having build_test but that was removed with #194. + +CC=clang readable_run bazel build tensorflow/lite/micro/... \ + --build_tag_filters=-no_oss CC=clang readable_run bazel test tensorflow/lite/micro/... \ --test_tag_filters=-no_oss --build_tag_filters=-no_oss \ --test_output=errors +CC=clang readable_run bazel build tensorflow/lite/micro/... \ + --config=msan --build_tag_filters=-no_oss,-nomsan CC=clang readable_run bazel test tensorflow/lite/micro/... \ --config=msan \ --test_tag_filters=-no_oss,-nomsan --build_tag_filters=-no_oss,-nomsan \ --test_output=errors +CC=clang readable_run bazel build tensorflow/lite/micro/... \ + --config=asan --build_tag_filters=-no_oss,-noasan CC=clang readable_run bazel test tensorflow/lite/micro/... \ --config=asan \ --test_tag_filters=-no_oss,-noasan --build_tag_filters=-no_oss,-noasan \ @@ -47,8 +49,9 @@ CC=clang readable_run bazel test tensorflow/lite/micro/... \ # TODO(b/178621680): enable ubsan once bazel + clang + ubsan errors are fixed. #CC=clang readable_run bazel test tensorflow/lite/micro/... --config=ubsan --test_tag_filters=-no_oss,-noubsan --build_tag_filters=-no_oss,-noubsan +CC=clang readable_run bazel build tensorflow/lite/micro/... \ + --build_tag_filters=-no_oss --copt=-DTF_LITE_STATIC_MEMORY CC=clang readable_run bazel test tensorflow/lite/micro/... \ --test_tag_filters=-no_oss --build_tag_filters=-no_oss \ --copt=-DTF_LITE_STATIC_MEMORY \ --test_output=errors - -- GitLab