Enable remote cache for selected ObjC bazel tests. (#29731)

* enable remote cache for ObjC bazel tests

* add bazel RBE cache for mac ios bazel builds
pull/29687/head
Jan Tattermusch 3 years ago committed by GitHub
parent a9b9f3058a
commit 5051566b27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      tools/internal_ci/macos/grpc_objc_bazel_test.sh
  2. 13
      tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh

@ -88,6 +88,7 @@ objc_bazel_tests/bazel_wrapper \
--bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \ --bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \
test \ test \
--google_credentials="${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json" \ --google_credentials="${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json" \
"${BAZEL_REMOTE_CACHE_ARGS[@]}" \
$BAZEL_FLAGS \ $BAZEL_FLAGS \
-- \ -- \
"${EXAMPLE_TARGETS[@]}" \ "${EXAMPLE_TARGETS[@]}" \

@ -26,6 +26,18 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc
# make sure bazel is available # make sure bazel is available
tools/bazel version tools/bazel version
# for kokoro mac workers, exact image version is store in a well-known location on disk
KOKORO_IMAGE_VERSION="$(cat /VERSION)"
BAZEL_REMOTE_CACHE_ARGS=(
# Enable uploading to remote cache. Requires the "roles/remotebuildexecution.actionCacheWriter" permission.
--remote_upload_local_results=true
# allow invalidating the old cache by setting to a new random key
--remote_default_exec_properties="grpc_cache_silo_key1=83d8e488-1ca9-40fd-929e-d37d13529c99"
# make sure we only get cache hits from binaries built on exact same macos image
--remote_default_exec_properties="grpc_cache_silo_key2=${KOKORO_IMAGE_VERSION}"
)
./tools/run_tests/start_port_server.py ./tools/run_tests/start_port_server.py
# only select ObjC test from the following subdirs # only select ObjC test from the following subdirs
@ -41,5 +53,6 @@ bazel_cpp_ios_tests/bazel_wrapper \
--bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \ --bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \
test \ test \
--google_credentials="${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json" \ --google_credentials="${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json" \
"${BAZEL_REMOTE_CACHE_ARGS[@]}" \
$BAZEL_FLAGS \ $BAZEL_FLAGS \
-- ${ios_tests} -- ${ios_tests}

Loading…
Cancel
Save