forked from colin-kiegel/rust-derive-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (86 loc) · 3.21 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
sudo: false
language: rust
# cache: cargo # blocked by https://github.com/brson/rust-skeptic/issues/18
rust:
- beta
- stable
- nightly
- 1.37.0
matrix:
include:
- rust: nightly
env: JOB=test CARGO_FEATURES="skeptic_tests nightlytests logging"
- rust: nightly
env: JOB=style_check
allow_failures:
- env: JOB=style_check
- env: JOB=test CARGO_FEATURES="skeptic_tests nightlytests logging"
fast_finish: true
env:
matrix:
- JOB=test
global:
- CARGO_FEATURES=""
- RUST_BACKTRACE=1
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- PKGNAME=derive_builder
# encrypted github token for doc+coveralls upload
- secure: "oGshXdNEX+SK3O6cwGsMN9TGjfAtXXDFxBa5Ti38m8cNR2DdYikV5BMgsPQdWj8K58m2H3hiU3jWGI1d3W94ELlKXRcAJg39x10TPAHd+L89zSk48JorZejgKVARJuW3qDAO/xbi+bc0/Q1sgq9h7zBxAWfD7PJ3Lu/k20SRmoghDC+ufHr6bElkAZM388WD1q8eZgITBQWXDBYy8id85TxxagK0Xq/ZjDhCNwcz9A9rO8QrX886nAr8liL54M+XZ35+wwiw+5s3Vz5Oa/sKnVg33VKIjDwOs3YZP4+egFFEtEVVlvAm+NmzWIYzOi8VJbNmV00c3qhSRkEwCOGR41m4Nl/bmhMu6iL9epvqdaouElkg74dV6qqeYq/jGOJrklHuUmyPvXbTYukpNt6a9nqDu8IPrLkQOjpKnKQtmazdOyajiqwUiv6/GXb6tarSzMzsXqM+l/wWplFZkwaDvWR9m5OgilohpFYdhrbJNUd1zffgfwvYFBNVXnkRScwrVBpVfAz420w2s/YfONfl/DtrHt1U/O+gDQ92AGc6foOqCJoqup6uasWkgRbPMGm5hl6n7JALGYjNB60BLi7okItITosoprknXUfLoPzrpnMRi9ScEjEXUBliKxBXnPyMKAZur39PfKGeIasOPwQIPo9xhpWTsOUcuux9l4eihX0="
addons:
apt:
packages:
# travis-cargo dependencies
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
before_script: |
# load travis cargo
# - https://github.com/huonw/travis-cargo
pip install 'travis-cargo<0.2' --user &&
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
# share build artifacts:
export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
if [ "$JOB" = "style_check" ]; then
which cargo-clippy || cargo install clippy --debug || exit
which cargo-fmt || cargo install rustfmt --debug || exit
fi
script: |
case "$JOB" in
test)
# We have to consider the following limitations of cargo in rustc 1.15:
# - no support for virtual worskpaces, instead we have to cd into a crate.
# - cargo build/doc does not support `--all`, luckily the
# `derive_builder` crate will implicitly build/doc the
# `derive_builder_core` crate too.
commands=(
"cd derive_builder && travis-cargo build -- --features \"$CARGO_FEATURES\""
"cd derive_builder && travis-cargo test -- --all --no-fail-fast --features \"$CARGO_FEATURES\""
"cd derive_builder && travis-cargo doc"
)
;;
style_check)
commands=(
"cd derive_builder_core && cargo clippy -- -Dclippy"
"cd derive_builder && cargo clippy -- -Dclippy"
"cd derive_builder_core && cargo fmt -- --write-mode diff"
"cd derive_builder && cargo fmt -- --write-mode diff"
)
;;
*)
exit 1
;;
esac
dev/travis-run-all.sh "${commands[@]}"
after_success: |
# upload the documentation from the build with stable (automatically only
# runs on the master branch, not individual PRs)
travis-cargo --only stable doc-upload -- --features "$CARGO_FEATURES"
deploy:
on:
tags: true
branch: master
rust: nightly
condition: "$JOB == test"
provider: script
script: dev/deploy.sh
skip_cleanup: true