Refactor travis.yml

This commit is contained in:
Sergey Pepyakin 2018-05-23 17:27:15 +03:00
parent 08c91f0998
commit a82f03eace
2 changed files with 8 additions and 11 deletions

View File

@ -3,6 +3,9 @@ sudo: required
language:
- rust
- cpp
rust:
- nightly
- stable
addons:
apt:
sources:
@ -12,18 +15,16 @@ addons:
- g++-6
- cmake
env:
- NIGHTLY_TOOLCHAIN=nightly-2018-02-05
- CC=/usr/bin/gcc-6 CXX=/usr/bin/g++-6
install:
# Install `cargo-deadlinks` unless it is currently installed.
- command -v cargo-deadlinks &> /dev/null || cargo install cargo-deadlinks
# Install nightly toolchain.
- rustup toolchain install $NIGHTLY_TOOLCHAIN
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then rustup target add wasm32-unknown-unknown; fi
script:
- export CC=/usr/bin/gcc-6
- export CXX=/usr/bin/g++-6
# Make sure fuzz targets are not broken.
- rustup run $NIGHTLY_TOOLCHAIN cargo check --tests --manifest-path=fuzz/Cargo.toml
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo check --tests --manifest-path=fuzz/Cargo.toml; fi
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo check --benches --manifest-path=benches/Cargo.toml; fi
- ./test.sh
- ./doc.sh
after_success: |

6
doc.sh
View File

@ -4,11 +4,7 @@ set -eux
cd $(dirname $0)
if [ -s NIGHTLY_TOOLCHAIN ]; then
rustup run $NIGHTLY_TOOLCHAIN cargo doc
else
cargo doc
fi;
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.