Skip to content

Commit

Permalink
Add a new presubmit environment for bzlmod (bazelbuild#2309)
Browse files Browse the repository at this point in the history
Add an environment which builds without a workspace file.

This will allow us to verify that targets such as cargo_bazel can build
with bzlmod. This is mainly useful to ensure that your dependencies are
specified in MODULE.bazel, rather than WORKSPACE. At the moment, I only
specify a single target, to verify that it's working. As we start
supporting additional targets, entries will be added here to prevent
regressions.
  • Loading branch information
matts1 authored Dec 8, 2023
1 parent f91b186 commit 6874b8d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,17 @@ tasks:
test_targets: *default_windows_targets
soft_fail: yes
bazel: "rolling"
ubuntu2004_bzlmod_only:
name: With bzlmod
platform: ubuntu2004
# See https://bazel.build/external/migration#migration-process
# When WORKSPACE.bzlmod is provided, the workspace file is ignored.
shell_commands:
- "touch WORKSPACE.bzlmod"
build_flags:
- "--enable_bzlmod"
build_targets:
- "//tools/runfiles"
ubuntu2004_clang:
name: With Clang
platform: ubuntu2004
Expand Down

0 comments on commit 6874b8d

Please sign in to comment.