]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge remote-tracking branch 'origin/beta1.35' into backport-merge
[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     # The jobs are approximately sorted by execution time
54     - env: INTEGRATION=rust-lang/cargo
55       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
56     - env: INTEGRATION=rust-lang-nursery/chalk
57       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
58     - env: INTEGRATION=rust-lang/rls
59       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
60     - env: INTEGRATION=Geal/nom
61       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
62     - env: INTEGRATION=rust-lang/rustfmt
63       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
64     - env: INTEGRATION=hyperium/hyper
65       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
66     - env: INTEGRATION=bluss/rust-itertools
67       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
68     - env: INTEGRATION=serde-rs/serde
69       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
70     - env: INTEGRATION=rust-lang-nursery/stdsimd
71       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
72     - env: INTEGRATION=rust-random/rand
73       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
74     - env: INTEGRATION=rust-lang-nursery/futures-rs
75       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
76     - env: INTEGRATION=Marwes/combine
77       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
78     - env: INTEGRATION=rust-lang-nursery/failure
79       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
80     - env: INTEGRATION=rust-lang-nursery/log
81       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
82     - env: INTEGRATION=chronotope/chrono
83       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
84   allow_failures:
85   - os: windows
86     env: CARGO_INCREMENTAL=0 BASE_TESTS=true
87 # prevent these jobs with default env vars
88   exclude:
89     - os: linux
90     - os: osx
91     - os: windows
92
93 script:
94   - |
95       rm rust-toolchain
96       ./setup-toolchain.sh
97       export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
98   - |
99     if [ -z ${INTEGRATION} ]; then
100       ./ci/base-tests.sh && sleep 5
101     else
102       ./ci/integration-tests.sh && sleep 5
103     fi
104
105 after_success: |
106   #!/bin/bash
107   if [ $(uname) == Linux ]; then
108     set -ex
109     if [ -z ${INTEGRATION} ]; then
110       ./.github/deploy.sh
111     else
112       echo "Not deploying, because we're in an integration test run"
113     fi
114     set +e
115   fi