]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Format async closure
[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=tempdir
35   allow_failures:
36     # See: https://github.com/rust-lang-nursery/rustfmt/issues/2789
37     - env: INTEGRATION=chalk
38     # PR sent
39     - env: INTEGRATION=crater
40     # #2721
41     - env: INTEGRATION=rand
42     # Doesn't build
43     - env: INTEGRATION=rust-clippy
44     # See: https://github.com/rust-lang-nursery/rustfmt/issues/2787
45     - env: INTEGRATION=stdsimd
46
47 before_script:
48 - |
49   if [ -z ${INTEGRATION} ]; then
50     if [ $TRAVIS_OS_NAME = 'osx' ]; then
51       virtualenv env &&
52       source env/bin/activate &&
53       python --version &&
54       pip install 'travis-cargo<0.2'
55     else
56       pip install 'travis-cargo<0.2' --user &&
57       export PATH="$(python -m site --user-base)/bin:$PATH"
58     fi
59   fi
60
61 script:
62   - |
63     if [ -z ${INTEGRATION} ]; then
64       cargo build
65       cargo test
66     else
67       ./ci/integration.sh
68     fi
69
70 after_success:
71 - if [ -z ${INTEGRATION} ]; then travis-cargo coveralls --no-sudo; fi
72
73 before_deploy:
74   # TODO: cross build
75  - cargo build --release --target=x86_64-unknown-linux-gnu
76  - 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
77
78 deploy:
79   provider: releases
80   api_key:
81     secure: "your own encrypted key"
82   file:
83   - rustfmt-x86_64-unknown-linux-gnu.tar.gz
84   on:
85     repo: nrc/rustfmt
86     tags: true
87     condition: "$DEPLOY = LINUX"
88   skip_cleanup: true