-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
88 lines (79 loc) · 1.85 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
88
language: rust
rust:
- 1.21.0
- stable
- beta
- nightly
cache:
- apt
- cargo
# needed for `cargo install cargo-travis`
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
- cmake
sources:
- kalakris-cmake
os:
- linux
matrix:
allow_failures:
- rust: beta
- rust: nightly
- os: osx
sudo: required
env:
global:
- RUST_BACKTRACE=1
branches:
except:
- /test.*/
notifications:
irc:
channels: "chat.freenode.net#zetox"
template:
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} || Change view: %{compare_url}"
on_success: change
skip_join: true
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
then
./scripts/verify-commit-messages.sh "$TRAVIS_COMMIT_RANGE" \
&& ./scripts/bootstrap-ubuntu-14-04.sh
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]
then
./scripts/bootstrap-osx.sh
export PKG_CONFIG_PATH=$HOME/installed_libsodium/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$HOME/installed_libsodium/lib:$LD_LIBRARY_PATH
fi
script:
- cargo build --verbose
- cargo test --verbose
- |
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]
then
cargo build --features "clippy" \
&& cargo test --features "clippy"
fi
- cargo doc
after_success:
- >
test $TRAVIS_PULL_REQUEST == "false"
&& (test $TRAVIS_BRANCH == "travis"
|| test $TRAVIS_BRANCH == "master" )
&& bash ./scripts/deploy-gh-pages.sh
# measure code coverage and upload to coveralls.io
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == stable ]]
then
cargo install cargo-travis || echo "cargo-travis has been already installed"
export PATH=$HOME/.cargo/bin:$PATH
cargo coveralls
fi