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

Improve releasing via bzlmod #230

Merged
merged 3 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# We configure this at it seems to be mandatory, but instead of performing of executing integration tests as intended,
# we execute the unit tests. We trust our integration tests in our CI to ensure everything is fine for a release.
# Either way, our integration tests are basd on Python scripts and currently could not be executed by a bazel test
# command either way.
bcr_test_module:
module_path: "e2e/bzlmod"
module_path: "examples"
matrix:
platform: [ "macos", "ubuntu2004", "windows" ]
bazel: [ 5.4.0, 6.x, 7.x ]
# DWYU supports Bazel 5.4.0, but only via WORKSPACE
bazel: [ 6.x, 7.x ]
tasks:
run_tests:
name: "Run unit tests"
verify_examples:
name: "Verify examples"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//src/..."
shell_commands:
- python test.py
16 changes: 7 additions & 9 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@ module(
name = "depend_on_what_you_use",
# Keep in sync with setup_step_2.bzl
bazel_compatibility = [">=5.4.0"],
compatibility_level = 0,
)

bazel_dep(
name = "bazel_skylib",
# Keep in sync with //third_party/dependencies.bzl
version = "1.5.0",
)
bazel_dep(
name = "rules_cc",
# Keep in sync with //third_party/dependencies.bzl
version = "0.0.9",
version = "0.0.8",
)
bazel_dep(
name = "rules_python",
# Keep in sync with //third_party/dependencies.bzl
# Keep in sync with //examples/MODULE.bazel
# Keep in sync with //test/aspect/MODULE.bazel
# Keep in sync with //test/apply_fixes/execution_logic.py
Expand All @@ -34,6 +26,12 @@ use_repo(non_module_dependencies, "dwyu_pcpp")
### Development Dependencies
###

bazel_dep(
name = "bazel_skylib",
version = "1.5.0",
dev_dependency = True,
)

python = use_extension(
"@rules_python//python/extensions:python.bzl",
"python",
Expand Down