mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fix rust-docs in CI.
This commit is contained in:
parent
f79fe537ba
commit
d1cbba6e91
@ -5,7 +5,7 @@ steps:
|
|||||||
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
|
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
|
||||||
rustup update --no-self-update $TOOLCHAIN
|
rustup update --no-self-update $TOOLCHAIN
|
||||||
if [[ "$TOOLCHAIN" == "nightly"* ]]; then
|
if [[ "$TOOLCHAIN" == "nightly"* ]]; then
|
||||||
rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview
|
rustup component add --toolchain=$TOOLCHAIN rustc-dev llvm-tools-preview rust-docs
|
||||||
fi
|
fi
|
||||||
rustup default $TOOLCHAIN
|
rustup default $TOOLCHAIN
|
||||||
displayName: Install rust
|
displayName: Install rust
|
||||||
|
@ -78,10 +78,12 @@ fn std_docs() {
|
|||||||
// --extern-html-root-url is unstable
|
// --extern-html-root-url is unstable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if !cargo::util::is_ci() {
|
// For local developers, skip this test if docs aren't installed.
|
||||||
// For local developers, skip this test if docs aren't installed.
|
let docs = std::path::Path::new(&paths::sysroot()).join("share/doc/rust/html");
|
||||||
let docs = std::path::Path::new(&paths::sysroot()).join("share/doc/rust/html");
|
if !docs.exists() {
|
||||||
if !docs.exists() {
|
if cargo::util::is_ci() {
|
||||||
|
panic!("std docs are not installed, check that the rust-docs component is installed");
|
||||||
|
} else {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"documentation not found at {}, \
|
"documentation not found at {}, \
|
||||||
skipping test (run `rustdoc component add rust-docs` to install",
|
skipping test (run `rustdoc component add rust-docs` to install",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user