Build documentation with private items in cranelift-codegen/meta

This commit is contained in:
Andrew Brown
2019-10-31 08:50:53 -07:00
parent 96f5a6b561
commit 8307ad3f3b
2 changed files with 7 additions and 3 deletions

View File

@@ -33,7 +33,9 @@ jobs:
- checkout: self - checkout: self
submodules: true submodules: true
- template: ci/azure-install-rust.yml - template: ci/azure-install-rust.yml
- script: cargo doc - script: |
cargo doc --all --exclude cranelift-codegen-meta
cargo doc --package cranelift-codegen-meta --document-private-items
displayName: Build documentation displayName: Build documentation
- script: cargo install cargo-deadlinks - script: cargo install cargo-deadlinks
displayName: Install cargo-deadlinks displayName: Install cargo-deadlinks

View File

@@ -69,14 +69,16 @@ ensure_installed() {
# Make sure the documentation builds. # Make sure the documentation builds.
banner "Rust documentation: $topdir/target/doc/cranelift/index.html" banner "Rust documentation: $topdir/target/doc/cranelift/index.html"
if has_toolchain nightly; then if has_toolchain nightly; then
cargo +nightly doc cargo +nightly doc --all --exclude cranelift-codegen-meta
cargo +nightly doc --package cranelift-codegen-meta --document-private-items
# Make sure the documentation doesn't have broken links. # Make sure the documentation doesn't have broken links.
banner "Rust documentation link test" banner "Rust documentation link test"
ensure_installed cargo-deadlinks ensure_installed cargo-deadlinks
find ./target/doc -maxdepth 1 -type d -name "cranelift*" | xargs -I{} cargo deadlinks --dir {} find ./target/doc -maxdepth 1 -type d -name "cranelift*" | xargs -I{} cargo deadlinks --dir {}
else else
cargo doc cargo doc --all --exclude cranelift-codegen-meta
cargo doc --package cranelift-codegen-meta --document-private-items
echo "nightly toolchain not found, some documentation links will not work" echo "nightly toolchain not found, some documentation links will not work"
fi fi