Skip to content

Commit

Permalink
Update rbe config to pick up JDK21
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 614590443
Change-Id: I480373360786330d2ade3a916b92261f4e2c91b4
  • Loading branch information
coeuvre authored and copybara-github committed Mar 11, 2024
1 parent 86d0a10 commit 40824e1
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 38 deletions.
19 changes: 10 additions & 9 deletions .bazelci/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,28 +320,34 @@ tasks:
rbe_ubuntu2004:
platform: ubuntu2004
name: "RBE"
environment:
# Use last_green to pickup the fix for https://github.com/bazelbuild/bazel/issues/21604.
# TODO(chiwang): Remove this after Bazel 7.2.0 is released.
USE_BAZEL_VERSION: last_green
shell_commands:
- sed -i.bak
-e 's/^# android_sdk_repository/android_sdk_repository/'
-e 's/^# android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod
- rm -f WORKSPACE.bzlmod.bak
build_flags:
- "--config=ubuntu2004_java11"
- "--config=remote"
- "--remote_executor=grpcs://remotebuildexecution.googleapis.com"
- "--jobs=200"
- "--experimental_remote_cache_async"
- "--experimental_remote_merkle_tree_cache"
# https://github.com/bazelbuild/bazel/issues/21628
# - "--experimental_remote_merkle_tree_cache"
- "--remote_download_minimal"
build_targets:
- "//src:bazel"
- "//src:bazel_jdk_minimal"
- "//src/main/java/..."
test_flags:
- "--config=ubuntu2004_java11"
- "--config=remote"
- "--remote_executor=grpcs://remotebuildexecution.googleapis.com"
- "--jobs=200"
- "--experimental_remote_cache_async"
- "--experimental_remote_merkle_tree_cache"
# https://github.com/bazelbuild/bazel/issues/21628
# - "--experimental_remote_merkle_tree_cache"
- "--remote_download_minimal"
test_targets:
- "//scripts/..."
Expand Down Expand Up @@ -371,11 +377,6 @@ tasks:
- "-//src/test/py/bazel:bzlmod_query_test"
- "-//src/test/py/bazel:mod_command_test"
- "-//src/test/shell/bazel:verify_workspace"
# TODO(pcloudy): Re-enable after rbe platform switch to JDK 21
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:AllTests"
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:antxmlresultwriter_integration_test"
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:junit4_testbridge_integration_test"
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:utf8_test_log_test"
include_json_profile:
- build
- test
Expand Down
19 changes: 10 additions & 9 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,28 +378,34 @@ tasks:
rbe_ubuntu2004:
platform: ubuntu2004
name: "RBE"
environment:
# Use last_green to pickup the fix for https://github.com/bazelbuild/bazel/issues/21604.
# TODO(chiwang): Remove this after Bazel 7.2.0 is released.
USE_BAZEL_VERSION: last_green
shell_commands:
- sed -i.bak
-e 's/^# android_sdk_repository/android_sdk_repository/'
-e 's/^# android_ndk_repository/android_ndk_repository/' WORKSPACE.bzlmod
- rm -f WORKSPACE.bzlmod.bak
build_flags:
- "--config=ubuntu2004_java11"
- "--config=remote"
- "--remote_executor=grpcs://remotebuildexecution.googleapis.com"
- "--jobs=200"
- "--experimental_remote_cache_async"
- "--experimental_remote_merkle_tree_cache"
# https://github.com/bazelbuild/bazel/issues/21628
# - "--experimental_remote_merkle_tree_cache"
- "--remote_download_minimal"
build_targets:
- "//src:bazel"
- "//src:bazel_jdk_minimal"
- "//src/main/java/..."
test_flags:
- "--config=ubuntu2004_java11"
- "--config=remote"
- "--remote_executor=grpcs://remotebuildexecution.googleapis.com"
- "--jobs=200"
- "--experimental_remote_cache_async"
- "--experimental_remote_merkle_tree_cache"
# https://github.com/bazelbuild/bazel/issues/21628
# - "--experimental_remote_merkle_tree_cache"
- "--remote_download_minimal"
test_targets:
- "//scripts/..."
Expand Down Expand Up @@ -432,11 +438,6 @@ tasks:
# Flaky on rbe_ubuntu2004
# https://github.com/bazelbuild/continuous-integration/issues/1631
- "-//src/test/shell/bazel:bazel_sandboxing_networking_test"
# TODO(pcloudy): Re-enable after rbe platform switch to JDK 21
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:AllTests"
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:antxmlresultwriter_integration_test"
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:junit4_testbridge_integration_test"
- "-//src/java_tools/junitrunner/javatests/com/google/testing/junit/runner:utf8_test_log_test"
include_json_profile:
- build
- test
Expand Down
16 changes: 8 additions & 8 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ build:remote_shared --java_runtime_version=rbe_jdk
build:remote_shared --tool_java_runtime_version=rbe_jdk

# Configuration to build and test Bazel on RBE on Ubuntu 18.04 with Java 11
build:ubuntu2004_java11 --extra_toolchains=@rbe_ubuntu2004_java11//java:all
build:ubuntu2004_java11 --crosstool_top=@rbe_ubuntu2004_java11//cc:toolchain
build:ubuntu2004_java11 --extra_toolchains=@rbe_ubuntu2004_java11//config:cc-toolchain
build:ubuntu2004_java11 --extra_execution_platforms=//:rbe_ubuntu2004_java11_platform,//:rbe_ubuntu2004_java11_highcpu_platform
build:ubuntu2004_java11 --host_platform=//:rbe_ubuntu2004_java11_platform
build:ubuntu2004_java11 --platforms=//:rbe_ubuntu2004_java11_platform
build:ubuntu2004_java11 --config=remote_shared
build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//java:all
build:ubuntu2004 --crosstool_top=@rbe_ubuntu2004//cc:toolchain
build:ubuntu2004 --extra_toolchains=@rbe_ubuntu2004//config:cc-toolchain
build:ubuntu2004 --extra_execution_platforms=//:rbe_ubuntu2004_platform,//:rbe_ubuntu2004_highcpu_platform
build:ubuntu2004 --host_platform=//:rbe_ubuntu2004_platform
build:ubuntu2004 --platforms=//:rbe_ubuntu2004_platform
build:ubuntu2004 --config=remote_shared

# Alias
build:remote --config=ubuntu2004_java11
build:remote --config=ubuntu2004

build:macos --macos_minimum_os=10.11

Expand Down
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ platform(
],
)

REMOTE_PLATFORMS = ("rbe_ubuntu2004_java11",)
REMOTE_PLATFORMS = ("rbe_ubuntu2004",)

[
platform(
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ use_repo(
)

bazel_rbe_deps = use_extension("//:rbe_extension.bzl", "bazel_rbe_deps")
use_repo(bazel_rbe_deps, "rbe_ubuntu2004_java11")
use_repo(bazel_rbe_deps, "rbe_ubuntu2004")

remote_coverage_tools_extension = use_extension("//tools/test:extensions.bzl", "remote_coverage_tools_extension")
use_repo(remote_coverage_tools_extension, "remote_coverage_tools")
Expand Down
22 changes: 14 additions & 8 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rbe_extension.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")

def _bazel_rbe_deps(_ctx):
rbe_preconfig(
name = "rbe_ubuntu2004_java11",
toolchain = "ubuntu2004-bazel-java11",
name = "rbe_ubuntu2004",
toolchain = "ubuntu2004",
)

bazel_rbe_deps = module_extension(implementation = _bazel_rbe_deps)

0 comments on commit 40824e1

Please sign in to comment.