Add handy scripts (#30)
* Extract test.sh and doc.sh from .travis.yml * check.sh
This commit is contained in:
parent
551c992730
commit
3ad9f07e93
|
@ -17,16 +17,12 @@ install:
|
||||||
script:
|
script:
|
||||||
- export CC=/usr/bin/gcc-6
|
- export CC=/usr/bin/gcc-6
|
||||||
- export CXX=/usr/bin/g++-6
|
- export CXX=/usr/bin/g++-6
|
||||||
- cargo test --verbose
|
- ./test.sh
|
||||||
- cargo test --manifest-path=spec/Cargo.toml
|
- ./doc.sh
|
||||||
# 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
|
|
||||||
after_success: |
|
after_success: |
|
||||||
# Build documentation and deploy it to github pages.
|
# Build documentation and deploy it to github pages.
|
||||||
[ $TRAVIS_BRANCH = master ] &&
|
[ $TRAVIS_BRANCH = master ] &&
|
||||||
[ $TRAVIS_PULL_REQUEST = false ] &&
|
[ $TRAVIS_PULL_REQUEST = false ] &&
|
||||||
cargo doc &&
|
|
||||||
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
|
echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
|
||||||
sudo pip install ghp-import &&
|
sudo pip install ghp-import &&
|
||||||
ghp-import -n target/doc &&
|
ghp-import -n target/doc &&
|
||||||
|
|
|
@ -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 -
|
|
@ -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 -
|
Loading…
Reference in New Issue