5 # Don't build these branches
15 - cargo install -Z install-upgrade cargo-cache --debug
16 - find $HOME/.cargo/bin/ ! -type d -exec strip {} \;
17 - cargo cache --autoclean
22 - secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
25 - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
26 - export PATH="$HOME/.cargo/bin:$PATH"
29 if [[ -z ${INTEGRATION} ]]; then
30 if ! rustup component add rustfmt; then
31 cargo install -Z install-upgrade --git https://github.com/rust-lang/rustfmt --bin rustfmt
33 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
37 npm install remark-cli remark-lint
38 elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
39 choco install windows-sdk-10.1
43 # disabling the integration tests in forks should be done with
45 # but this is currently buggy travis-ci/travis-ci#9118
49 # Builds that are executed for every PR
50 - os: osx # run base tests on both platforms
53 env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
55 # Builds that are only executed when a PR is r+ed or a try build is started
56 # We don't want to run these always because they go towards
57 # the build limit within the Travis rust-lang account.
58 # The jobs are approximately sorted by execution time
59 - env: INTEGRATION=rust-lang/cargo
60 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
61 - env: INTEGRATION=rust-lang-nursery/chalk
62 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
63 - env: INTEGRATION=rust-lang/rls
64 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
65 - env: INTEGRATION=Geal/nom
66 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
67 # FIXME blocked on https://github.com/rust-lang/rust-clippy/issues/4742
68 #- env: INTEGRATION=rust-lang/rustfmt
69 # if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
70 - env: INTEGRATION=hyperium/hyper
71 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
72 - env: INTEGRATION=bluss/rust-itertools
73 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
74 - env: INTEGRATION=serde-rs/serde
75 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
76 - env: INTEGRATION=rust-lang-nursery/stdsimd
77 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
78 - env: INTEGRATION=rust-random/rand
79 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
80 - env: INTEGRATION=rust-lang-nursery/futures-rs
81 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
82 - env: INTEGRATION=Marwes/combine
83 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
84 - env: INTEGRATION=rust-lang-nursery/failure
85 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
86 - env: INTEGRATION=rust-lang-nursery/log
87 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
88 - env: INTEGRATION=chronotope/chrono
89 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
92 env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
93 - env: INTEGRATION=rust-lang-nursery/stdsimd
97 if [[ "$TRAVIS_BRANCH" == "auto" ]] || [[ "$TRAVIS_BRANCH" == "try" ]]; then
98 PR=$(echo "$TRAVIS_COMMIT_MESSAGE" | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
99 output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
100 python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
101 grep "^changelog: " | \
102 sed "s/changelog: //g")
103 if [[ -z "$output" ]]; then
104 echo "ERROR: PR body must contain 'changelog: ...'"
106 elif [[ "$output" = "none" ]]; then
107 echo "WARNING: changelog is 'none'"
114 SYSROOT=$(rustc --print sysroot)
115 case "$TRAVIS_OS_NAME" in
116 windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
117 linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib" ;;
119 # See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
120 sudo mkdir -p /usr/local/lib
121 sudo find "$SYSROOT/lib" -maxdepth 1 -name '*.dylib' -exec ln -s {} /usr/local/lib \;
127 if [[ -n ${INTEGRATION} ]]; then
128 ./ci/integration-tests.sh && sleep 5
130 ./ci/base-tests.sh && sleep 5
135 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
137 if [[ -z ${INTEGRATION} ]]; then
140 echo "Not deploying, because we're in an integration test run"