Skip to content

Commit e83c39d

Browse files
authored
Use rbe_preconfig for RBE toolchain config (#958)
1 parent e589105 commit e83c39d

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

.bazelci/presubmit.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ tasks:
2323
build_targets: *default_linux_targets
2424
test_targets: *default_linux_targets
2525
rbe_ubuntu1604:
26+
shell_commands:
27+
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
28+
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
2629
build_targets:
2730
- "//..."
2831
test_targets:
@@ -52,6 +55,9 @@ tasks:
5255
rbe_ubuntu1604_with_aspects:
5356
name: With Aspects
5457
platform: rbe_ubuntu1604
58+
shell_commands:
59+
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
60+
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
5561
build_targets: *default_linux_targets
5662
test_targets:
5763
- "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
@@ -64,6 +70,9 @@ tasks:
6470
rbe_ubuntu1604_with_aspects:
6571
name: RBE Rolling Bazel Version With Aspects
6672
platform: rbe_ubuntu1604
73+
shell_commands:
74+
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
75+
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
6776
build_targets: *default_linux_targets
6877
test_targets:
6978
- "--" # Allows negative patterns; hack for https://github.com/bazelbuild/continuous-integration/pull/245
@@ -208,6 +217,9 @@ tasks:
208217
# The bindgen rules currently do not work on RBE
209218
# see: https://github.com/bazelbuild/rules_rust/issues/919
210219
- "-//bindgen/..."
220+
shell_commands:
221+
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
222+
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
211223
build_targets: *rbe_examples_targets
212224
test_targets: *rbe_examples_targets
213225
build_flags: *aspects_flags
@@ -266,6 +278,9 @@ tasks:
266278
environment:
267279
RULES_RUST_CRATE_UNIVERSE_BOOTSTRAP: true
268280
working_directory: examples/crate_universe
281+
shell_commands:
282+
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
283+
- sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
269284
build_targets:
270285
- "//..."
271286
test_targets:

WORKSPACE.bazel

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,13 @@ rules_rust_test_deps()
3737
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3838

3939
http_archive(
40-
name = "bazel_toolchains",
41-
sha256 = "179ec02f809e86abf56356d8898c8bd74069f1bd7c56044050c2cd3d79d0e024",
42-
strip_prefix = "bazel-toolchains-4.1.0",
43-
urls = [
44-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
45-
"https://github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
46-
],
40+
name = "bazelci_rules",
41+
sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
42+
strip_prefix = "bazelci_rules-1.0.0",
43+
url = "https://github.com/bazelbuild/continuous-integration/releases/download/rules-1.0.0/bazelci_rules-1.0.0.tar.gz",
4744
)
4845

49-
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
50-
51-
# Creates a default toolchain config for RBE.
52-
# Use this as is if you are using the rbe_ubuntu16_04 container,
53-
# otherwise refer to RBE docs.
54-
rbe_autoconfig(name = "buildkite_config")
46+
# To run with RBE on Bazel CI, uncomment the following lines.
47+
#
48+
# load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
49+
# rbe_preconfig(name = "buildkite_config", toolchain = "ubuntu1604-bazel-java8")

0 commit comments

Comments
 (0)