Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
USE_BAZEL_VERSION=7.6.2
USE_BAZEL_VERSION=8.4.2
5 changes: 3 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
build --action_env=ASAN_OPTIONS=halt_on_error=true

build --noenable_bzlmod

build --cxxopt='-std=c++20'

# host_cxxopt is used for building upb. Must be C++14 or later.
Expand All @@ -11,7 +9,10 @@ build --host_cxxopt='-std=c++17'
# If we build in C++14 or C++17 mode its not needed, but it still suppresses
# hundreds of distracting warnings.
build --cxxopt='-Wno-deprecated-enum-enum-conversion'
build --cxxopt='-Wno-attributes'
build --cxxopt='-Wno-trigraphs'
build --host_cxxopt='-Wno-deprecated-enum-enum-conversion'
build --host_cxxopt='-Wno-attributes'

# Statically link libstdc++ and libgcc.
build --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a:-lm
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ bazel-distbench
bazel-out
bazel-testlogs
external_repos
__pycache__
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_proto_library")
load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_proto_library")
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")

package(
default_visibility = ["//visibility:public"],
Expand Down Expand Up @@ -647,7 +647,7 @@ cc_library(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/random",
"@boost//:preprocessor",
"@boost.preprocessor//:boost.preprocessor",
],
)

Expand Down
53 changes: 53 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module(name = "main", version="")

bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "google_benchmark", version = "1.9.4", repo_name = "com_google_benchmark")
bazel_dep(name = "googletest", version = "1.17.0.bcr.1", repo_name = "com_google_googletest")
bazel_dep(name = "rules_cc", version = "0.2.9")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "grpc", version = "1.74.1", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "protobuf", version = "33.0-rc2", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_python", version = "1.6.3")

bazel_dep(name = "boost.preprocessor", version = "1.89.0")

# -- bazel_dep definitions -- #

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# -- use_repo_rule statements -- #


# -- repo definitions -- #
#

local_runtime_repo = use_repo_rule(
"@rules_python//python/local_toolchains:repos.bzl",
"local_runtime_repo",
)

local_runtime_toolchains_repo = use_repo_rule(
"@rules_python//python/local_toolchains:repos.bzl",
"local_runtime_toolchains_repo",
)

# Step 1: Define the Python runtime
local_runtime_repo(
name = "local_python3",
interpreter_path = "python3",
on_failure = "fail",
dev_dependency = True
)

# Step 2: Create toolchains for the runtimes
local_runtime_toolchains_repo(
name = "local_toolchains",
runtimes = ["local_python3"],
# TIP: The `target_settings` arg can be used to activate them based on
# command line flags; see docs below.
dev_dependency = True
)

# Step 3: Register the toolchains
register_toolchains("@local_toolchains//:all", dev_dependency = True)
627 changes: 627 additions & 0 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

123 changes: 0 additions & 123 deletions WORKSPACE.bazel

This file was deleted.

8 changes: 5 additions & 3 deletions kokoro/gcp_ubuntu/kokoro_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,17 @@ function unpack_bazel_cache() {
print_header_and_run "Unpack Bazel cache" \
unpack_bazel_cache

CONFIG=(--//:with-mercury)
# CONFIG=(--//:with-mercury)
print_header_and_run "Bazel test (:all, analysis:all, test_builder:all)" \
test_targets test_builder:all analysis:all :all

CONFIG=(--//:with-mercury --config=asan)
# CONFIG=(--//:with-mercury --config=asan)
CONFIG=(--config=asan)
print_header_and_run "Bazel test - ASAN" \
test_main_targets

CONFIG=(--//:with-mercury --config=tsan)
# CONFIG=(--//:with-mercury --config=tsan)
CONFIG=(--config=tsan)
print_header_and_run "Bazel test - TSAN" \
test_main_targets

1 change: 0 additions & 1 deletion test_builder/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ sh_test(
data = glob(["test_builder_golden_configs/*"]) + [
"test_builder",
"//:distbench",
"@homa_module//:dist_to_proto"
],
)
5 changes: 2 additions & 3 deletions test_builder/test_builder_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ function compare_golden_file() {
}

PATH=$PATH:${PWD}/external/homa_module
which dist_to_proto
test_builder/test_builder -h
which dist_to_proto || test_builder/test_builder -h || true

cd "./test_builder/test_builder_golden_configs"
for config in *.config; do
echo checking ${config}
../../distbench check_test --infile $PWD/${config}
done

for f in *.config; do
for f in `ls *.config | grep -v homa`; do
echo Comparing against "$f":
if compare_golden_file "$f"; then
echo "Output matches! :-)"
Expand Down