Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
13ce407
CI: Trigger CI build
jinseopkim0 Sep 13, 2025
7cfc099
fix(kokoro): resolve macOS bazel build failures
jinseopkim0 Sep 13, 2025
bc92dce
fix(bazel): remove outdated rules_cc dependency
jinseopkim0 Sep 13, 2025
8218fe1
fix(bazel): update rules_cc to a modern version
jinseopkim0 Sep 13, 2025
895503e
fix(kokoro): remove outdated dependency fetching from macos bazel build
jinseopkim0 Sep 13, 2025
f515ff0
chore: enable --sandbox_debug
jinseopkim0 Sep 13, 2025
f79d605
fix(kokoro): upgrade boringssl and add -nostdinc
jinseopkim0 Sep 13, 2025
d0d3ae0
fix: compiler to prioritize the headers from the boringssl library
jinseopkim0 Sep 13, 2025
731b05f
chore: revert MODULE.bazel boringssl
jinseopkim0 Sep 13, 2025
fb932cb
fix: prevents compiler from finding system's OpenSSL headers when bui…
jinseopkim0 Sep 13, 2025
1b64174
fix: include -isysroot and merge the build command for macos
jinseopkim0 Sep 14, 2025
322d932
fix: add --action_env=SDKROOT
jinseopkim0 Sep 14, 2025
f623181
fix: manually enables the SSE4.2 and CRC32C
jinseopkim0 Sep 14, 2025
468b9ac
fix: add select for macos in crc32c.BUILD
jinseopkim0 Sep 14, 2025
6dae4bd
fix: add --features=-absolute_path_headers
jinseopkim0 Sep 14, 2025
2e7a317
fix: revert changes and focus on uninstalling openssl
jinseopkim0 Sep 14, 2025
8d71ced
fix: upgrade google_benchmark to 1.9.4
jinseopkim0 Sep 14, 2025
1861039
fix: revert MODULE.bazel
jinseopkim0 Sep 14, 2025
8382934
fix: add global flags for crc32c
jinseopkim0 Sep 14, 2025
515d656
fix: uninstall openssl for bazel only, and upgrade google_benchmark t…
jinseopkim0 Sep 14, 2025
398a674
fix: uninstall google-benchmark in homebrew.
jinseopkim0 Sep 14, 2025
80d0e23
fix: uninstall packages managed in MODULE.bazel
jinseopkim0 Sep 14, 2025
a877fe8
fix: uninstall 1-by-1
jinseopkim0 Sep 14, 2025
480a354
fix: add @com_google_benchmark//:benchmark
jinseopkim0 Sep 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ build --experimental_convenience_symlinks=ignore
# We mirror critical tarballs from several sources in case the canonical source
# is temporarily unavailable, e.g., github.com being down. This option and flag
# automatically rewrites the URLs.
build --experimental_downloader_config=bazel/downloader.cfg
# build --experimental_downloader_config=bazel/downloader.cfg

# It is frustrating when long-running builds/tests fail, but it is even more
# frustrating when they fail and don't give any output. So, remove the limit.
build --experimental_ui_max_stdouterr_bytes=-1

# TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using
# `apple_rules`.
common:macos --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
# common:macos --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1

# Inject ${GTEST_SHUFFLE} and ${GTEST_RANDOM_SEED} into the test environment
# if they are set in the enclosing environment. This allows for running tests
Expand Down
8 changes: 7 additions & 1 deletion bazel/crc32c.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ cc_library(
name = "crc32c",
srcs = crc32c_SRCS + crc32c_sse42_SRCS + crc32c_arm64_SRCS,
hdrs = crc32c_HDRS + ["crc32c/crc32c_config.h"],
copts = crc32c_copts,
copts = crc32c_copts + select({
"@platforms//os:macos": [
"-msse4.2",
"-mcrc32",
],
"//conditions:default": [],
}),
includes = ["include"],
deps = [],
)
Expand Down
1 change: 1 addition & 0 deletions ci/kokoro/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export HOMEBREW_NO_INSTALL_CLEANUP=1
brew list --versions --formula
brew list --versions --cask
brew list --versions coreutils || brew install coreutils

if [[ "${RUNNING_CI:-}" = "yes" ]]; then
# We use `gcloud alpha storage` as it significantly improves the
# upload and download performance of the cache. If this step fails
Expand Down
44 changes: 25 additions & 19 deletions ci/kokoro/macos/builds/bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,28 @@ source "$(dirname "$0")/../../../lib/init.sh"
source module ci/etc/integration-tests-config.sh
source module ci/lib/io.sh

PACKAGES_TO_UNINSTALL=(
abseil
protobuf
grpc
nlohmann-json
curl
crc32c
opentelemetry-cpp
googletest
google-benchmark
yaml-cpp
pugixml
zlib
c-ares
)

io::log_h2 "Uninstalling Homebrew packages that are managed in MODULE.bazel..."
for pkg in "${PACKAGES_TO_UNINSTALL[@]}"; do
io::log_yellow "Uninstalling ${pkg}..."
brew uninstall --ignore-dependencies "${pkg}" || true
done

# NOTE: In this file use the command `bazelisk` rather than bazel, because
# Kokoro has both installed and we want to make sure to use the former.
io::log_h2 "Using bazel version"
Expand All @@ -32,9 +54,12 @@ bazel_args=(
# cannot find the credentials, even if you do not use them. Some of the
# unit tests do exactly that.
"--action_env=GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}"
"--copt=-msse4.2"
"--copt=-mcrc32"
"--test_output=errors"
"--verbose_failures=true"
"--keep_going"
"--sandbox_debug"
)

readonly CONFIG_DIR="${KOKORO_GFILE_DIR:-/private/var/tmp}"
Expand All @@ -55,25 +80,6 @@ if [[ -r "${TEST_KEY_FILE_JSON}" ]]; then
bazel_args+=("--experimental_guard_against_concurrent_changes")
fi

for repeat in 1 2 3; do
# Additional dependencies, these are not downloaded by `bazel fetch ...`,
# but are needed to compile the code
external=(
@local_config_platform//...
@local_config_cc_toolchains//...
@local_config_sh//...
@go_sdk//...
@remotejdk11_macos//:jdk
)
io::log_yellow "Fetch bazel dependencies [${repeat}/3]"
if bazelisk fetch ... "${external[@]}"; then
break
else
io::log_yellow "bazel fetch failed with $?"
fi
sleep $((120 * repeat))
done

io::log_h2 "build and run unit tests"
echo "bazel test " "${bazel_args[@]}"
bazelisk test "${bazel_args[@]}" "--test_tag_filters=-integration-test" ...
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ cc_library(
tags = ["benchmark"],
deps = [
":google_cloud_cpp_common",
"@com_google_benchmark//:benchmark",
"@com_google_benchmark//:benchmark_main",
],
) for benchmark in google_cloud_cpp_common_benchmarks]
Expand Down Expand Up @@ -333,6 +334,7 @@ cc_library(
tags = ["benchmark"],
deps = [
":google_cloud_cpp_rest_internal",
"@com_google_benchmark//:benchmark",
"@com_google_benchmark//:benchmark_main",
],
) for benchmark in google_cloud_cpp_rest_internal_benchmarks]
Expand Down
Loading