Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate Bazel version is specified for tasks in presubmit.yml file #1387

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

meteorcloudy
Copy link
Member

@meteorcloudy meteorcloudy commented Jan 26, 2024

Addressing #133

From now on, the presubmit.yml file must explicitly specify which Bazel versions should be used for testing this module.

It's recommended to add matrix testing for all supported Bazel LTS releases, for example:

diff --git a/modules/rules_go/0.40.1/presubmit.yml b/modules/rules_go/0.40.1/presubmit.yml
index def6f3a..bad2b7d 100644
--- a/modules/rules_go/0.40.1/presubmit.yml
+++ b/modules/rules_go/0.40.1/presubmit.yml
@@ -5,10 +5,14 @@ matrix:
     - ubuntu2004
     - macos
     - windows
+  bazel:
+    - 6.x
+    - 7.x
 tasks:
   verify_targets:
     name: Verify build targets
     platform: ${{ platform }}
+    bazel: ${{ bazel }}
     build_targets:
       - '@rules_go//go/tools/bzltestutil/...'
 bcr_test_module:
@@ -20,10 +24,14 @@ bcr_test_module:
       - ubuntu2004
       - macos
       - windows
+    bazel:
+      - 6.x
+      - 7.x
   tasks:
     run_test_module:
       name: Run test module
       platform: ${{ platform }}
+      bazel: ${{ bazel }}
       build_targets:
         - //...
         - '@go_default_sdk//...'

The following changes has been made to adapt this change:

@Wyverald Wyverald merged commit c232b55 into bazelbuild:main Jan 26, 2024
6 checks passed
ghost pushed a commit to uber/hermetic_cc_toolchain that referenced this pull request Feb 1, 2024
ghost pushed a commit to uber/hermetic_cc_toolchain that referenced this pull request Feb 1, 2024
UebelAndre added a commit to bazelbuild/rules_rust that referenced this pull request Feb 9, 2024
@meteorcloudy meteorcloudy mentioned this pull request Feb 12, 2024
@Wyverald Wyverald mentioned this pull request Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants