]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Add a field in Summary for notiyfing about formatting failure of macro
[rust.git] / .travis.yml
1 sudo: false
2 language: rust
3 rust: nightly
4 os: linux
5 cache:
6  directories:
7   - $HOME/.cargo
8
9 addons:
10   apt:
11     packages:
12     - libcurl4-openssl-dev
13     - libelf-dev
14     - libdw-dev
15
16 matrix:
17   include:
18     - env: DEPLOY=LINUX
19     - env: CFG_RELEASE_CHANNEL=beta
20     - os: osx
21     - env: INTEGRATION=bitflags
22     - env: INTEGRATION=cargo
23     - env: INTEGRATION=chalk
24     - env: INTEGRATION=crater
25     - env: INTEGRATION=error-chain
26     - env: INTEGRATION=failure
27     - env: INTEGRATION=futures-rs
28     - env: INTEGRATION=glob
29     - env: INTEGRATION=log
30     - env: INTEGRATION=mdbook
31     - env: INTEGRATION=rand
32     - env: INTEGRATION=rust-clippy
33     - env: INTEGRATION=rust-semverver
34     - env: INTEGRATION=stdsimd
35     - env: INTEGRATION=tempdir
36   allow_failures:
37     # Need to run an lalrpop build step before testing?
38     - env: INTEGRATION=chalk
39     # PR sent
40     - env: INTEGRATION=crater
41     # #2721
42     - env: INTEGRATION=rand
43     # Doesn't build
44     - env: INTEGRATION=rust-clippy
45     # Doesn't build
46     - env: INTEGRATION=rust-semverver
47
48 before_script:
49 - |
50   if [ -z ${INTEGRATION} ]; then
51     if [ $TRAVIS_OS_NAME = 'osx' ]; then
52       virtualenv env &&
53       source env/bin/activate &&
54       python --version &&
55       pip install 'travis-cargo<0.2'
56     else
57       pip install 'travis-cargo<0.2' --user &&
58       export PATH="$(python -m site --user-base)/bin:$PATH"
59     fi
60   fi
61
62 script:
63   - |
64     if [ -z ${INTEGRATION} ]; then
65       cargo build
66       cargo test
67     else
68       ./ci/integration.sh
69     fi
70
71 after_success:
72 - if [ -z ${INTEGRATION} ]; then travis-cargo coveralls --no-sudo; fi
73
74 before_deploy:
75   # TODO: cross build
76  - cargo build --release --target=x86_64-unknown-linux-gnu
77  - tar czf rustfmt-x86_64-unknown-linux-gnu.tar.gz Contributing.md Design.md README.md -C target/x86_64-unknown-linux-gnu/release/rustfmt rustfmt
78
79 deploy:
80   provider: releases
81   api_key:
82     secure: "your own encrypted key"
83   file:
84   - rustfmt-x86_64-unknown-linux-gnu.tar.gz
85   on:
86     repo: nrc/rustfmt
87     tags: true
88     condition: "$DEPLOY = LINUX"
89   skip_cleanup: true