forked from rusoto/rusoto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (79 loc) · 3.12 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
sudo: required
dist: trusty
# necessary for `travis-cargo coveralls --no-sudo`
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev # optional: only required for the --verify flag of coveralls
language: rust
# cache dependencies: https://docs.travis-ci.com/user/caching/#Rust-Cargo-cache
cache: cargo
# run builds for all the trains (and more)
rust:
- stable
- beta
- nightly
os:
- linux
- osx
cache:
directories:
- $HOME/.cargo
before_script:
# load travis-cargo
- |
pip install 'travis-cargo<0.2' --user &&
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export PATH=$HOME/.local/bin/:$PATH
else
export PATH=$HOME/Library/Python/2.7/bin:$PATH
fi
# the main build
script:
- |
echo "Generating service crates..." &&
( cd service_crategen && \
cargo run -- -c ./services.json -o ../rusoto/services && \
cd .. )
- echo "Running Rusoto tests" && cd rusoto && cargo test --lib --all -v && cd ..
- |
echo "Running cargo docs on stable Rust on Linux" &&
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd rusoto && cargo doc --all --no-deps && cd ..
fi
after_success:
# upload the documentation from the build if it's from Rust stable, Linux and not a pull request:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "stable" && "$TRAVIS_PULL_REQUEST" == false ]]; then
cd rusoto && echo '<meta http-equiv=refresh content=0;url=rusoto_core/index.html>' > target/doc/index.html \
&& mkdir target/doc/rusoto/ && echo '<meta http-equiv=refresh content=0;url=../rusoto_core/index.html>' > target/doc/rusoto/index.html \
&& sudo pip install ghp-import && ghp-import -n target/doc \
&& git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages \
&& cd ..
fi
# measure code coverage and upload to coveralls.io (the verify argument
# mitigates kcov crashes due to malformed debuginfo, at the cost of some
# speed. <https://github.com/huonw/travis-cargo/issues/12>)
# Don't run on OSX.
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
travis-cargo coveralls --no-sudo --verify -- --lib
fi
env:
global:
- RUST_BACKTRACE=1
# encrypted Github token for doc upload
- secure: zcYaxF4IGX+8XnSnG9Sh3q05rp+XX8Fc7gRLM3VcSpaNNd6tvNNxvjZNAn6gySuaoKBApCIMFAKHgfpO46DHqBjxU7ONnFW3xRGfi4f4VCx7+bagRmrMfxZPcDgZ0tZRs4S+0mALkYmvjhJmymQIAOUmz0LEezKsiVhh5qlkC/GLKaQzaU6Hy6u2+pymU9jfFt14O1s3e+UyyYeY22Bo6PZoRxdSDhLjvDZQQNxMx5CmCZHU7j3sH6aYRCltOdiYNTR3TB7GKrVJt6kn/q2SKwUxPDFvBpmE1v4NZr26262mZtBtUvxIUwTgPritntSPLm/qcNAKP93P9Bleq0QJXSDDOxl4Jf+Vpi1MUdf6MvacRVLsXInKJvNHDztBgmrLnkXWF70EmAwV9MjuGRhzjXCWhxVq/I0nebIdJHgJH195OpBa2jdeh6E0Xf6NOQ6N1S5vCyhotFIswwFAaff0znZw3je/iM7jxSPlRCMpxXkSjRVTbvoqDGIpNvxqs8WYDCpOTmDHz0rdOqvumIQFVt/i9Vk5gwNrZBOeOppjYg8jP0E0PHglfeU05SojgWBNbpn9j6JzTdPWbNhOE/HXNzTbHf5S9khqcI324c9bllOYAi0qrpBt1hawnuYi8cURpm64sYGODVhIt1fkqcqD6Nlv4uARF/+U4jWHGgPzBRQ=
branches:
only:
- master
- auto
notifications:
email: false
matrix:
fast_finish: true
allow_failures:
- rust: nightly