Fail CI if docs build throws warnings

Convert all rustdocs build warnings to errors using `-D warnings` and
exit the script with 1 to signal the error.

While we are at it use `--all-features` instead of explicit feature list
when building docs. Without this the docs build fails with:

  error: too many file operands
This commit is contained in:
Tobin C. Harding 2022-11-21 09:28:20 +11:00
parent b014f0fdcb
commit 108a1f73ca
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ cargo run --example taproot-psbt --features=bitcoinconsensus
# Build the docs if told to (this only works with the nightly toolchain) # Build the docs if told to (this only works with the nightly toolchain)
if [ "$DO_DOCS" = true ]; then if [ "$DO_DOCS" = true ]; then
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --features="$FEATURES" -- -D rustdoc::broken-intra-doc-links RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --all-features -- -D rustdoc::broken-intra-doc-links -D warnings || exit 1
fi fi
# Fuzz if told to # Fuzz if told to