]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Fix rvm/gpg bug in travis osx build
[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   allow_failures:
75   - os: windows
76     env: CARGO_INCREMENTAL=0 BASE_TESTS=true
77 # prevent these jobs with default env vars
78   exclude:
79     - os: linux
80     - os: osx
81     - os: windows
82
83 script:
84   - |
85       rm rust-toolchain
86       cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
87       RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
88       travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH
89       rustup default master
90       export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
91   - |
92     if [ -z ${INTEGRATION} ]; then
93       ./ci/base-tests.sh && sleep 5
94     else
95       ./ci/integration-tests.sh && sleep 5
96     fi
97
98 after_success: |
99   #!/bin/bash
100   if [ $(uname) == Linux ]; then
101     set -ex
102     if [ -z ${INTEGRATION} ]; then
103       ./.github/deploy.sh
104     else
105       echo "Not deploying, because we're in an integration test run"
106     fi
107     set +e
108   fi