]> git.lizzy.rs Git - rust.git/blob - .travis.yml
also cache files in clippy_lints, necessary for testing cargo-clippy
[rust.git] / .travis.yml
1 language: rust
2 rust: nightly
3 sudo: false
4 cache:
5   cargo: true
6   directories:
7   - clippy_lints/target
8
9 env:
10  global:
11    # TRAVIS_TOKEN_CLIPPY_SERVICE
12    secure: dj8SwwuRGuzbo2wZq5z7qXIf7P3p7cbSGs1I3pvXQmB6a58gkLiRn/qBcIIegdt/nzXs+Z0Nug+DdesYVeUPxk1hIa/eeU8p6mpyTtZ+30H4QVgVzd0VCthB5F/NUiPVxTgpGpEgCM9/p72xMwTn7AAJfsGqk7AJ4FS5ZZKhqFI=
13
14 install:
15   - . $HOME/.nvm/nvm.sh
16   - nvm install stable
17   - nvm use stable
18   - npm install remark-cli remark-lint
19
20 script:
21  - set -e
22  - remark -f README.md > /dev/null
23  - python util/update_lints.py -c
24  - cargo build --features debugging
25  - cargo test --features debugging
26  - mkdir -p ~/rust/cargo/bin
27  - cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
28  - PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy
29  - cd clippy_lints && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ..
30
31 after_success:
32 - ./.github/deploy.sh
33 # trigger rebuild of the clippy-service, to keep it up to date with clippy itself
34 - |
35     #!/bin/bash
36     set -e
37     if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
38        [ "$TRAVIS_REPO_SLUG" == "Manishearth/rust-clippy" ] &&
39        [ "$TRAVIS_BRANCH" == "master" ] &&
40        [ "$TRAVIS_TOKEN_CLIPPY_SERVICE" != "" ] ; then
41
42        curl -s -X POST \
43             -H "Content-Type: application/json" \
44             -H "Accept: application/json" \
45             -H "Travis-API-Version: 3" \
46             -H "Authorization: token $TRAVIS_TOKEN_CLIPPY_SERVICE" \
47             -d "{ \"request\": { \"branch\":\"master\" }}" \
48             https://api.travis-ci.org/repo/ligthyear%2Fclippy-service/requests
49
50     else
51       echo "Ignored"
52     fi