Skip to content

Commit a25a42b

Browse files
committed
Speed up documentation build by using cargo when possible
1 parent 575fdc8 commit a25a42b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

ci/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ test_target() {
3232
n=0
3333
until [ $n -ge $N ]
3434
do
35-
rustup target add "${TARGET}" --toolchain "${RUST}" && break
35+
if rustup target add "${TARGET}" --toolchain "${RUST}" ; then
36+
break
37+
fi
3638
n=$((n+1))
3739
sleep 1
3840
done

ci/dox.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@ while read -r target; do
3838
esac
3939

4040
rustup target add "${target}" || true
41-
xargo doc --target "${target}" \
42-
--no-default-features --features extra_traits
41+
42+
# If cargo doc fails, then try xargo:
43+
if ! cargo doc --target "${target}" \
44+
--no-default-features --features extra_traits ; then
45+
xargo doc --target "${target}" \
46+
--no-default-features --features extra_traits
47+
fi
4348

4449
cp -r "target/${target}/doc" "${TARGET_DOC_DIR}/${target}"
4550

0 commit comments

Comments
 (0)