]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Make style consistent
[rust.git] / .travis.yml
1 language: rust
2
3 rust: nightly
4
5 os:
6   - linux
7   - osx
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     if [ "$TRAVIS_OS_NAME" == "osx" ]; then
20      command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
21      rvm get stable
22     fi
23
24 install:
25   - . $HOME/.nvm/nvm.sh
26   - nvm install stable
27   - nvm use stable
28   - npm install remark-cli remark-lint
29
30 script:
31  - PATH=$PATH:./node_modules/.bin
32  - remark -f README.md > /dev/null
33  - set -e
34  - cargo build --features debugging
35  - cargo test --features debugging
36  - mkdir -p ~/rust/cargo/bin
37  - cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
38  - cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver
39  - PATH=$PATH:~/rust/cargo/bin cargo clippy --all -- -D clippy
40  - cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ..
41  - cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
42  - cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
43  - cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../../..
44  - PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy
45  - cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy && cd ../..
46  - set +e
47
48 after_success: |
49   #!/bin/bash
50   if [ $(uname) == Linux ]; then
51     ./.github/deploy.sh
52   # trigger rebuild of the clippy-service, to keep it up to date with clippy itself
53     set -e
54     if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
55        [ "$TRAVIS_REPO_SLUG" == "Manishearth/rust-clippy" ] &&
56        [ "$TRAVIS_BRANCH" == "master" ] &&
57        [ "$TRAVIS_TOKEN_CLIPPY_SERVICE" != "" ] ; then
58        curl -s -X POST \
59           -H "Content-Type: application/json" \
60           -H "Accept: application/json" \
61           -H "Travis-API-Version: 3" \
62           -H "Authorization: token $TRAVIS_TOKEN_CLIPPY_SERVICE" \
63           -d "{ \"request\": { \"branch\":\"master\" }}" \
64           https://api.travis-ci.org/repo/gnunicorn%2Fclippy-service/requests
65     else
66       echo "Ignored"
67     fi
68     set +e
69   fi