]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Keep the rustc master install in the travis file so we can use `travis_retry`
[rust.git] / .travis.yml
1 language: rust
2
3 rust: nightly
4
5 os:
6   - linux
7   # - osx # doesn't even start atm. Not sure what travis is up to. Disabling to reduce the noise
8
9 sudo: false
10
11 env:
12  global:
13    # TRAVIS_TOKEN_CLIPPY_SERVICE
14    - secure: dj8SwwuRGuzbo2wZq5z7qXIf7P3p7cbSGs1I3pvXQmB6a58gkLiRn/qBcIIegdt/nzXs+Z0Nug+DdesYVeUPxk1hIa/eeU8p6mpyTtZ+30H4QVgVzd0VCthB5F/NUiPVxTgpGpEgCM9/p72xMwTn7AAJfsGqk7AJ4FS5ZZKhqFI=
15    - RUST_BACKTRACE=1
16
17 before_install:
18  - |
19     # work-around for issue https://github.com/travis-ci/travis-ci/issues/6307
20     # might not be necessary in the future
21     if [ "$TRAVIS_OS_NAME" == "osx" ]; then
22      command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
23      rvm get stable
24     fi
25
26 install:
27   - |
28     if [ -z ${INTEGRATION} ]; then
29       . $HOME/.nvm/nvm.sh
30       nvm install stable
31       nvm use stable
32       npm install remark-cli remark-lint
33     fi
34
35 matrix:
36   include:
37     - env: BASE_TESTS=true # runs the base tests
38     - env: INTEGRATION=rust-lang/cargo
39     - env: INTEGRATION=rust-lang-nursery/rand
40     - env: INTEGRATION=rust-lang-nursery/stdsimd
41     - env: INTEGRATION=rust-lang-nursery/rustfmt
42     - env: INTEGRATION=rust-lang-nursery/futures-rs
43     - env: INTEGRATION=rust-lang-nursery/failure
44     - env: INTEGRATION=rust-lang-nursery/log
45     - env: INTEGRATION=rust-lang-nursery/chalk
46     - env: INTEGRATION=rust-lang-nursery/rls
47     - env: INTEGRATION=chronotope/chrono
48     - env: INTEGRATION=serde-rs/serde
49     - env: INTEGRATION=Geal/nom
50     - env: INTEGRATION=hyperium/hyper
51
52 script:
53   - cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
54   - travis_retry rustup-toolchain-install-master -f -n master
55   - rustup default master
56   - |
57     if [ -z ${INTEGRATION} ]; then
58       ./ci/base-tests.sh
59     else
60       ./ci/integration-tests.sh
61     fi
62
63 after_success: |
64   #!/bin/bash
65   if [ $(uname) == Linux ]; then
66     set -ex
67     if [ -z ${INTEGRATION} ]; then
68       ./.github/deploy.sh
69     else
70       echo "Not deploying, because we're in an integration test run"
71     fi
72     # trigger rebuild of the clippy-service, to keep it up to date with clippy itself
73     if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
74        [ "$TRAVIS_REPO_SLUG" == "Manishearth/rust-clippy" ] &&
75        [ "$TRAVIS_BRANCH" == "master" ] &&
76        [ "$TRAVIS_TOKEN_CLIPPY_SERVICE" != "" ] ; then
77        curl -s -X POST \
78           -H "Content-Type: application/json" \
79           -H "Accept: application/json" \
80           -H "Travis-API-Version: 3" \
81           -H "Authorization: token $TRAVIS_TOKEN_CLIPPY_SERVICE" \
82           -d "{ \"request\": { \"branch\":\"master\" }}" \
83           https://api.travis-ci.org/repo/gnunicorn%2Fclippy-service/requests
84     else
85       echo "Ignored"
86     fi
87     set +e
88   fi