From fde3836e193c88f1a507e395f75084a33d7f500e Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 27 Feb 2024 18:43:43 +0100 Subject: [PATCH] Test BCR with Bazel 6.5.0 and 7.0.2 (#1744) * Test with Bazel 6.5.0 and 7.0.2 Also pin `.bazelversion` to 7.0.2 in the main and test module. * Update presubmit.yml --- .bazelci/presubmit.yml | 14 +++++++++++++- .bazelversion | 1 + .bcr/presubmit.yml | 2 ++ tests/bcr/.bazelversion | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .bazelversion diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 97f66c112..d500c05cd 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,11 +3,12 @@ matrix: platform: - ubuntu2204 - macos - + bazel: [6.x, 7.x] tasks: ubuntu2204: name: Ubuntu 22.04 with WORKSPACE platform: ubuntu2204 + bazel: 7.0.2 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -23,6 +24,7 @@ tasks: ubuntu2204_bzlmod: name: Ubuntu 22.04 with Bzlmod platform: ubuntu2204 + bazel: 7.0.2 build_targets: - "..." run_targets: @@ -36,6 +38,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 +58,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 +84,7 @@ tasks: macos_arm64_bzlmod: name: Mac OS Arm 64 with Bzlmod platform: macos_arm64 + bazel: 7.0.2 build_targets: - "..." test_targets: @@ -89,6 +94,7 @@ tasks: macos_arm64: name: Mac OS Arm 64 with WORKSPACE platform: macos_arm64 + bazel: 7.0.2 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -100,6 +106,7 @@ tasks: macos_bzlmod: name: Mac OS with Bzlmod platform: macos + bazel: 7.0.2 build_targets: - "..." test_targets: @@ -108,6 +115,8 @@ tasks: - "-//cmd/gazelle:gazelle_test" macos: name: Mac OS with WORKSPACE + platform: macos + bazel: 7.0.2 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -119,6 +128,7 @@ tasks: windows_bzlmod: name: Windows with Bzlmod platform: windows + bazel: 7.0.2 build_targets: - "--" - "..." @@ -142,6 +152,7 @@ tasks: windows: name: Windows with WORKSPACE platform: windows + bazel: 7.0.2 build_flags: - "--noexperimental_enable_bzlmod" test_flags: @@ -168,6 +179,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