From 5bb72e0a4784eae12bd30bc0f9c6c613a8073802 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 2 Oct 2019 09:02:30 +0200 Subject: [PATCH] introduce mac.bazelrc --- .../macos/grpc_run_bazel_c_cpp_tests.sh | 2 +- tools/remote_build/README.md | 9 ++++- tools/remote_build/mac.bazelrc | 35 +++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tools/remote_build/mac.bazelrc diff --git a/tools/internal_ci/macos/grpc_run_bazel_c_cpp_tests.sh b/tools/internal_ci/macos/grpc_run_bazel_c_cpp_tests.sh index 434fc1a2804..d798912dd5d 100644 --- a/tools/internal_ci/macos/grpc_run_bazel_c_cpp_tests.sh +++ b/tools/internal_ci/macos/grpc_run_bazel_c_cpp_tests.sh @@ -23,7 +23,7 @@ cd $(dirname $0)/../../.. # run all C/C++ tests # TODO(jtattermusch): try using Bazel RBE remote cache # TODO(jtattermusch): upload bazel test results to resultstore -tools/bazel test $RUN_TESTS_FLAGS //test/... +tools/bazel --bazelrc=tools/remote_build/mac.bazelrc test $RUN_TESTS_FLAGS //test/... # kill port_server.py to prevent the build from hanging ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9 diff --git a/tools/remote_build/README.md b/tools/remote_build/README.md index edf771dd184..2d1a629b0eb 100644 --- a/tools/remote_build/README.md +++ b/tools/remote_build/README.md @@ -32,7 +32,14 @@ bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/... Run on Windows MSVC: ``` # manual run of bazel tests remotely on RBE Windows (must be run from Windows machine) -bazel --bazelrc=tools/remote_build/windows.bazelrc test //test/... +bazel --bazelrc=tools/remote_build/windows.bazelrc test --config=windows_opt //test/... +``` + +Run on MacOS (experimental for now): +``` +# manual run of bazel tests on Mac (must be run from Mac machine) +# NOTE: it's not really a "remote execution", but uploads results to ResultStore +bazel --bazelrc=tools/remote_build/mac.bazelrc test --config=opt //test/... ``` Available command line options can be found in diff --git a/tools/remote_build/mac.bazelrc b/tools/remote_build/mac.bazelrc new file mode 100644 index 00000000000..cc201565f71 --- /dev/null +++ b/tools/remote_build/mac.bazelrc @@ -0,0 +1,35 @@ +# Configuration for mac bazel test runs on CI +# Bazel RBE doesn't currently support MacOS platform, +# so we configure tests to build and run locally, +# but try to use RBE build cache and upload results +# to ResultStore + +startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 + +# remote cache is needed not only for build speedup, +# but also for the test logs to be available in ResultStore +# for now, don't upload results to cache, only the test logs. +# TODO(jtattermusch): setup a "cache-silo-key" before enabling uploads to build cache +build --remote_cache=grpcs://remotebuildexecution.googleapis.com +build --remote_instance_name=projects/grpc-testing/instances/default_instance +build --remote_upload_local_results=false + +build --auth_enabled=true + +build --verbose_failures=true + +build --test_tag_filters=-no_mac +build --build_tag_filters=-no_mac + +# without verbose gRPC logs the test outputs are not very useful +test --test_env=GRPC_VERBOSITY=debug + +# Set flags for uploading to BES in order to view results in the Bazel Build +# Results UI. +build --bes_backend=grpcs://buildeventservice.googleapis.com +build --bes_timeout=600s +build --bes_results_url="https://source.cloud.google.com/results/invocations/" +build --project_id=grpc-testing + +# print output for tests that fail (default is "summary") +build --test_output=errors