Skip to content

Commit 7727244

Browse files
authored
refactor: don't build protoc in docs either, it's the slowest CI step (#796)
1 parent 48a3e65 commit 7727244

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

docs/.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Never Compile protoc Again
2+
# Don't build protoc from the cc_binary, it's slow and spammy when cache miss
3+
common --per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
4+
common --host_per_file_copt=external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT
5+
common --java_runtime_version=remotejdk_11

docs/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,28 @@
22
# so that the dependency on stardoc doesn't leak to them.
33
load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs")
44

5+
java_binary(
6+
name = "renderer",
7+
main_class = "com/google/devtools/build/stardoc/renderer/RendererMain",
8+
runtime_deps = ["@stardoc-prebuilt//jar"],
9+
)
10+
511
stardoc_with_diff_test(
612
name = "rules",
713
bzl_library_target = "@aspect_rules_ts//ts:defs",
14+
renderer = "renderer",
815
)
916

1017
stardoc_with_diff_test(
1118
name = "proto",
1219
bzl_library_target = "@aspect_rules_ts//ts:proto",
20+
renderer = "renderer",
1321
)
1422

1523
stardoc_with_diff_test(
1624
name = "repositories",
1725
bzl_library_target = "@aspect_rules_ts//ts:repositories",
26+
renderer = "renderer",
1827
symbol_names = ["rules_ts_dependencies"],
1928
)
2029

docs/MODULE.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ local_path_override(
66
module_name = "aspect_rules_ts",
77
path = "..",
88
)
9+
10+
http_jar = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_jar")
11+
12+
http_jar(
13+
name = "stardoc-prebuilt",
14+
integrity = "sha256-jDi5ITmziwwiHCsfd8v0UOoraWXIAfICIll+wbpg/vE=",
15+
urls = ["https://github.com/alexeagle/stardoc-prebuilt/releases/download/v0.7.1/renderer_deploy.jar"],
16+
)

0 commit comments

Comments
 (0)