-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
74 lines (68 loc) · 1.35 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
73
74
language: rust
addons:
apt:
sources:
- sourceline: 'ppa:giskou/librocksdb'
packages:
- gcc
- g++
- libssl-dev
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- libiberty-dev
- libsnappy-dev
- librocksdb
rust:
- stable
cache:
directories:
- $HOME/.cargo
- $HOME/.local
- $TRAVIS_BUILD_DIR/target
dist: trusty
sudo: required
env:
global:
- CARGO_INCREMENTAL=1
- RUSTFLAGS="-C link-dead-code"
- CODECOV_TOKEN=90006bf6-e4b7-4825-b880-8d19c4e21c21
- ROCKSDB_LIB_DIR=/usr/lib/x86_64-linux-gnu
- SNAPPY_LIB_DIR=/usr/lib/x86_64-linux-gnu
matrix:
- FEATURE=fmt
- FEATURE=test-lib
- FEATURE=test-doc
- FEATURE=clippy
- FEATURE=full-build
install: |
case "$FEATURE" in
"clippy" )
cargo clippy --version || rustup component add clippy-preview
;;
"fmt" )
cargo-audit -V || cargo install cargo-audit --force
rustup component add rustfmt-preview
rustfmt -V
cargo update
;;
esac
script: |
case "$FEATURE" in
"fmt" )
cargo audit && cargo fmt --all -- --check
;;
"clippy" )
cargo clippy -- -D warnings
;;
"test-lib" )
RUST_LOG=off cargo test --tests --lib
;;
"test-doc" )
cargo test --doc -- --test-threads=2
;;
"full-build" )
unset ROCKSDB_LIB_DIR && unset SNAPPY_LIB_DIR && cargo test --tests --lib
;;
esac