Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify WORKSPACE.bzlmod and add CI test for Bzlmod #14312

Closed
wants to merge 1 commit into from
Closed
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
38 changes: 38 additions & 0 deletions .bazelci/postsubmit_bzlmod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
tasks:
centos7_java11_devtoolset10:
build_flags:
- "--config=bzlmod"
build_targets:
- "//src:bazel_nojdk"
ubuntu1804:
build_flags:
- "--config=bzlmod"
build_targets:
- "//src:bazel_nojdk"
ubuntu1804_clang:
platform: ubuntu1804
environment:
CC: clang
CC_CONFIGURE_DEBUG: 1
name: "Clang"
build_flags:
- "--config=bzlmod"
build_targets:
- "//src:bazel_nojdk"
ubuntu2004:
build_flags:
- "--config=bzlmod"
build_targets:
- "//src:bazel_nojdk"
macos:
xcode_version: "13.0"
build_flags:
- "--config=bzlmod"
build_targets:
- "//src:bazel_nojdk"
windows:
build_flags:
- "--config=bzlmod"
build_targets:
- "//src:bazel_nojdk"
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@ build:remote --config=ubuntu1804_java11

build:macos --macos_minimum_os=10.10

# Enable Bzlmod
build:bzlmod --experimental_enable_bzlmod
# TODO(pcloudy): The following should be removed after fixing https://github.com/bazelbuild/bazel/issues/14279
build:bzlmod --crosstool_top=@rules_cc.0.0.1.cc_configure.local_config_cc//:toolchain
build:bzlmod --xcode_version_config=@rules_cc.0.0.1.cc_configure.local_config_xcode//:host_xcodes

# User-specific .bazelrc
try-import user.bazelrc
8 changes: 3 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ bazel_dep(name = "grpc", version = "1.41.0", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "platforms", version = "0.0.4")
bazel_dep(name = "rules_pkg", version = "0.5.1")
bazel_dep(name = "stardoc", version = "0.5.0", repo_name = "io_bazel_skydoc")
bazel_dep(name = "zstd-jni", version = "1.5.0-4")

# TODO(pcloudy): Add remoteapis and googleapis as Bazel modules in the BCR.
bazel_dep(name = "remoteapis", version = "")
Expand All @@ -27,10 +28,7 @@ local_path_override(
)

# The following are required when building without WORKSPACE SUFFIX
# TODO(pcloudy): Make building Bazel work without WORKSPACE SUFFIX.
# This requires migrating all dependencies and toolchain registration defined in
# WORKSPACE to their corresponding Bazel modules. Eg. remote jdks, java tools
# and java toolchain registrations all should be moved to rules_java.
bazel_dep(name = "rules_cc", version = "0.0.1")
bazel_dep(name = "rules_java", version = "4.0.0")
bazel_dep(name = "rules_python", version = "0.4.0")
bazel_dep(name = "rules_java", version = "5.0.0")
bazel_dep(name = "rules_proto", version = "4.0.0")
Loading