Check documentation of all crates in `make docs`
This commit is contained in:
parent
046c9f6a94
commit
e067b924ca
|
|
@ -25,10 +25,13 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check API docs
|
||||
- name: Check API docs of crates to publish
|
||||
if: github.event_name == 'pull_request'
|
||||
run: ./tools/github_workflows/publish_api_docs.sh --dry-run
|
||||
|
||||
- name: Check API docs of all crates
|
||||
run: make docs
|
||||
|
||||
- name: Build & Upload Nightly API Docs
|
||||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||
env:
|
||||
|
|
|
|||
11
Makefile
11
Makefile
|
|
@ -403,10 +403,17 @@ ktest: initramfs $(CARGO_OSDK)
|
|||
.PHONY: docs
|
||||
docs: $(CARGO_OSDK)
|
||||
@for dir in $(NON_OSDK_CRATES); do \
|
||||
(cd $$dir && cargo doc --no-deps) || exit 1; \
|
||||
(cd $$dir && RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps) || exit 1; \
|
||||
done
|
||||
@for dir in $(OSDK_CRATES); do \
|
||||
(cd $$dir && cargo osdk doc --no-deps) || exit 1; \
|
||||
EXTRA_DOC_FLAGS=""; \
|
||||
# The kernel crate is primarily composed of private items. \
|
||||
# We include the --document-private-items flag \
|
||||
# to ensure documentation of the internal items is fully checked. \
|
||||
if [ "$$dir" = "kernel" ]; then \
|
||||
EXTRA_DOC_FLAGS="--document-private-items -Arustdoc::private_intra_doc_links"; \
|
||||
fi; \
|
||||
(cd $$dir && RUSTDOCFLAGS="-Dwarnings $$EXTRA_DOC_FLAGS" cargo osdk doc --no-deps) || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: book
|
||||
|
|
|
|||
Loading…
Reference in New Issue