forked from mozilla/lmdb-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (46 loc) · 1.67 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
language: rust
sudo: false
cache: cargo
os:
- linux
- osx
rust:
- 1.37.0
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
fast_finish: true
before_script:
# We install a known-to-have-rustfmt version of the nightly toolchain
# in order to run the nightly version of rustfmt, which supports rules
# that we depend upon. When updating, pick a suitable nightly version
# from https://rust-lang.github.io/rustup-components-history/
- rustup toolchain install nightly-2019-09-11
- rustup component add rustfmt --toolchain nightly-2019-09-11
- rustup component add clippy --toolchain nightly-2019-09-11
# Use official clang in order to test out libfuzzer on osx.
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
brew update;
brew install llvm;
export PATH="/usr/local/opt/llvm/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/llvm/lib";
export CPPFLAGS="-I/usr/local/opt/llvm/include";
fi
script:
- cargo +nightly-2019-09-11 fmt --all -- --check
- CC="clang" cargo +nightly-2019-09-11 clippy --all-features -- -D warnings -A clippy::match-ref-pats -A clippy::needless-lifetimes
- CC="clang" cargo build --features with-asan --verbose
- CC="clang" cargo build --features with-fuzzer --verbose
- CC="clang" cargo build --features with-fuzzer-no-link --verbose
- CC="clang" cargo build --features with-asan,with-fuzzer --verbose
- CC="clang" cargo build --features with-asan,with-fuzzer-no-link --verbose
- cargo build --verbose
- export RUST_BACKTRACE=1
- cargo test --all --verbose
- cargo test --release --all --verbose
- if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then
cargo bench --all --verbose;
fi