forked from mirror/async-std
commit
d89b384620
@ -1,30 +1,26 @@
|
|||||||
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: BUILD_DOCS=1 BUILD_BOOK=1
|
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: BUILD_DOCS=1
|
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:
|
before_script:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
- if [[ -n "$BUILD_BOOK" ]]; then (test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh); fi
|
||||||
- (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.3" mdbook)
|
|
||||||
- cargo install-update -a
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if ![[ -n "$BUILD_BOOK" ]]; then cargo check --all --benches --bins --examples --tests && cargo test --all; fi
|
- if ! [[ -n "$BUILD_BOOK" ]]; then cargo check --all --benches --bins --examples --tests && cargo test --all; fi
|
||||||
- if [[ -n "$BUILD_BOOK" ]]; then cargo test --all --benches --bins --examples --tests; fi
|
- if [[ -n "$BUILD_BOOK" ]]; then cargo test --all --benches --bins --examples --tests; fi
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
- if [[ -n "$BUILD_DOCS" ]]; then cargo doc --features docs; fi
|
- 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
|
- if [[ -n "$BUILD_BOOK" ]]; then mdbook build docs && mdbook test -L ./target/debug/deps docs; fi
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# Based on the Rust-Embedded WG's book CI
|
||||||
|
# https://github.com/rust-embedded/book/blob/master/ci/install.sh
|
||||||
|
|
||||||
|
main() {
|
||||||
|
# Note - this will only accept releases tagged with v0.3.x
|
||||||
|
local tag=$(git ls-remote --tags --refs --exit-code \
|
||||||
|
https://github.com/rust-lang-nursery/mdbook \
|
||||||
|
| cut -d/ -f3 \
|
||||||
|
| grep -E '^v0\.3\.[0-9]+$' \
|
||||||
|
| sort \
|
||||||
|
| tail -n1)
|
||||||
|
|
||||||
|
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
||||||
|
sh -s -- --git rust-lang-nursery/mdbook --tag $tag
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
Loading…
Reference in New Issue