Skip to content

Commit

Permalink
add new rbe platforms
Browse files Browse the repository at this point in the history
use a custom built docker container that contains all Bazel test
dependencies as well as toolchains generated for this container.
See https://github.com/buchgr/bazel_rbe_toolchains

Progress towards bazelbuild#8033
  • Loading branch information
buchgr committed Apr 30, 2019
1 parent 717ccff commit 6e4138a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 36 deletions.
18 changes: 9 additions & 9 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Configuration to build and test Bazel itself on RBE.
build:remote --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8
build:remote --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.2:jdk8
build:remote --host_javabase=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804/java:jdk
build:remote --javabase=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804/java:jdk
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build:remote --crosstool_top=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.24.0/default:toolchain
build:remote --crosstool_top=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804/cc:toolchain

build:remote --extra_toolchains=@bazel_toolchains//configs/ubuntu16_04_clang/1.2/bazel_0.24.0/cpp:cc-toolchain-clang-x86_64-default
build:remote --extra_execution_platforms=//:rbe_ubuntu1604_default
build:remote --extra_execution_platforms=//:rbe_ubuntu1604_highcpu
build:remote --host_platform=//:rbe_ubuntu1604_default
build:remote --platforms=//:rbe_ubuntu1604_default
build:remote --extra_toolchains=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804/config:cc-toolchain
build:remote --extra_execution_platforms=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804:default_platform
build:remote --extra_execution_platforms=//:highcpu_platform
build:remote --host_platform=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804:default_platform
build:remote --platforms=@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804:default_platform

build:remote --spawn_strategy=remote
build:remote --strategy=Javac=remote
Expand All @@ -19,7 +19,7 @@ build:remote --define=EXECUTOR=remote

build:remote --remote_instance_name=projects/bazel-untrusted/instances/default_instance
build:remote --remote_executor=remotebuildexecution.googleapis.com
build:remote --remote_timeout=1200
build:remote --remote_timeout=600
build:remote --tls_enabled
build:remote --google_default_credentials

Expand Down
26 changes: 3 additions & 23 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -141,34 +141,14 @@ platform(
parents = ["@bazel_tools//platforms:host_platform"],
)

# The default RBE platform where most actions run on
platform(
name = "rbe_ubuntu1604_default",
parents = ["@bazel_toolchains//configs/ubuntu16_04_clang/1.2:rbe_ubuntu1604"],
remote_execution_properties = """
properties: {
name: "container-image"
value:"docker://gcr.io/bazel-untrusted/ubuntu1604_bazel_rbe@sha256:b60b641427ca8aa99134cc1f9889e3349e391eed85854b5cfbb462884ec3420b"
}
properties: {
name: "dockerNetwork"
value: "standard"
}
properties: {
name: "dockerPrivileged"
value: "true"
}
""",
)

# The highcpu RBE platform where heavy actions run on. In order to
# use this platform add the highcpu_machine constraint to your target.
platform(
name = "rbe_ubuntu1604_highcpu",
name = "highcpu_platform",
constraint_values = [
":highcpu_machine",
"//:highcpu_machine",
],
parents = [":rbe_ubuntu1604_default"],
parents = ["@bazel_rbe_toolchains//configs/bazel_0.24.1/bazel-ubuntu1804:default_platform"],
remote_execution_properties = """
{PARENT_REMOTE_EXECUTION_PROPERTIES}
properties: {
Expand Down
10 changes: 10 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,16 @@ http_archive(
],
)

http_archive(
name = "bazel_rbe_toolchains",
sha256 = "6082baeb3b363e285d1b279ce6b2e2ee20bace4d494a9d63b4c17e0a09dc36d3",
strip_prefix = "bazel_rbe_toolchains-0b7cd8db39e9b74bcc6612695d59a52401995ae1",
urls = [
"https://mirror.bazel.build/github.com/buchgr/bazel_rbe_toolchains/archive/0b7cd8db39e9b74bcc6612695d59a52401995ae1.tar.gz",
"https://github.com/buchgr/bazel_rbe_toolchains/archive/0b7cd8db39e9b74bcc6612695d59a52401995ae1.tar.gz",
],
)

# Creates toolchain configuration for remote execution with BuildKite CI
# for rbe_ubuntu1604.
# To run the tests with RBE on BuildKite CI uncomment the two lines below
Expand Down
4 changes: 0 additions & 4 deletions src/test/shell/bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ sh_test(
srcs = ["bazel_coverage_cc_test_gcc.sh"],
data = [":test-deps"],
tags = [
"local",
"no_windows",
],
)
Expand All @@ -257,7 +256,6 @@ sh_test(
srcs = ["bazel_coverage_cc_test_llvm.sh"],
data = [":test-deps"],
tags = [
"local",
"no_windows",
],
)
Expand All @@ -267,7 +265,6 @@ sh_test(
srcs = ["bazel_coverage_java_test.sh"],
data = [":test-deps"],
tags = [
"local",
"no_windows",
],
)
Expand All @@ -277,7 +274,6 @@ sh_test(
srcs = ["bazel_coverage_sh_test.sh"],
data = [":test-deps"],
tags = [
"local",
"no_windows",
],
)
Expand Down

0 comments on commit 6e4138a

Please sign in to comment.