]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge pull request #2984 from mehcode/feature/edition-option
[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=packed_simd
32     - env: INTEGRATION=rand
33     - env: INTEGRATION=rust-clippy
34     - env: INTEGRATION=rust-semverver
35     - env: INTEGRATION=stdsimd
36     - env: INTEGRATION=tempdir
37   allow_failures:
38     # Needs `edition = "2018"` in rustfmt.toml
39     - env: INTEGRATION=chalk
40     # Fails tests, don't know why
41     - env: INTEGRATION=crater
42     # Doesn't build
43     - env: INTEGRATION=futures-rs
44     # Doesn't build - seems to be because of an option
45     - env: INTEGRATION=packed_simd
46     # Weird bug I can't reproduce: #2969
47     - env: INTEGRATION=rand
48     # Test failure
49     - env: INTEGRATION=rust-clippy
50     # Build failure
51     - env: INTEGRATION=rust-semverver
52
53 script:
54   - |
55     if [ -z ${INTEGRATION} ]; then
56       cargo build
57       cargo test
58     else
59       ./ci/integration.sh
60     fi
61
62 after_success:
63 - if [ -z ${INTEGRATION} ]; then travis-cargo coveralls --no-sudo; fi
64
65 before_deploy:
66   # TODO: cross build
67  - cargo build --release --target=x86_64-unknown-linux-gnu
68  - 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
69
70 deploy:
71   provider: releases
72   api_key:
73     secure: "your own encrypted key"
74   file:
75   - rustfmt-x86_64-unknown-linux-gnu.tar.gz
76   on:
77     repo: nrc/rustfmt
78     tags: true
79     condition: "$DEPLOY = LINUX"
80   skip_cleanup: true