forked from tikv/grpc-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (38 loc) · 1.36 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
dist: trusty
sudo: false
language: rust
cache:
directories:
- $HOME/.cargo
- $HOME/.cache
- $TRAVIS_BUILD_DIR/target
before_cache:
- find $TRAVIS_BUILD_DIR/target/debug -maxdepth 1 -type f -delete
os:
- linux
- osx
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
before_script:
- export PATH="$PATH:$HOME/.cache/bin:$HOME/.cargo/bin"
- GRPC_HEADER="$HOME/.cache/include/grpc/grpc.h"
- if [[ $TRAVIS_OS_NAME == "osx" ]] && [[ ! -f $GRPC_HEADER ]]; then export CC=clang; brew install autoconf libtool shtool; fi
- test -f "$GRPC_HEADER" || (git clone -b v1.4.0 https://github.com/grpc/grpc && cd grpc && git submodule update --init && env prefix=$HOME/.cache make install_c)
- PROTOC_PKG=protoc-3.3.0-${TRAVIS_OS_NAME}-x86_64.zip
- which protoc || (wget https://github.com/google/protobuf/releases/download/v3.3.0/${PROTOC_PKG} && unzip -u ${PROTOC_PKG} -d $HOME/.cache)
- export C_INCLUDE_PATH="$HOME/.cache/include"
- export LD_LIBRARY_PATH="$HOME/.cache/lib"
- export DYLD_LIBRARY_PATH="$HOME/.cache/lib"
- export LIBRARY_PATH="$HOME/.cache/lib"
- export PKG_CONFIG_PATH="$HOME/.cache/lib/pkgconfig"
script:
- if [[ $TRAVIS_RUST_VERSION == "nightly" ]]; then cargo install -f clippy && cargo clippy; fi
- export RUSTFLAGS=-Dwarnings
- cargo build
- cargo test --all
- cargo test --all --features link-sys