forked from TLmaK0/rustneat
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
38 lines (38 loc) · 1.05 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
sudo: false
language: rust
rust:
- stable
- beta
- nightly
os:
- linux
- osx
cache: cargo
before_cache:
- cargo prune
env:
global:
- PATH=$PATH:$HOME/.cargo/bin
- RUST_BACKTRACE=1
before_script:
- |
(which cargo-install-update && cargo install-update cargo-update) || cargo install cargo-update &&
(which cargo-prune && cargo install-update cargo-prune) || cargo install cargo-prune
- rustup component add rustfmt
- rustup component add clippy
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export DEP_OPENSSL_INCLUDE=`brew --prefix openssl`/include; fi
script:
- if [ "${TRAVIS_RUST_VERSION}" = nightly ]; then
(
set -x;
cargo fmt
);
fi
- if [ "${TRAVIS_RUST_VERSION}" = stable ]; then
(
cargo clippy -- -D warnings;
);
fi
- cargo test --verbose --release