forked from xi-editor/xi-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (44 loc) · 1.28 KB
/
.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: rust
osx_image: xcode9.2
rust:
- stable
- nightly
os:
- linux
- osx
- windows
addons:
apt:
packages:
- libssl-dev
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
before_cache: |
if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_RUST_VERSION" == nightly ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f
fi
# 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" = 'stable' ]; then cargo fmt --all -- --check; fi
- if [ "$TRAVIS_RUST_VERSION" = 'stable' ]; then cargo clippy --all -- -D warnings; fi
after_success: |
if [[ "$TRAVIS_OS_NAME" == linux && "$TRAVIS_RUST_VERSION" == nightly ]]; then
cd ..
cargo tarpaulin -r rust -v --all --out Xml
bash <(curl -s https://codecov.io/bash)
fi