forked from redis-rs/redis-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (41 loc) · 1.19 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
sudo: false
language: rust
# Prevents cargo's cache from growing to large, see https://levans.fr/rust_travis_cache.html
# Need to cache the whole `.cargo` directory to keep .crates.toml for
# cargo-update to work
cache:
directories:
- /home/travis/.cargo
# But don't cache the cargo registry
before_cache:
- rm -rf /home/travis/.cargo/registry
matrix:
include:
- rust: stable
env: RUST_VERSION=stable COMMAND=test
- rust: beta
env: RUST_VERSION=beta COMMAND=test
- rust: nightly
env: RUST_VERSION=nightly COMMAND=test
- rust: stable
env: COMMAND=lint
script:
- make $COMMAND
- cargo check --benches --all-features
- |
([ "$RUST_VERSION" = "nightly" ] || [ "$RUST_VERSION" = "beta" ]) && exit 0 # Don't cargo-fmt on nightly or beta
make style-check
- |
# Remove dev-dependencies so they do not enable features accidentally
# https://github.com/rust-lang/cargo/issues/4664
sed -i '/dev-dependencies/,/dev-dependencies/d' Cargo.toml
cargo build --all-features
notifications:
email: false
irc:
channels:
- "chat.freenode.net#pocoo"
on_success: change
on_failure: always
use_notice: true
skip_join: true