forked from mirror/async-std
Make Travis cfg pretty and modular (#118)
parent
bff10fe83b
commit
dde4b89369
@ -1,26 +1,44 @@
|
|||||||
language: rust
|
language: rust
|
||||||
|
|
||||||
|
env: RUSTFLAGS="-D warnings"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
os: linux
|
os: linux
|
||||||
env: RUSTFLAGS="-D warnings" BUILD_DOCS=1 BUILD_BOOK=1
|
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode9.2
|
osx_image: xcode9.2
|
||||||
env: RUSTFLAGS="-D warnings" BUILD_DOCS=1
|
|
||||||
- rust: nightly-x86_64-pc-windows-msvc
|
- rust: nightly-x86_64-pc-windows-msvc
|
||||||
os: windows
|
os: windows
|
||||||
env: RUSTFLAGS="-D warnings"
|
|
||||||
|
|
||||||
before_script:
|
- name: fmt
|
||||||
|
rust: nightly
|
||||||
|
os: linux
|
||||||
|
before_script:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- if [[ -n "$BUILD_BOOK" ]]; then (test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh); fi
|
script:
|
||||||
|
- cargo fmt --all -- --check
|
||||||
|
|
||||||
|
- name: docs
|
||||||
|
rust: nightly
|
||||||
|
os: linux
|
||||||
|
script:
|
||||||
|
- cargo doc --features docs
|
||||||
|
|
||||||
|
- name: book
|
||||||
|
rust: nightly
|
||||||
|
os: linux
|
||||||
|
before_script:
|
||||||
|
- test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh
|
||||||
|
- cargo build # to find 'extern crate async_std' by `mdbook test`
|
||||||
|
script:
|
||||||
|
- mdbook build docs
|
||||||
|
- mdbook test -L ./target/debug/deps docs
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if ! [[ -n "$BUILD_BOOK" ]]; then cargo check --features unstable --all --benches --bins --examples --tests && cargo test --features unstable --all; fi
|
- cargo check --features unstable --all --benches --bins --examples --tests
|
||||||
- if [[ -n "$BUILD_BOOK" ]]; then cargo test --features unstable --all --benches --bins --examples --tests; fi
|
- cargo test --features unstable --all
|
||||||
- cargo fmt --all -- --check
|
|
||||||
- if [[ -n "$BUILD_DOCS" ]]; then cargo doc --features docs; fi
|
|
||||||
- if [[ -n "$BUILD_BOOK" ]]; then mdbook build docs && mdbook test -L ./target/debug/deps docs; fi
|
|
||||||
|
Loading…
Reference in New Issue