10 # Don't build these branches
20 - cargo install -Z install-upgrade cargo-cache --debug
21 - cargo cache --autoclean
26 - secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
29 - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
30 - export PATH="$HOME/.cargo/bin:$PATH"
33 if [[ -z ${INTEGRATION} ]]; then
34 if ! rustup component add rustfmt; then
35 cargo install -Z install-upgrade --git https://github.com/rust-lang/rustfmt --bin rustfmt
37 if [ "$TRAVIS_OS_NAME" == "linux" ]; then
41 npm install remark-cli remark-lint
43 if [ "$TRAVIS_OS_NAME" == "windows" ]; then
44 choco install windows-sdk-10.1
48 # disabling the integration tests in forks should be done with
50 # but this is currently buggy travis-ci/travis-ci#9118
54 # Builds that are executed for every PR
55 - os: osx # run base tests on both platforms
60 env: CARGO_INCREMENTAL=0 BASE_TESTS=true OS_WINDOWS=true
62 # Builds that are only executed when a PR is r+ed or a try build is started
63 # We don't want to run these always because they go towards
64 # the build limit within the Travis rust-lang account.
65 # The jobs are approximately sorted by execution time
66 - env: INTEGRATION=rust-lang/cargo
67 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
68 - env: INTEGRATION=rust-lang-nursery/chalk
69 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
70 - env: INTEGRATION=rust-lang/rls
71 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
72 - env: INTEGRATION=Geal/nom
73 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
74 - env: INTEGRATION=rust-lang/rustfmt
75 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
76 - env: INTEGRATION=hyperium/hyper
77 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
78 - env: INTEGRATION=bluss/rust-itertools
79 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
80 - env: INTEGRATION=serde-rs/serde
81 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
82 - env: INTEGRATION=rust-lang-nursery/stdsimd
83 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
84 - env: INTEGRATION=rust-random/rand
85 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
86 - env: INTEGRATION=rust-lang-nursery/futures-rs
87 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
88 - env: INTEGRATION=Marwes/combine
89 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
90 - env: INTEGRATION=rust-lang-nursery/failure
91 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
92 - env: INTEGRATION=rust-lang-nursery/log
93 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
94 - env: INTEGRATION=chronotope/chrono
95 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
98 env: CARGO_INCREMENTAL=0 BASE_TESTS=true OS_WINDOWS=true
99 # prevent these jobs with default env vars
107 if [ "$TRAVIS_BRANCH" == "auto" ] || [ "$TRAVIS_BRANCH" == "try" ]; then
108 pr=$(echo $TRAVIS_COMMIT_MESSAGE | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
109 output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$pr" | \
110 python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
111 grep "^changelog: " | \
112 sed "s/changelog: //g")
113 if [ -z "$output" ]; then
114 echo "ERROR: PR body must contain 'changelog: ...'"
116 elif [ "$output" = "none" ]; then
117 echo "WARNING: changelog is 'none'"
124 if [ "$TRAVIS_OS_NAME" == "windows" ]; then
125 export PATH=$PATH:$(rustc --print sysroot)/bin
127 export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
132 if [ -z ${INTEGRATION} ]; then
133 travis_wait 30 ./ci/base-tests.sh && sleep 5
135 ./ci/integration-tests.sh && sleep 5
140 if [ "$TRAVIS_OS_NAME" == "linux" ]; then
142 if [ -z ${INTEGRATION} ]; then
145 echo "Not deploying, because we're in an integration test run"