Skip to content

Commit

Permalink
Test with Bazel 6.5.0 and 7.0.2
Browse files Browse the repository at this point in the history
Also pin `.bazelversion` to 7.0.2 in the main and test module.
  • Loading branch information
fmeum committed Feb 27, 2024
1 parent 556d6c2 commit a5e15fa
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
37 changes: 32 additions & 5 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
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:
Expand All @@ -23,6 +22,7 @@ tasks:
ubuntu2204_bzlmod:
name: Ubuntu 22.04 with Bzlmod
platform: ubuntu2204
bazel: ${{ bazel }}
build_targets:
- "..."
run_targets:
Expand All @@ -34,8 +34,28 @@ tasks:
- "-//internal:bazel_test"
- "-//cmd/gazelle:gazelle_test"
bcr_tests:
name: BCR test module
platform: ${{ platform }}
name: BCR test module on Ubuntu
platform: ubuntu2204
bazel: ${{ bazel }}
working_directory: tests/bcr
shell_commands:
# Regenerate the BUILD file for the test module using Gazelle.
# Also verify -repo_config are generated correctly in gazelle.bash
- rm pkg/BUILD.bazel
- bazel run //:gazelle -- update pkg
- bazel run //:gazelle -- pkg
build_targets:
- "//..."
- "//:gazelle"
test_targets:
# Specify this target explicitly to verify that Gazelle generated it correctly.
- "//pkg:pkg_test"
- "//..."
- "@test_dep//..."
bcr_tests_macos:
name: BCR test module on macOS
platform: macos
bazel: ${{ bazel }}
working_directory: tests/bcr
shell_commands:
# Regenerate the BUILD files for the test module using Gazelle.
Expand All @@ -55,6 +75,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.
Expand All @@ -80,6 +101,7 @@ tasks:
macos_arm64_bzlmod:
name: Mac OS Arm 64 with Bzlmod
platform: macos_arm64
bazel: ${{ bazel }}
build_targets:
- "..."
test_targets:
Expand All @@ -100,6 +122,7 @@ tasks:
macos_bzlmod:
name: Mac OS with Bzlmod
platform: macos
bazel: ${{ bazel }}
build_targets:
- "..."
test_targets:
Expand All @@ -108,6 +131,7 @@ tasks:
- "-//cmd/gazelle:gazelle_test"
macos:
name: Mac OS with WORKSPACE
bazel: ${{ bazel }}
build_flags:
- "--noexperimental_enable_bzlmod"
test_flags:
Expand All @@ -118,6 +142,7 @@ tasks:
- "..."
windows_bzlmod:
name: Windows with Bzlmod
bazel: ${{ bazel }}
platform: windows
build_targets:
- "--"
Expand All @@ -142,6 +167,7 @@ tasks:
windows:
name: Windows with WORKSPACE
platform: windows
bazel: ${{ bazel }}
build_flags:
- "--noexperimental_enable_bzlmod"
test_flags:
Expand All @@ -168,6 +194,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"
Expand Down
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.2
2 changes: 2 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/bcr/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.4.0
7.0.2

0 comments on commit a5e15fa

Please sign in to comment.