|
|
@ -21,7 +21,6 @@ source $(dirname $0)/../../../tools/internal_ci/helper_scripts/move_src_tree_and |
|
|
|
# change to grpc repo root |
|
|
|
# change to grpc repo root |
|
|
|
cd $(dirname $0)/../../.. |
|
|
|
cd $(dirname $0)/../../.. |
|
|
|
|
|
|
|
|
|
|
|
# TODO(jtattermusch): most of the prepare steps should not be needed for bazel |
|
|
|
|
|
|
|
source tools/internal_ci/helper_scripts/prepare_build_macos_rc |
|
|
|
source tools/internal_ci/helper_scripts/prepare_build_macos_rc |
|
|
|
|
|
|
|
|
|
|
|
# make sure bazel is available |
|
|
|
# make sure bazel is available |
|
|
@ -37,6 +36,18 @@ tools/bazel version |
|
|
|
BAZEL_INVOCATION_ID="$(uuidgen | tr '[:upper:]' '[:lower:]')" |
|
|
|
BAZEL_INVOCATION_ID="$(uuidgen | tr '[:upper:]' '[:lower:]')" |
|
|
|
echo "${BAZEL_INVOCATION_ID}" >"${KOKORO_ARTIFACTS_DIR}/bazel_invocation_ids" |
|
|
|
echo "${BAZEL_INVOCATION_ID}" >"${KOKORO_ARTIFACTS_DIR}/bazel_invocation_ids" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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}" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
# run all C/C++ tests |
|
|
|
# run all C/C++ tests |
|
|
|
tools/bazel \ |
|
|
|
tools/bazel \ |
|
|
|
--bazelrc=tools/remote_build/mac.bazelrc \ |
|
|
|
--bazelrc=tools/remote_build/mac.bazelrc \ |
|
|
@ -44,6 +55,7 @@ tools/bazel \ |
|
|
|
--invocation_id="${BAZEL_INVOCATION_ID}" \ |
|
|
|
--invocation_id="${BAZEL_INVOCATION_ID}" \ |
|
|
|
--workspace_status_command=tools/remote_build/workspace_status_kokoro.sh \ |
|
|
|
--workspace_status_command=tools/remote_build/workspace_status_kokoro.sh \ |
|
|
|
--google_credentials="${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json" \ |
|
|
|
--google_credentials="${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json" \ |
|
|
|
|
|
|
|
"${BAZEL_REMOTE_CACHE_ARGS[@]}" \ |
|
|
|
$BAZEL_FLAGS \ |
|
|
|
$BAZEL_FLAGS \ |
|
|
|
-- //test/... || FAILED="true" |
|
|
|
-- //test/... || FAILED="true" |
|
|
|
|
|
|
|
|
|
|
|