-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
85 lines (75 loc) · 1.95 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
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
branches:
only:
- master
# Github release tags (for example "v0.9" or "v0.9.1").
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
# Branch names endings with "-release" (for example "0.9.0-release").
- /-release$/
rust:
- nightly-2018-11-13
env:
global:
- SODIUM_VERS=1.0.13
- CARGO_INCREMENTAL=1
- DEADLINKS_VERS=0.3.0
- ROCKSDB_LIB_DIR=/usr/lib/x86_64-linux-gnu
- SNAPPY_LIB_DIR=/usr/lib/x86_64-linux-gnu
cache:
directories:
- $HOME/.cargo
- $HOME/.local
- $TRAVIS_BUILD_DIR/target
dist: trusty
before_install:
- |
if [ ! -f "$HOME/.local/lib/libsodium.a" ]; then
wget "https://github.com/jedisct1/libsodium/releases/download/$SODIUM_VERS/libsodium-$SODIUM_VERS.tar.gz" -t 5 -O "libsodium.tar.gz"
tar xvf libsodium.tar.gz
cd libsodium-$SODIUM_VERS
./configure --prefix=$HOME/.local
make
make install
cd ..
fi
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/.local/lib/pkgconfig
install:
- cargo deadlinks -V | grep $DEADLINKS_VERS || cargo install cargo-deadlinks --vers $DEADLINKS_VERS --force
- rustup component add rustfmt-preview
- rustfmt -V
- rustup component add clippy-preview
- cargo clippy -V
script:
- cargo fmt -- --check
- cargo check --tests --examples
- cargo clippy -- -D warnings
- cargo test --tests
- cargo test --doc
- cargo build --example clients
- |
cargo clean --doc &&
cargo rustdoc -- -Z unstable-options --html-in-header misc/hide-blanket-impls.html --extern-html-root-url exonum=https://docs.rs/exonum/0.9.4 &&
cargo deadlinks --dir target/doc
deploy:
provider: pages
local-dir: target/doc
skip-cleanup: true
github-token: $GITHUB_TOKEN
on:
branch: master