mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-25 09:46:49 +00:00
Make Travis cfg pretty and modular (#118)
This commit is contained in:
parent
bff10fe83b
commit
dde4b89369
1 changed files with 29 additions and 11 deletions
40
.travis.yml
40
.travis.yml
|
@ -1,26 +1,44 @@
|
|||
language: rust
|
||||
|
||||
env: RUSTFLAGS="-D warnings"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- rust: nightly
|
||||
os: linux
|
||||
env: RUSTFLAGS="-D warnings" BUILD_DOCS=1 BUILD_BOOK=1
|
||||
|
||||
- rust: nightly
|
||||
os: osx
|
||||
osx_image: xcode9.2
|
||||
env: RUSTFLAGS="-D warnings" BUILD_DOCS=1
|
||||
|
||||
- rust: nightly-x86_64-pc-windows-msvc
|
||||
os: windows
|
||||
env: RUSTFLAGS="-D warnings"
|
||||
|
||||
before_script:
|
||||
- rustup component add rustfmt
|
||||
- if [[ -n "$BUILD_BOOK" ]]; then (test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh); fi
|
||||
- name: fmt
|
||||
rust: nightly
|
||||
os: linux
|
||||
before_script:
|
||||
- rustup component add rustfmt
|
||||
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:
|
||||
- if ! [[ -n "$BUILD_BOOK" ]]; then cargo check --features unstable --all --benches --bins --examples --tests && cargo test --features unstable --all; fi
|
||||
- if [[ -n "$BUILD_BOOK" ]]; then cargo test --features unstable --all --benches --bins --examples --tests; fi
|
||||
- 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
|
||||
- cargo check --features unstable --all --benches --bins --examples --tests
|
||||
- cargo test --features unstable --all
|
||||
|
|
Loading…
Reference in a new issue