From ab8ab26ac759ab99d314127a651b6271a2a6e28a Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Wed, 8 Jan 2025 20:43:52 -0800 Subject: [PATCH] Pin non-bzlmod tests to Bazel 7 --- .bazelci/presubmit.yml | 19 +++++++++++++------ docs/src/index.md | 4 ++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 132f33ee7a..61cc9af4fd 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -1,5 +1,14 @@ --- minimum_bazel_version: &minimum_bazel_version "7.4.1" +no_bzlmod_bazel_version: &no_bzlmod_bazel_version "7.4.1" +no_bzlmod_shell_commands: &no_bzlmod_shell_commands + - echo "common --noenable_bzlmod --enable_workspace" >> user.bazelrc + - echo "7.4.1" > .bazelversion +no_bzlmod_rbe_shell_commands: &no_bzlmod_rbe_shell_commands + - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel + - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel + - echo "common --noenable_bzlmod --enable_workspace" >> user.bazelrc + - echo "7.4.1" > .bazelversion aspects_flags: &aspects_flags - "--config=rustfmt" - "--config=clippy" @@ -16,12 +25,6 @@ bzlmod_flags: &bzlmod_flags bzlmod_plus_repo_names_flags: &bzlmod_plus_repo_names_flags # `--lockfile_mode=error` is omitted because the repo names leak into the lock file. - "--incompatible_use_plus_in_repo_names" -no_bzlmod_shell_commands: &no_bzlmod_shell_commands - - echo "common --noenable_bzlmod --enable_workspace" >> user.bazelrc -no_bzlmod_rbe_shell_commands: &no_bzlmod_rbe_shell_commands - - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel - - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel - - echo "common --noenable_bzlmod --enable_workspace" >> user.bazelrc single_rust_channel_targets: &single_rust_channel_targets - "--" - "//..." @@ -116,6 +119,7 @@ tasks: ubuntu2004_no_bzlmod: name: No Bzlmod platform: ubuntu2004 + bazel: *no_bzlmod_bazel_version shell_commands: *no_bzlmod_shell_commands build_targets: *default_linux_targets test_targets: *default_linux_targets @@ -126,12 +130,14 @@ tasks: rbe_ubuntu2004_no_bzlmod: name: No Bzlmod platform: rbe_ubuntu2004 + bazel: *no_bzlmod_bazel_version shell_commands: *no_bzlmod_rbe_shell_commands build_targets: *default_linux_targets test_targets: *default_linux_targets macos_no_bzlmod: name: No Bzlmod platform: macos_arm64 + bazel: *no_bzlmod_bazel_version shell_commands: *no_bzlmod_shell_commands build_targets: *default_macos_targets test_targets: *default_macos_targets @@ -140,6 +146,7 @@ tasks: windows_no_bzlmod: name: No Bzlmod platform: windows + bazel: *no_bzlmod_bazel_version shell_commands: *no_bzlmod_shell_commands build_targets: *default_windows_targets test_targets: *default_windows_targets diff --git a/docs/src/index.md b/docs/src/index.md index 84392b5a97..3e47eeb243 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -89,6 +89,10 @@ The oldest version of Bazel the `main` branch is tested against is `7.4.1`. Prev We test these rules against the latest rolling releases of Bazel, and aim for compatibility with them, but prioritise stable releases over rolling releases where necessary. +### WORKSPACE support + +WORKSPACE support is officially tested with Bazel 7 for as long as that is the min supported version. While it may work with later versions, compatibility with those versions is not guaranteed or actively verified. + ## Supported platforms We aim to support Linux and macOS.