]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Auto merge of #3956 - rust-lang:beta-clog, r=phansch
[rust.git] / .travis.yml
1 language: rust
2
3 rust: nightly
4
5 os:
6   - linux
7   - osx
8   - windows
9
10 branches:
11   # Don't build these branches
12   except:
13     # Used by bors
14     - trying.tmp
15     - staging.tmp
16
17 env:
18  global:
19    - RUST_BACKTRACE=1
20
21 install:
22   - |
23     if [ -z ${INTEGRATION} ]; then
24       rustup component add rustfmt || cargo install --git https://github.com/rust-lang/rustfmt/ --force
25       if [ "$TRAVIS_OS_NAME" == "linux" ]; then
26         . $HOME/.nvm/nvm.sh
27         nvm install stable
28         nvm use stable
29         npm install remark-cli remark-lint
30       fi
31       if [ "$TRAVIS_OS_NAME" == "windows" ]; then
32         choco install windows-sdk-10.0
33       fi
34     fi
35
36 # disabling the integration tests in forks should be done with
37 # if: fork = false
38 # but this is currently buggy travis-ci/travis-ci#9118
39 matrix:
40   fast_finish: true
41   include:
42     # Builds that are executed for every PR
43     - os: osx # run base tests on both platforms
44       env: BASE_TESTS=true
45     - os: linux
46       env: BASE_TESTS=true
47     - os: windows
48       env: CARGO_INCREMENTAL=0 BASE_TESTS=true
49
50     # Builds that are only executed when a PR is r+ed or a try build is started
51     # We don't want to run these always because they go towards
52     # the build limit within the Travis rust-lang account.
53     - env: INTEGRATION=rust-lang/cargo
54       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
55     - env: INTEGRATION=rust-random/rand
56       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
57     - env: INTEGRATION=rust-lang-nursery/stdsimd
58       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
59     - env: INTEGRATION=rust-lang/rustfmt
60       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
61     - env: INTEGRATION=rust-lang-nursery/futures-rs
62       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
63     - env: INTEGRATION=rust-lang-nursery/failure
64       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
65     - env: INTEGRATION=rust-lang-nursery/log
66       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
67     - env: INTEGRATION=rust-lang-nursery/chalk
68       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
69     - env: INTEGRATION=rust-lang/rls
70       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
71     - env: INTEGRATION=chronotope/chrono
72       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
73     - env: INTEGRATION=serde-rs/serde
74       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
75     - env: INTEGRATION=Geal/nom
76       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
77     - env: INTEGRATION=hyperium/hyper
78       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
79     - env: INTEGRATION=bluss/rust-itertools
80       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
81     - env: INTEGRATION=Marwes/combine
82       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
83   allow_failures:
84   - os: windows
85     env: CARGO_INCREMENTAL=0 BASE_TESTS=true
86 # prevent these jobs with default env vars
87   exclude:
88     - os: linux
89     - os: osx
90     - os: windows
91
92 script:
93   - |
94       rm rust-toolchain
95       ./setup-toolchain.sh
96       export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
97   - |
98     if [ -z ${INTEGRATION} ]; then
99       ./ci/base-tests.sh && sleep 5
100     else
101       ./ci/integration-tests.sh && sleep 5
102     fi
103
104 after_success: |
105   #!/bin/bash
106   if [ $(uname) == Linux ]; then
107     set -ex
108     if [ -z ${INTEGRATION} ]; then
109       ./.github/deploy.sh
110     else
111       echo "Not deploying, because we're in an integration test run"
112     fi
113     set +e
114   fi