Merge rust-bitcoin/rust-bitcoin#1505: Improve test coverage for docs build
41f2dcf6ae
Improve test coverage for docs build (Tobin C. Harding)b4c14a4b7c
hashes: Use automatic link (Tobin C. Harding)96e8a080d1
ci: Remove redundant || exit (Tobin C. Harding) Pull request description: Currently the docs build commands in `hashes` and `bitcoin` differ, they should be the same. Add a command `cargo doc` to improve coverage e.g., recently we botched the feature guarding but since CI only runs `cargo rustdoc` with custom compiler conditional set we didn't catch it. Done after seeing: https://github.com/rust-bitcoin/rust-bitcoin/pull/1504 and CI should fail on this PR until 1504 is in. ACKs for top commit: apoelstra: ACK41f2dcf6ae
Kixunil: ACK41f2dcf6ae
Tree-SHA512: 7cde68292cfc6f32b75d066e188e7c418ee251f9a5abc57fbd642ba33e9cd5bd8ef7c5ba7cffd206acae6ddec2f8c3db38c8c911a4319e979158666b8225953d
This commit is contained in:
commit
9615dd12b8
|
@ -20,6 +20,7 @@ jobs:
|
|||
DO_LINT: true
|
||||
AS_DEPENDENCY: false
|
||||
DO_NO_STD: true
|
||||
DO_DOCS: true
|
||||
DO_FEATURE_MATRIX: true
|
||||
DO_SCHEMARS_TESTS: true # Currently only used in hashes crate.
|
||||
run: ./contrib/test.sh
|
||||
|
@ -55,7 +56,7 @@ jobs:
|
|||
DO_BENCH: true
|
||||
AS_DEPENDENCY: false
|
||||
DO_NO_STD: true
|
||||
DO_DOCS: true
|
||||
DO_DOCSRS: true
|
||||
run: ./contrib/test.sh
|
||||
|
||||
MSRV:
|
||||
|
|
|
@ -80,8 +80,14 @@ cargo run --example ecdsa-psbt --features=bitcoinconsensus
|
|||
cargo run --example taproot-psbt --features=rand-std,bitcoinconsensus
|
||||
|
||||
# Build the docs if told to (this only works with the nightly toolchain)
|
||||
if [ "$DO_DOCSRS" = true ]; then
|
||||
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +nightly doc --all-features
|
||||
fi
|
||||
|
||||
# Build the docs with a stable toolchain, in unison with the DO_DOCSRS command
|
||||
# above this checks that we feature guarded docs imports correctly.
|
||||
if [ "$DO_DOCS" = true ]; then
|
||||
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly rustdoc --all-features -- -D rustdoc::broken-intra-doc-links -D warnings || exit 1
|
||||
RUSTDOCFLAGS="-D warnings" cargo +stable doc --all-features
|
||||
fi
|
||||
|
||||
# Fuzz if told to
|
||||
|
|
|
@ -57,8 +57,14 @@ if [ "$DO_SCHEMARS_TESTS" = true ]; then
|
|||
fi
|
||||
|
||||
# Build the docs if told to (this only works with the nightly toolchain)
|
||||
if [ "$DO_DOCSRS" = true ]; then
|
||||
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +nightly doc --all-features
|
||||
fi
|
||||
|
||||
# Build the docs with a stable toolchain, in unison with the DO_DOCSRS command
|
||||
# above this checks that we feature guarded docs imports correctly.
|
||||
if [ "$DO_DOCS" = true ]; then
|
||||
RUSTDOCFLAGS="--cfg docsrs" cargo doc --features="$FEATURES"
|
||||
RUSTDOCFLAGS="-D warnings" cargo +stable doc --all-features
|
||||
fi
|
||||
|
||||
# Webassembly stuff
|
||||
|
|
Loading…
Reference in New Issue