Skip to content

Commit

Permalink
Add .bazelci/presubmit.yml to test protobuf on Bazel CI
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 731327971
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Feb 26, 2025
1 parent 57b59ef commit 0d7ebb7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .bazelci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Bazel CI test

The `.bazelci/presubmit.yml` file is used by https://buildkite.com/bazel/protobuf
to test building protobuf with Bazel on Bazel CI. It should contain the same
set of tests as `.bcr/presubmit.yml` which is the tests that will run before
publishing protobuf to BCR.
21 changes: 21 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# LINT.IfChange(bazelci_presubmit)
matrix:
platform: ["debian10", "macos", "macos_arm64", "ubuntu2004", "windows"]
bazel: [7.x, 8.x]

tasks:
verify_targets:
name: "Verify build targets"
working_directory: examples
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '//...'
- '@com_google_protobuf//:protobuf'
- '@com_google_protobuf//:protobuf_lite'
- '@com_google_protobuf//:protobuf_python'
- '@com_google_protobuf//:protobuf_java'
- '@com_google_protobuf//:protoc'
- '@com_google_protobuf//:test_messages_proto2_cc_proto'
- '@com_google_protobuf//:test_messages_proto3_cc_proto'
# LINT.ThenChange(<ROOT_DIR>/.bcr/presubmit.yml)
6 changes: 4 additions & 2 deletions .bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# LINT.IfChange(bcr_presubmit)
bcr_test_module:
module_path: examples
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
platform: ["debian10", "macos", "macos_arm64", "ubuntu2004", "windows"]
bazel: [7.x, 8.x]

tasks:
Expand All @@ -17,4 +18,5 @@ bcr_test_module:
- '@com_google_protobuf//:protobuf_java'
- '@com_google_protobuf//:protoc'
- '@com_google_protobuf//:test_messages_proto2_cc_proto'
- '@com_google_protobuf//:test_messages_proto3_cc_proto'
- '@com_google_protobuf//:test_messages_proto3_cc_proto'
# LINT.ThenChange(<ROOT_DIR>/.bazelci/presubmit.yml)

0 comments on commit 0d7ebb7

Please sign in to comment.