Skip to content

Commit

Permalink
Amend release workflow now we have bzlmod in the mix (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c authored Apr 14, 2023
1 parent 226d1a1 commit 4359934
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ jobs:
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test --config=jdk11 //... -- -//docs/... -//tools:update-docs
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test --config=jdk11 //...

- name: bazel test //... (Java 17)
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //... -- -//docs/... -//tools:update-docs
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //...

- name: bazel test //... (no bzlmod)
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
# The docs targets are tagged as `manual` to prevent stardoc from running with bzlmod
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test --noenable_bzlmod //... //docs:all
8 changes: 8 additions & 0 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ stardoc(
name = "java-docs",
out = "java-docs.md",
input = "stardoc-input.bzl",
tags = [
# Stardoc doesn't work with bzlmod
"manual",
],
deps = [
"//java:defs",
],
Expand All @@ -19,6 +23,10 @@ genrule(
],
outs = ["README.md"],
cmd = """cat $(location preamble.md) $(location :java-docs) $(location postfix.md) >$@""",
tags = [
# Stardoc doesn't work with bzlmod
"manual",
],
visibility = ["//tools:__pkg__"],
)

Expand Down
8 changes: 8 additions & 0 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ def contrib_rules_jvm_deps():
url = "https://github.com/bazelbuild/bazel-skylib/archive/1.3.0.tar.gz",
)

maybe(
http_archive,
name = "bazel_skylib_gazelle_plugin",
sha256 = "3b620033ca48fcd6f5ef2ac85e0f6ec5639605fa2f627968490e52fc91a9932f",
strip_prefix = "bazel-skylib-1.3.0/gazelle",
url = "https://github.com/bazelbuild/bazel-skylib/archive/1.3.0.tar.gz",
)

maybe(
http_archive,
name = "com_google_protobuf",
Expand Down
4 changes: 4 additions & 0 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@ sh_binary(
data = [
"//docs:readme",
],
tags = [
# Stardoc does not play nicely with bzlmod
"manual",
],
)

0 comments on commit 4359934

Please sign in to comment.