]> git.lizzy.rs Git - rust.git/blob - .travis.yml
f72ac01bc3eb84983afbf033f7273f255b12d9cd
[rust.git] / .travis.yml
1 language: rust
2 rust: nightly
3 sudo: false
4
5 env:
6  global:
7    # TRAVIS_TOKEN_CLIPPY_SERVICE
8    secure: dj8SwwuRGuzbo2wZq5z7qXIf7P3p7cbSGs1I3pvXQmB6a58gkLiRn/qBcIIegdt/nzXs+Z0Nug+DdesYVeUPxk1hIa/eeU8p6mpyTtZ+30H4QVgVzd0VCthB5F/NUiPVxTgpGpEgCM9/p72xMwTn7AAJfsGqk7AJ4FS5ZZKhqFI=
9
10 script:
11  - python util/update_lints.py -c
12  - cargo build --features debugging
13  - rm -rf target/ Cargo.lock
14  - cargo test --features debugging
15
16 after_success:
17 # only test regex_macros if it compiles
18 - |
19     #!/bin/bash
20     cargo test --no-run --features 'debugging test-regex_macros'
21     if [ "$?" != 101 ]; then
22         cargo test --features 'debugging test-regex_macros' compile_test
23     fi
24 # trigger rebuild of the clippy-service, to keep it up to date with clippy itself
25 - |
26     #!/bin/bash
27     set -e
28     if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
29        [ "$TRAVIS_REPO_SLUG" == "Manishearth/rust-clippy" ] &&
30        [ "$TRAVIS_BRANCH" == "master" ] &&
31        [ "$TRAVIS_TOKEN_CLIPPY_SERVICE" != "" ] ; then
32
33        curl -s -X POST \
34             -H "Content-Type: application/json" \
35             -H "Accept: application/json" \
36             -H "Travis-API-Version: 3" \
37             -H "Authorization: token $TRAVIS_TOKEN_CLIPPY_SERVICE" \
38             -d "{ \"request\": { \"branch\":\"master\" }}" \
39             https://api.travis-ci.org/repo/ligthyear%2Fclippy-service/requests
40
41     else
42       echo "Ignored"
43     fi