]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge pull request #1919 from rust-lang-nursery/ui
[rust.git] / .travis.yml
1 language: rust
2
3 rust: nightly
4
5 os:
6   - linux
7   - osx
8
9 sudo: false
10
11 cache:
12   cargo: true
13   directories:
14   - target
15
16 env:
17  global:
18    # TRAVIS_TOKEN_CLIPPY_SERVICE
19    - secure: dj8SwwuRGuzbo2wZq5z7qXIf7P3p7cbSGs1I3pvXQmB6a58gkLiRn/qBcIIegdt/nzXs+Z0Nug+DdesYVeUPxk1hIa/eeU8p6mpyTtZ+30H4QVgVzd0VCthB5F/NUiPVxTgpGpEgCM9/p72xMwTn7AAJfsGqk7AJ4FS5ZZKhqFI=
20    - RUST_BACKTRACE=1
21
22 install:
23   - . $HOME/.nvm/nvm.sh
24   - nvm install stable
25   - nvm use stable
26   - npm install remark-cli remark-lint
27
28 script:
29  - PATH=$PATH:./node_modules/.bin
30  - remark -f README.md > /dev/null
31  - set -e
32  - cargo build --features debugging
33  - cargo test --features debugging
34  - mkdir -p ~/rust/cargo/bin
35  - cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
36  - PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy
37  - cd clippy_lints && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ..
38  - cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ..
39  - cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
40  - cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
41  - cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../../..
42  - PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy
43  - cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy && cd ../..
44  - set +e
45
46 after_success: |
47   #!/bin/bash
48   if [ $(uname) == Linux ]; then
49     ./.github/deploy.sh
50   # trigger rebuild of the clippy-service, to keep it up to date with clippy itself
51     set -e
52     if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
53        [ "$TRAVIS_REPO_SLUG" == "Manishearth/rust-clippy" ] &&
54        [ "$TRAVIS_BRANCH" == "master" ] &&
55        [ "$TRAVIS_TOKEN_CLIPPY_SERVICE" != "" ] ; then
56        curl -s -X POST \
57           -H "Content-Type: application/json" \
58           -H "Accept: application/json" \
59           -H "Travis-API-Version: 3" \
60           -H "Authorization: token $TRAVIS_TOKEN_CLIPPY_SERVICE" \
61           -d "{ \"request\": { \"branch\":\"master\" }}" \
62           https://api.travis-ci.org/repo/gnunicorn%2Fclippy-service/requests
63     else
64       echo "Ignored"
65     fi
66     set +e
67   fi