From b921cba270147963ac6105820a05b65c79304b70 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 27 Dec 2023 17:43:45 +0100 Subject: [PATCH 1/2] Also build the repo with Bzlmod enabled --- .bazelci/presubmit.yml | 21 ++++++++++++++++++++- .bazelrc | 5 ++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 85b7fece71..cbcaa2eaad 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -7,7 +7,8 @@ matrix: - windows tasks: - ubuntu1804_bazel400: + ubuntu1804_bazel540: + name: Ubuntu with minimum supported Bazel version platform: ubuntu1804 bazel: 5.4.0 # test minimum supported version of bazel shell_commands: @@ -20,6 +21,7 @@ tasks: - "-//tests/core/nogo/bzlmod/..." ubuntu2004: # enable some unflipped incompatible flags on this platform to ensure we don't regress. + name: Ubuntu with --config=incompatible shell_commands: - tests/core/cgo/generate_imported_dylib.sh build_flags: @@ -30,6 +32,23 @@ tasks: - "//..." test_targets: - "//..." + ubuntu2004_bzlmod: + name: Ubuntu with Bzlmod + platform: ubuntu2004 + shell_commands: + - tests/core/cgo/generate_imported_dylib.sh + build_flags: + - "--enable_bzlmod" + build_targets: + - "//..." + - "-//tests/extras/gomock:all" + - "-//tests/integration/googleapis:all" + test_flags: + - "--enable_bzlmod" + test_targets: + - "//..." + - "-//tests/extras/gomock:all" + - "-//tests/integration/googleapis:all" debian11_zig_cc: platform: debian11 shell_commands: diff --git a/.bazelrc b/.bazelrc index 2cc995f10c..cdea3f67b3 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,8 +1,11 @@ common --enable_platform_specific_config +test --test_output=errors # TODO: Temporarily disable while rules_go migrates to Bzlmod for its dev build. # https://github.com/bazelbuild/bazel/issues/18958 common --noexperimental_enable_bzlmod -test --test_output=errors +# rules_go is not typically used as a root module, so we want our +# dependency versions to be as low as possible. +common --check_direct_dependencies=off # Go requires a C toolchain that accepts options and emits errors like # gcc or clang. The Go SDK does not support MSVC. From 5940af7950b94f091c651c8919d19c4a36d4046e Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 27 Dec 2023 17:54:48 +0100 Subject: [PATCH 2/2] m --- MODULE.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/MODULE.bazel b/MODULE.bazel index 687fc339f3..e2573361dd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,6 +10,7 @@ bazel_dep(name = "bazel_skylib", version = "1.2.0") bazel_dep(name = "platforms", version = "0.0.4") bazel_dep(name = "rules_proto", version = "4.0.0") bazel_dep(name = "protobuf", version = "3.19.2", repo_name = "com_google_protobuf") +bazel_dep(name = "stardoc", version = "0.6.2", repo_name = "io_bazel_stardoc") go_sdk = use_extension("//go:extensions.bzl", "go_sdk") go_sdk.download(