]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge #3357
[rust.git] / .travis.yml
1 language: rust
2
3 rust: nightly
4
5 os:
6   - linux
7   - osx
8   - windows
9
10 sudo: false
11
12 branches:
13   only:
14     # This is where pull requests from "bors r+" are built.
15     - staging
16     # This is where pull requests from "bors try" are built.
17     - trying
18     # Also build pull requests.
19     - master
20
21 env:
22  global:
23    - RUST_BACKTRACE=1
24
25 before_install:
26  - |
27     # work-around for issue https://github.com/travis-ci/travis-ci/issues/6307
28     # might not be necessary in the future
29     if [ "$TRAVIS_OS_NAME" == "osx" ]; then
30      command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
31      rvm get stable
32     fi
33
34 install:
35   - |
36     if [ -z ${INTEGRATION} ]; then
37       if [ "$TRAVIS_OS_NAME" == "linux" ]; then
38         . $HOME/.nvm/nvm.sh
39         nvm install stable
40         nvm use stable
41         npm install remark-cli remark-lint
42       fi
43       if [ "$TRAVIS_OS_NAME" == "windows" ]; then
44         choco install windows-sdk-10.0
45       fi
46     fi
47
48 matrix:
49   include:
50     - os: osx # run base tests on both platforms
51       env: BASE_TESTS=true
52     - os: linux
53       env: BASE_TESTS=true
54     - os: windows
55       env: BASE_TEST=true
56     - env: INTEGRATION=rust-lang/cargo
57     - env: INTEGRATION=rust-lang-nursery/rand
58     - env: INTEGRATION=rust-lang-nursery/stdsimd
59     - env: INTEGRATION=rust-lang-nursery/rustfmt
60     - env: INTEGRATION=rust-lang-nursery/futures-rs
61     - env: INTEGRATION=rust-lang-nursery/failure
62     - env: INTEGRATION=rust-lang-nursery/log
63     - env: INTEGRATION=rust-lang-nursery/chalk
64     - env: INTEGRATION=rust-lang-nursery/rls
65     - env: INTEGRATION=chronotope/chrono
66     - env: INTEGRATION=serde-rs/serde
67     - env: INTEGRATION=Geal/nom
68 # uncomment once https://github.com/rust-lang/rust/issues/55376 is fixed
69 #    - env: INTEGRATION=hyperium/hyper
70   allow_failures:
71   - os: windows
72     env: BASE_TEST=true
73 # prevent these jobs with default env vars
74   exclude:
75     - os: linux
76     - os: osx
77     - os: windows
78
79 script:
80   - |
81       rm rust-toolchain
82       cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
83       RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
84       travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH
85       rustup default master
86       export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
87   - |
88     if [ -z ${INTEGRATION} ]; then
89       ./ci/base-tests.sh && sleep 5
90     else
91       ./ci/integration-tests.sh && sleep 5
92     fi
93
94 after_success: |
95   #!/bin/bash
96   if [ $(uname) == Linux ]; then
97     set -ex
98     if [ -z ${INTEGRATION} ]; then
99       ./.github/deploy.sh
100     else
101       echo "Not deploying, because we're in an integration test run"
102     fi
103     set +e
104   fi