From 033469f435df2107a0691124e411c125b6dc4eae Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 27 Feb 2024 12:54:32 +0100 Subject: [PATCH] Test with Bazel 6.5.0 and 7.0.2 Also pin `.bazelversion` to 7.0.2 in the main and test module. --- .bazelci/presubmit.yml | 11 +++++++++++ .bazelversion | 1 + .bcr/presubmit.yml | 2 ++ tests/bcr/.bazelversion | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .bazelversion diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 97f66c112..42c1e5370 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,11 +3,13 @@ matrix: platform: - ubuntu2204 - macos + bazel: [6.5.0, 7.0.2] tasks: ubuntu2204: name: Ubuntu 22.04 with WORKSPACE platform: ubuntu2204 + bazel: ${{ bazel }} build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -23,6 +25,7 @@ tasks: ubuntu2204_bzlmod: name: Ubuntu 22.04 with Bzlmod platform: ubuntu2204 + bazel: ${{ bazel }} build_targets: - "..." run_targets: @@ -36,6 +39,7 @@ tasks: bcr_tests: name: BCR test module platform: ${{ platform }} + bazel: ${{ bazel }} working_directory: tests/bcr shell_commands: # Regenerate the BUILD files for the test module using Gazelle. @@ -55,6 +59,7 @@ tasks: bcr_test_windows: name: BCR test on Windows platform: windows + bazel: ${{ bazel }} working_directory: tests/bcr shell_commands: # Regenerate the BUILD file for the test module using Gazelle. @@ -80,6 +85,7 @@ tasks: macos_arm64_bzlmod: name: Mac OS Arm 64 with Bzlmod platform: macos_arm64 + bazel: ${{ bazel }} build_targets: - "..." test_targets: @@ -100,6 +106,7 @@ tasks: macos_bzlmod: name: Mac OS with Bzlmod platform: macos + bazel: ${{ bazel }} build_targets: - "..." test_targets: @@ -108,6 +115,7 @@ tasks: - "-//cmd/gazelle:gazelle_test" macos: name: Mac OS with WORKSPACE + bazel: ${{ bazel }} build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -118,6 +126,7 @@ tasks: - "..." windows_bzlmod: name: Windows with Bzlmod + bazel: ${{ bazel }} platform: windows build_targets: - "--" @@ -142,6 +151,7 @@ tasks: windows: name: Windows with WORKSPACE platform: windows + bazel: ${{ bazel }} build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -168,6 +178,7 @@ tasks: incompatible: name: Ubuntu 22.04 with WORKSPACE and --config=incompatible platform: ubuntu2204 + bazel: 7.0.2 build_flags: - "--noexperimental_enable_bzlmod" - "--config=incompatible" diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 000000000..a8907c025 --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +7.0.2 diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index 89eaacfe3..5ebe41093 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -6,10 +6,12 @@ bcr_test_module: - ubuntu2004 - macos - windows + bazel: [6.x, 7.x] tasks: run_test_module: name: Run test module platform: ${{ platform }} + bazel: ${{ bazel }} shell_commands: # Regenerate the BUILD files for the test module using Gazelle. - rm pkg/BUILD.bazel proto/BUILD.bazel diff --git a/tests/bcr/.bazelversion b/tests/bcr/.bazelversion index 19b860c18..a8907c025 100644 --- a/tests/bcr/.bazelversion +++ b/tests/bcr/.bazelversion @@ -1 +1 @@ -6.4.0 +7.0.2