-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
87 lines (78 loc) · 1.99 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
75
76
77
78
79
80
81
82
83
84
85
86
87
language: rust
addons:
apt:
sources:
- sourceline: 'ppa:exonum/rocksdb'
- sourceline: 'ppa:maarten-fonville/protobuf'
- sourceline: 'ppa:fsgmhoward/shadowsocks-libev'
packages:
- binutils-dev
- build-essential
- cmake
- g++
- gcc
- libcurl4-openssl-dev
- libdw-dev
- libelf-dev
- libiberty-dev
- libprotobuf-dev
- librocksdb6.7
- libsnappy-dev
- libsodium-dev
- libssl-dev
- pkg-config
- protobuf-compiler
- unzip
- zlib1g-dev
rust:
# Feel free to bump this version if you need features of newer Rust.
# Sync with badge in README.md
- 1.45.0
cache:
cargo: true
directories:
- node_modules
dist: bionic
env:
global:
- DEADLINKS_VERS=0.4.1
- RUSTFLAGS="-D warnings"
- ROCKSDB_LIB_DIR=/usr/lib
- SNAPPY_LIB_DIR=/usr/lib/x86_64-linux-gnu
jobs:
fast_finish: true
allow_failures:
- env: FEATURE=non-fatal-checks
include:
# Formatting & other lints that do not require compilation
- name: lints
install:
- rustup component add rustfmt
- rustfmt -V
- nvm install 12 && nvm use 12
- npm install cspell
- npm install markdownlint-cli
script:
- cargo fmt -- --check
- find . -not -path "./target/**" -name "*.rs" | xargs ./node_modules/.bin/cspell
- find . -not -path "./node_modules/*" -name "*.md" | xargs ./node_modules/.bin/cspell
- find . -not -path "./node_modules/*" -name "*.md" | xargs ./node_modules/.bin/markdownlint --config .markdownlintrc
# Clippy linting
- name: clippy
install:
- rustup component add clippy
- cargo clippy --version
script:
- cargo clippy --all -- -D warnings
# Tests
- name: linux-tests
script:
- cargo test --all-targets
# Non-fatal checks
- name: deadlinks
env: FEATURE=non-fatal-checks
install:
- cargo-deadlinks -V | grep $DEADLINKS_VERS || cargo install cargo-deadlinks --vers $DEADLINKS_VERS --force
script:
- cargo doc --no-deps
- cargo deadlinks --dir target/doc