diff --git a/.travis.yml b/.travis.yml index f4761da..ba7e83b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,16 +17,12 @@ install: script: - export CC=/usr/bin/gcc-6 - export CXX=/usr/bin/g++-6 -- cargo test --verbose -- cargo test --manifest-path=spec/Cargo.toml -# cargo-deadlinks will check any links in docs generated by `cargo doc`. -# This is useful as rustdoc uses raw links which is error prone. -- cargo doc && cargo deadlinks +- ./test.sh +- ./doc.sh after_success: | # Build documentation and deploy it to github pages. [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && - cargo doc && echo "" > target/doc/index.html && sudo pip install ghp-import && ghp-import -n target/doc && diff --git a/check.sh b/check.sh new file mode 100755 index 0000000..6d29690 --- /dev/null +++ b/check.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -eux + +cd $(dirname $0) + +cargo check --tests +cargo check \ + --manifest-path=spec/Cargo.toml \ + --tests + +cd - diff --git a/doc.sh b/doc.sh new file mode 100755 index 0000000..652db79 --- /dev/null +++ b/doc.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -eux + +cd $(dirname $0) + +cargo doc + +# cargo-deadlinks will check any links in docs generated by `cargo doc`. +# This is useful as rustdoc uses raw links which are error prone. +command -v cargo-deadlinks &> /dev/null && + cargo deadlinks + +cd - diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..caad167 --- /dev/null +++ b/test.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -eux + +cd $(dirname $0) + +time cargo test +time cargo test --manifest-path=spec/Cargo.toml + +cd -