]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge pull request #3523 from topecongiro/issue-3515
[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=chalk
23     - env: INTEGRATION=crater
24     - env: INTEGRATION=error-chain
25     - env: INTEGRATION=glob
26     - env: INTEGRATION=log
27     - env: INTEGRATION=mdbook
28     - env: INTEGRATION=packed_simd
29     - env: INTEGRATION=rand
30     - env: INTEGRATION=rust-semverver
31     - env: INTEGRATION=stdsimd TARGET=x86_64-unknown-linux-gnu
32     - env: INTEGRATION=tempdir
33     - env: INTEGRATION=futures-rs
34   allow_failures:
35     # Doesn't build - keep this in allow_failures as it's fragile to breaking changes of rustc.
36     - env: INTEGRATION=rust-clippy
37     # Doesn't build - seems to be because of an option
38     - env: INTEGRATION=packed_simd
39     # Doesn't build - a temporal build failure due to breaking changes in the nightly compilre
40     - env: INTEGRATION=rust-semverver
41     # can be moved back to include section after https://github.com/rust-lang-nursery/failure/pull/298 is merged
42     - env: INTEGRATION=failure
43     # `cargo test` doesn't finish - disabling for now.
44     # - env: INTEGRATION=cargo
45
46 script:
47   - |
48     if [ -z ${INTEGRATION} ]; then
49       cargo build
50       cargo test
51     else
52       ./ci/integration.sh
53     fi
54
55 after_success:
56 - if [ -z ${INTEGRATION} ]; then travis-cargo coveralls --no-sudo; fi
57
58 before_deploy:
59   # TODO: cross build
60  - cargo build --release --target=x86_64-unknown-linux-gnu
61  - 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
62
63 deploy:
64   provider: releases
65   api_key:
66     secure: "your own encrypted key"
67   file:
68   - rustfmt-x86_64-unknown-linux-gnu.tar.gz
69   on:
70     repo: nrc/rustfmt
71     tags: true
72     condition: "$DEPLOY = LINUX"
73   skip_cleanup: true