forked from mozilla/webrtc-sdp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
72 lines (65 loc) · 1.56 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: rust
cache: cargo
sudo: required
dist: trusty
os:
- linux
- osx
env:
- FEATURES=""
- FEATURES="serialize"
rust:
- nightly
- beta
- stable
# minimum stable version
- 1.35.0
matrix:
allow_failures:
- rust: nightly
addons:
apt:
packages:
- libcurl4-openssl-dev
- zlib1g-dev
- libiberty-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libssl-dev
# Add tarpaulin
before_cache: |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" && "$FEATURES" == "serialize" ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f
fi
# Add clippy
before_script:
- export PATH=$PATH:~/.cargo/bin
- |
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
rustup component add rustfmt-preview
rustup component add clippy
cargo install --force cargo-audit
cargo generate-lockfile
fi
script:
- echo FEATURES="$FEATURES"
- |
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
cargo audit
cargo fmt --all -- --check
fi
- cargo clean
- cargo build --verbose --all --features="$FEATURES"
- |
if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
cargo clippy --all-targets --all-features -- -D warnings;
fi
- cargo test --all-targets --all-features --verbose --all
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "nightly" && "$FEATURES" == "serialize" ]]; then
cargo tarpaulin --out Xml &&
bash <(curl -s https://codecov.io/bash)
fi