Skip to content

Pretty Travis cfg #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
2 commits merged into from
Sep 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 29 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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