Skip to content

Commit

Permalink
Add and fix Bazel tests
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 636456617
  • Loading branch information
frigus02 authored and copybara-github committed May 23, 2024
1 parent 3b2aeda commit ed7672b
Showing 3 changed files with 14 additions and 84 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
@@ -12,9 +12,8 @@ concurrency:
cancel-in-progress: true

jobs:
build:
cmake:
runs-on: ubuntu-22.04
name: ubuntu-build
steps:
- name: Show env
run: env
@@ -46,3 +45,15 @@ jobs:
shell: bash
run: |
cmake --build build -j$(nproc)
bazel:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: bazel-contrib/[email protected]
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- run: BAZEL_CXXOPTS="-std=c++17" bazel test //...
- run: BAZEL_CXXOPTS="-std=c++20" bazel test //...
31 changes: 1 addition & 30 deletions pybind11_protobuf/tests/BUILD
Original file line number Diff line number Diff line change
@@ -109,11 +109,6 @@ cc_proto_library(
deps = [":we-love-dashes_proto"],
)

py_proto_library(
name = "we-love-dashes_py_pb2",
deps = [":we-love-dashes_proto"],
)

# Tests for enum_type_caster

pybind_extension(
@@ -371,32 +366,8 @@ pybind_extension(
py_test(
name = "we_love_dashes_cc_only_test",
srcs = ["we_love_dashes_cc_only_test.py"],
data = [":we_love_dashes_cc_only_module.so"],
deps = [
":we_love_dashes_cc_only_module",
"@com_google_absl_py//absl/testing:absltest",
"@com_google_protobuf//:protobuf_python",
requirement("absl_py"),
],
)

py_test(
name = "we_love_dashes_cc_and_py_in_deps_test",
srcs = ["we_love_dashes_cc_and_py_in_deps_test.py"],
deps = [
":we_love_dashes_cc_only_module",
":we-love-dashes_py_pb2",
"@com_google_absl_py//absl/testing:absltest",
"@com_google_protobuf//:protobuf_python",
requirement("absl_py"),
],
)

py_test(
name = "we_love_dashes_py_only_test",
srcs = ["we_love_dashes_py_only_test.py"],
deps = [
":pass_proto2_message_module",
":we-love-dashes_py_pb2",
"@com_google_absl_py//absl/testing:absltest",
"@com_google_protobuf//:protobuf_python",
requirement("absl_py"),
52 changes: 0 additions & 52 deletions scripts/build_and_run_tests.sh

This file was deleted.

0 comments on commit ed7672b

Please sign in to comment.