Skip to content

Commit

Permalink
cleanup RBE configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
jtattermusch committed Mar 9, 2023
1 parent 32c05f2 commit 6ba546d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 27 deletions.
51 changes: 30 additions & 21 deletions third_party/toolchains/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,19 @@ package(default_visibility = ["//visibility:public"])

load("@bazel_toolchains//rules/exec_properties:exec_properties.bzl", "create_rbe_exec_properties_dict")

alias(
name = "rbe_windows",
actual = ":rbe_windows_2019",
)

# RBE Windows
platform(
name = "rbe_windows_2019",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
],
exec_properties = create_rbe_exec_properties_dict(
# See rbe_win2019/Dockerfile for image details
container_image = "docker://gcr.io/grpc-testing/rbe_windows2019@sha256:41772e8eeb9dd8c8b996bf32d58164d84b2315c8e81e634bbff5a0216b7f52fd",
os_family = "Windows",
labels = {"os": "windows_2019", "machine_size": "small"},
),
)

# The default toolchain suite for RBE linux, pass it to --crosstool_top
alias(
name = "rbe_linux_default_toolchain_suite",
actual = "//third_party/toolchains/rbe_ubuntu1804/cc:toolchain",
)

# The default CC toolchain suite for RBE linux, pass it to --crosstool_top
# The default CC toolchain suite for RBE linux
alias(
name = "rbe_linux_default_cc_toolchain",
actual = "//third_party/toolchains/rbe_ubuntu1804/config:cc-toolchain",
)

# The default platform for RBE Linux
platform(
name = "rbe_linux_default_platform",
# Inherit from the platform target generated by 'rbe_configs_gen'.
Expand All @@ -67,3 +48,31 @@ platform(
os_family = "Linux",
),
)

# The default toolchain suite for RBE windows, pass it to --crosstool_top
alias(
name = "rbe_windows_default_toolchain_suite",
actual = "//third_party/toolchains/rbe_windows_bazel_5.2.0_vs2019:toolchain",
)

# The default CC toolchain suite for RBE windows
alias(
name = "rbe_windows_default_cc_toolchain",
actual = "//third_party/toolchains/rbe_windows_bazel_5.2.0_vs2019:cc-toolchain-x64_windows",
)

# The default platform for RBE windows
platform(
name = "rbe_windows_default_platform",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
],
exec_properties = create_rbe_exec_properties_dict(
# See rbe_win2019/Dockerfile for image details
container_image = "docker://gcr.io/grpc-testing/rbe_windows2019@sha256:41772e8eeb9dd8c8b996bf32d58164d84b2315c8e81e634bbff5a0216b7f52fd",
os_family = "Windows",
# by default, all RBE actions will run on "small" workers.
labels = {"os": "windows_2019", "machine_size": "small"},
),
)
11 changes: 5 additions & 6 deletions tools/remote_build/windows.bazelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import %workspace%/tools/remote_build/include/rbe_remote_execution.bazelrc

# Next section is windows-specific RBE configuration
build --host_crosstool_top=//third_party/toolchains/rbe_windows_bazel_5.2.0_vs2019:toolchain
build --crosstool_top=//third_party/toolchains/rbe_windows_bazel_5.2.0_vs2019:toolchain
build --extra_toolchains=//third_party/toolchains/rbe_windows_bazel_5.2.0_vs2019:cc-toolchain-x64_windows
build --crosstool_top=//third_party/toolchains:rbe_windows_default_toolchain_suite
build --extra_toolchains=//third_party/toolchains:rbe_windows_default_cc_toolchain
# Use custom execution platforms defined in third_party/toolchains
build --extra_execution_platforms=//third_party/toolchains:rbe_windows
build --host_platform=//third_party/toolchains:rbe_windows
build --platforms=//third_party/toolchains:rbe_windows
build --extra_execution_platforms=//third_party/toolchains:rbe_windows_default_platform
build --host_platform=//third_party/toolchains:rbe_windows_default_platform
build --platforms=//third_party/toolchains:rbe_windows_default_platform
# Needs to match the location of binaries in the RBE docker container
build --shell_executable=C:\\msys64\\usr\\bin\\bash.exe
build --python_path="C:\\Program Files\\Python310\\python.exe"
Expand Down

0 comments on commit 6ba546d

Please sign in to comment.