forked from xi-editor/xi-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (30 loc) · 870 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
language: rust
osx_image: xcode9.2
rust:
- 1.29.2
- nightly
os:
- linux
- osx
- windows
matrix:
allow_failures:
- rust: nightly
- os: windows
# on windows, rustup installs the msvc toolchain by default so we need link.exe
before_script:
- if [ "$TRAVIS_OS_NAME" = 'windows' ]; then choco install windows-sdk-10.0; fi
- rustup component add rustfmt-preview
- rustup component add clippy-preview
# windows builds run in git bash so these (should) Just Work
cache:
directories:
- $HOME/.cargo
script:
- cd rust
- export CARGO_TARGET_DIR=/tmp/target
- export RUST_BACKTRACE=1
- RUSTFLAGS="-D warnings" cargo check --all || exit
- cargo test --all || exit
- if [ "$TRAVIS_RUST_VERSION" = '1.29.2' ]; then cargo fmt --all -- --check; fi
- if [ "$TRAVIS_RUST_VERSION" = '1.29.2' ]; then cargo clippy --all -- -D warnings; fi