]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Fix `expect_fun_call` lint suggestions
[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     - os: osx # run base tests on both platforms
43       env: BASE_TESTS=true
44     - os: linux
45       env: BASE_TESTS=true
46     - os: windows
47       env: CARGO_INCREMENTAL=0 BASE_TESTS=true
48     - env: INTEGRATION=rust-lang/cargo
49       if: repo =~ /^rust-lang\/rust-clippy$/
50     - env: INTEGRATION=rust-random/rand
51       if: repo =~ /^rust-lang\/rust-clippy$/
52     - env: INTEGRATION=rust-lang-nursery/stdsimd
53       if: repo =~ /^rust-lang\/rust-clippy$/
54     - env: INTEGRATION=rust-lang/rustfmt
55       if: repo =~ /^rust-lang\/rust-clippy$/
56     - env: INTEGRATION=rust-lang-nursery/futures-rs
57       if: repo =~ /^rust-lang\/rust-clippy$/
58     - env: INTEGRATION=rust-lang-nursery/failure
59       if: repo =~ /^rust-lang\/rust-clippy$/
60     - env: INTEGRATION=rust-lang-nursery/log
61       if: repo =~ /^rust-lang\/rust-clippy$/
62     - env: INTEGRATION=rust-lang-nursery/chalk
63       if: repo =~ /^rust-lang\/rust-clippy$/
64     - env: INTEGRATION=rust-lang/rls
65       if: repo =~ /^rust-lang\/rust-clippy$/
66     - env: INTEGRATION=chronotope/chrono
67       if: repo =~ /^rust-lang\/rust-clippy$/
68     - env: INTEGRATION=serde-rs/serde
69       if: repo =~ /^rust-lang\/rust-clippy$/
70     - env: INTEGRATION=Geal/nom
71       if: repo =~ /^rust-lang\/rust-clippy$/
72     - env: INTEGRATION=hyperium/hyper
73       if: repo =~ /^rust-lang\/rust-clippy$/
74     - env: INTEGRATION=bluss/rust-itertools
75       if: repo =~ /^rust-lang\/rust-clippy$/
76   allow_failures:
77   - os: windows
78     env: CARGO_INCREMENTAL=0 BASE_TESTS=true
79 # prevent these jobs with default env vars
80   exclude:
81     - os: linux
82     - os: osx
83     - os: windows
84
85 script:
86   - |
87       rm rust-toolchain
88       cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
89       RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
90       travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH
91       rustup default master
92       export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
93   - |
94     if [ -z ${INTEGRATION} ]; then
95       ./ci/base-tests.sh && sleep 5
96     else
97       ./ci/integration-tests.sh && sleep 5
98     fi
99
100 after_success: |
101   #!/bin/bash
102   if [ $(uname) == Linux ]; then
103     set -ex
104     if [ -z ${INTEGRATION} ]; then
105       ./.github/deploy.sh
106     else
107       echo "Not deploying, because we're in an integration test run"
108     fi
109     set +e
110   fi