Skip to content

Commit b0cc566

Browse files
committed
Build mdbook in CI.
Previously mistakes here wouldn't stop a PR. Oops! [I've borrowed the "build in the background" trick from yk. It helps CI time a bit.]
1 parent e5dbd23 commit b0cc566

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.buildbot.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ cargo fmt --all -- --check
3535
rustup toolchain install stable
3636
rustup default stable
3737

38+
# Later on we are going to need to install cargo-deny and mdbook. We kick the
39+
# install jobs off now so that at least some work (e.g. downloading crates) can
40+
# happen in parallel, speeding up the overall process.
41+
42+
cargo_deny_mdbook_tmp=$(mktemp)
43+
( cargo install --locked cargo-deny ; cargo install --locked mdbook ) \
44+
>"${cargo_deny_mdbook_tmp}" 2>&1 &
45+
cargo_deny_mdbook_pid=$!
46+
3847
cargo test
3948
cargo test --release
4049

@@ -89,7 +98,12 @@ cd $root
8998

9099
RUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps
91100

92-
which cargo-deny | cargo install cargo-deny || true
93-
if [ "X`which cargo-deny`" != "X" ]; then
94-
cargo-deny check license
95-
fi
101+
# Check licenses.
102+
wait "${cargo_deny_mdbook_pid}" || ( cat "${cargo_deny_mdbook_tmp}" && exit 1 )
103+
cargo-deny check license
104+
105+
# Build the docs
106+
cd $root/doc
107+
mdbook build
108+
test -d book
109+
cd ..

0 commit comments

Comments
 (0)