diff --git a/bazel_tools/scala.bzl b/bazel_tools/scala.bzl index 435503cf6b..80898c6c34 100644 --- a/bazel_tools/scala.bzl +++ b/bazel_tools/scala.bzl @@ -405,6 +405,7 @@ def _create_scaladoc_jar(**kwargs): srcs = kwargs["srcs"], scalacopts = kwargs.get("scalacopts", []), generated_srcs = kwargs.get("generated_srcs", []), + tags = ["scaladoc"], ) def da_scala_library(name, unused_dependency_checker_mode = "error", **kwargs): diff --git a/build.sh b/build.sh index 6f167733f3..f8b6a97cb1 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,11 @@ export LC_ALL=en_US.UTF-8 ARTIFACT_DIRS="${BUILD_ARTIFACTSTAGINGDIRECTORY:-$PWD}" +tag_filter="" +if [[ "$execution_log_postfix" == "_Darwin" ]]; then + tag_filter="-dont-run-on-darwin,-scaladoc" +fi + # Bazel test only builds targets that are dependencies of a test suite # so do a full build first. ( @@ -22,13 +27,9 @@ ARTIFACT_DIRS="${BUILD_ARTIFACTSTAGINGDIRECTORY:-$PWD}" # overload machines. # This also appears to be what Google uses internally, see # https://github.com/bazelbuild/bazel/issues/6394#issuecomment-436234594. - bazel build -j 200 //... + bazel build -j 200 //... --build_tag_filters "$tag_filter" ) -tag_filter="" -if [[ "$execution_log_postfix" == "_Darwin" ]]; then - tag_filter="-dont-run-on-darwin" -fi -bazel test -j 200 //... --test_tag_filters "$tag_filter" --experimental_execution_log_file "$ARTIFACT_DIRS/test_execution${execution_log_postfix}.log" +bazel test -j 200 //... --build_tag_filters "$tag_filter" --test_tag_filters "$tag_filter" --experimental_execution_log_file "$ARTIFACT_DIRS/test_execution${execution_log_postfix}.log" # Make sure that Bazel query works. bazel query 'deps(//...)' > /dev/null # Check that we can load damlc in ghci diff --git a/language-support/codegen-main/BUILD.bazel b/language-support/codegen-main/BUILD.bazel index c006aacb7d..34c6cd7f83 100644 --- a/language-support/codegen-main/BUILD.bazel +++ b/language-support/codegen-main/BUILD.bazel @@ -68,6 +68,7 @@ pom_file( scaladoc_jar( name = "shaded_binary_scaladoc", srcs = [], + tags = ["scaladoc"], deps = [], ) if is_windows == False else None diff --git a/language-support/java/codegen/BUILD.bazel b/language-support/java/codegen/BUILD.bazel index f03be561aa..5eb44de627 100644 --- a/language-support/java/codegen/BUILD.bazel +++ b/language-support/java/codegen/BUILD.bazel @@ -113,6 +113,7 @@ pom_file( scaladoc_jar( name = "shaded_binary_scaladoc", srcs = [], + tags = ["scaladoc"], deps = [], ) if is_windows == False else None diff --git a/ledger-api/grpc-definitions/BUILD.bazel b/ledger-api/grpc-definitions/BUILD.bazel index fa61c3bc2a..5fbcf3bac6 100644 --- a/ledger-api/grpc-definitions/BUILD.bazel +++ b/ledger-api/grpc-definitions/BUILD.bazel @@ -321,6 +321,7 @@ pom_file( scaladoc_jar( name = "ledger-api-scalapb_scaladoc", srcs = [], + tags = ["scaladoc"], deps = [], ) if is_windows == False else None