Skip to content

Commit

Permalink
Add doc rules
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliddell committed Nov 20, 2023
1 parent 8214f89 commit 563df6e
Show file tree
Hide file tree
Showing 37 changed files with 1,136 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,32 @@ tasks:
- make cpp_cpp_proto_library_example
- make cpp_cpp_grpc_library_example

doc_ubuntu2204_examples:
name: doc examples
platform: ubuntu2204
environment:
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17"
shell_commands:
- set -x
- make doc_doc_docbook_compile_example
- make doc_doc_html_compile_example
- make doc_doc_json_compile_example
- make doc_doc_markdown_compile_example
- make doc_doc_template_compile_example

doc_macos_examples:
name: doc examples
platform: macos
environment:
BAZEL_EXTRA_FLAGS: "--cxxopt=-std=c++17 --host_cxxopt=-std=c++17"
shell_commands:
- set -x
- make doc_doc_docbook_compile_example
- make doc_doc_html_compile_example
- make doc_doc_json_compile_example
- make doc_doc_markdown_compile_example
- make doc_doc_template_compile_example

go_ubuntu2204_examples:
name: go examples
platform: ubuntu2204
Expand Down
6 changes: 6 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ examples/cpp/cpp_grpc_compile
examples/cpp/cpp_proto_library
examples/cpp/cpp_grpc_library

examples/doc/doc_docbook_compile
examples/doc/doc_html_compile
examples/doc/doc_json_compile
examples/doc/doc_markdown_compile
examples/doc/doc_template_compile

examples/go/go_proto_compile
examples/go/go_grpc_compile
examples/go/go_proto_library
Expand Down
7 changes: 7 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ local_path_override(
path = "modules/cpp",
)

# Documentation
bazel_dep(name = "rules_proto_grpc_doc", version = "0.0.0.rpg.version.placeholder")
local_path_override(
module_name = "rules_proto_grpc_doc",
path = "modules/doc",
)

# Go
bazel_dep(name = "rules_proto_grpc_go", version = "0.0.0.rpg.version.placeholder")
local_path_override(
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ Full documentation for the current and previous versions [can be found here](htt
| [C++](https://rules-proto-grpc.com/en/latest/lang/cpp.html) | [cpp_grpc_compile](https://rules-proto-grpc.com/en/latest/lang/cpp.html#cpp-grpc-compile) | Generates C++ protobuf and gRPC ``.h`` & ``.cc`` files ([example](/examples/cpp/cpp_grpc_compile)) |
| [C++](https://rules-proto-grpc.com/en/latest/lang/cpp.html) | [cpp_proto_library](https://rules-proto-grpc.com/en/latest/lang/cpp.html#cpp-proto-library) | Generates a C++ protobuf library using ``cc_library``, with dependencies linked ([example](/examples/cpp/cpp_proto_library)) |
| [C++](https://rules-proto-grpc.com/en/latest/lang/cpp.html) | [cpp_grpc_library](https://rules-proto-grpc.com/en/latest/lang/cpp.html#cpp-grpc-library) | Generates a C++ protobuf and gRPC library using ``cc_library``, with dependencies linked ([example](/examples/cpp/cpp_grpc_library)) |
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_docbook_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-docbook-compile) | Generates DocBook ``.xml`` documentation file ([example](/examples/doc/doc_docbook_compile)) |
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_html_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-html-compile) | Generates ``.html`` documentation file ([example](/examples/doc/doc_html_compile)) |
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_json_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-json-compile) | Generates ``.json`` documentation file ([example](/examples/doc/doc_json_compile)) |
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_markdown_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-markdown-compile) | Generates Markdown ``.md`` documentation file ([example](/examples/doc/doc_markdown_compile)) |
| [Documentation](https://rules-proto-grpc.com/en/latest/lang/doc.html) | [doc_template_compile](https://rules-proto-grpc.com/en/latest/lang/doc.html#doc-template-compile) | Generates documentation file using Go template file ([example](/examples/doc/doc_template_compile)) |
| [Go](https://rules-proto-grpc.com/en/latest/lang/go.html) | [go_proto_compile](https://rules-proto-grpc.com/en/latest/lang/go.html#go-proto-compile) | Generates Go protobuf ``.go`` files ([example](/examples/go/go_proto_compile)) |
| [Go](https://rules-proto-grpc.com/en/latest/lang/go.html) | [go_grpc_compile](https://rules-proto-grpc.com/en/latest/lang/go.html#go-grpc-compile) | Generates Go protobuf and gRPC ``.go`` files ([example](/examples/go/go_grpc_compile)) |
| [Go](https://rules-proto-grpc.com/en/latest/lang/go.html) | [go_proto_library](https://rules-proto-grpc.com/en/latest/lang/go.html#go-proto-library) | Generates a Go protobuf library using ``go_library`` from ``rules_go`` ([example](/examples/go/go_proto_library)) |
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Supported Languages and Tools

lang/c
lang/cpp
lang/doc
lang/go
lang/grpc_gateway
lang/python
Loading

0 comments on commit 563df6e

Please sign in to comment.