Skip to content
New issue

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

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

Already on GitHub? # to your account

Add MODULE.bazel to rules proto #147

Merged
merged 19 commits into from
Sep 22, 2022
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
82 changes: 60 additions & 22 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,69 @@
---
build_targets: &build_targets
- "//..."
test_targets: &test_targets
- "//..."

build_targets_bzlmod: &build_targets_bzlmod
- "//..."
test_targets_bzlmod: &test_targets_bzlmod
- "//..."

buildifier:
version: latest
# skylark-comment fails because links to Bazel's docs for
# `ProtoInfo` and `proto_common` contain `/skylark/`.
warnings: "-skylark-comment"

platforms:
tasks:
ubuntu2004:
build_targets: *build_targets
test_targets: *test_targets
macos:
build_targets:
- "//..."
test_targets:
- "//..."

rbe_ubuntu1604:
build_targets:
- "//..."
test_targets:
- "//..."

ubuntu1804:
build_targets:
- "//..."
test_targets:
- "//..."

build_targets: *build_targets
test_targets: *test_targets
windows:
build_targets:
- "//..."
test_targets:
- "//..."
build_targets: *build_targets
test_targets: *test_targets
ubuntu2004_head:
bazel: last_green
platform: ubuntu2004
build_targets: *build_targets
test_targets: *test_targets
macos_head:
bazel: last_green
platform: macos
build_targets: *build_targets
test_targets: *test_targets
windows_head:
bazel: last_green
platform: windows
build_targets: *build_targets
test_targets: *test_targets
ubuntu2004_bzlmod:
bazel: last_green
platform: ubuntu2004
build_flags:
- "--config=bzlmod"
build_targets: *build_targets_bzlmod
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
macos_bzlmod:
bazel: last_green
platform: macos
build_flags:
- "--config=bzlmod"
build_targets: *build_targets_bzlmod
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
windows_bzlmod:
bazel: last_green
platform: windows
build_flags:
- "--config=bzlmod"
comius marked this conversation as resolved.
Show resolved Hide resolved
build_targets: *build_targets_bzlmod
test_flags:
- "--config=bzlmod"
test_targets: *test_targets_bzlmod
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build:bzlmod --enable_bzlmod
6 changes: 6 additions & 0 deletions .bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"homepage": "https://github.com/bazelbuild/rules_proto"
"maintainers": [],
"versions": [],
"yanked_versions": {}
}
8 changes: 8 additions & 0 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
matrix:
platform: ["centos7", "debian10", "macos", "ubuntu2004", "windows"]
tasks:
verify_build_targets:
name: "Verify build targets"
platform: ${{ platform }}
build_targets:
- "@rules_proto//..."
5 changes: 5 additions & 0 deletions .bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz"
}
14 changes: 14 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module(
name = "rules_proto",
compatibility_level = 1,
version = "5.3.0-21.5",
)

bazel_dep(name = "bazel_skylib", version = "1.1.1")
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "3.19.0")

# TODO(bazel-team): add support for protobuf_workspace

# Dependencies needed in tests
bazel_dep(name = "rules_cc", dev_dependency = True, version = "0.0.1")
bazel_dep(name = "googletest", dev_dependency = True, repo_name = "com_google_googletest", version = "1.11.0")
2 changes: 2 additions & 0 deletions WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# TODO(bazel-team): Without following line runfiles use __main__ as a repo name.
workspace(name = "rules_proto")