Refactor travis.yml
This commit is contained in:
parent
08c91f0998
commit
a82f03eace
13
.travis.yml
13
.travis.yml
|
@ -3,6 +3,9 @@ sudo: required
|
||||||
language:
|
language:
|
||||||
- rust
|
- rust
|
||||||
- cpp
|
- cpp
|
||||||
|
rust:
|
||||||
|
- nightly
|
||||||
|
- stable
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -12,18 +15,16 @@ addons:
|
||||||
- g++-6
|
- g++-6
|
||||||
- cmake
|
- cmake
|
||||||
env:
|
env:
|
||||||
- NIGHTLY_TOOLCHAIN=nightly-2018-02-05
|
- CC=/usr/bin/gcc-6 CXX=/usr/bin/g++-6
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install `cargo-deadlinks` unless it is currently installed.
|
# Install `cargo-deadlinks` unless it is currently installed.
|
||||||
- command -v cargo-deadlinks &> /dev/null || cargo install cargo-deadlinks
|
- command -v cargo-deadlinks &> /dev/null || cargo install cargo-deadlinks
|
||||||
# Install nightly toolchain.
|
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then rustup target add wasm32-unknown-unknown; fi
|
||||||
- rustup toolchain install $NIGHTLY_TOOLCHAIN
|
|
||||||
script:
|
script:
|
||||||
- export CC=/usr/bin/gcc-6
|
|
||||||
- export CXX=/usr/bin/g++-6
|
|
||||||
# Make sure fuzz targets are not broken.
|
# 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
|
- ./test.sh
|
||||||
- ./doc.sh
|
- ./doc.sh
|
||||||
after_success: |
|
after_success: |
|
||||||
|
|
4
doc.sh
4
doc.sh
|
@ -4,11 +4,7 @@ set -eux
|
||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
if [ -s NIGHTLY_TOOLCHAIN ]; then
|
|
||||||
rustup run $NIGHTLY_TOOLCHAIN cargo doc
|
|
||||||
else
|
|
||||||
cargo doc
|
cargo doc
|
||||||
fi;
|
|
||||||
|
|
||||||
# cargo-deadlinks will check any links in docs generated by `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.
|
# This is useful as rustdoc uses raw links which are error prone.
|
||||||
|
|
Loading…
Reference in New Issue