8 # Don't build these branches
18 - cargo install cargo-cache --debug
19 - find $HOME/.cargo/bin/ ! -type d -exec strip {} \;
20 - cargo cache --autoclean
25 - secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
28 - export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
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 --git https://github.com/rust-lang/rustfmt --bin rustfmt
37 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
41 npm install remark-cli remark-lint
42 elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
43 choco install windows-sdk-10.1
47 # disabling the integration tests in forks should be done with
49 # but this is currently buggy travis-ci/travis-ci#9118
53 # Builds that are executed for every PR
55 # i686 toolchain could run on x86_64 system.
57 env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
62 - libssl-dev:i386 # openssl dev in Cargo.toml
63 if: branch IN (auto, try)
65 env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
67 # Builds that are only executed when a PR is r+ed or a try build is started
68 # We don't want to run these always because they go towards
69 # the build limit within the Travis rust-lang account.
70 # The jobs are approximately sorted by execution time
72 if: branch IN (auto, try)
73 - env: INTEGRATION=rust-lang/rls
74 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
75 - env: INTEGRATION=rust-lang/cargo
76 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
77 - env: INTEGRATION=rust-lang/chalk
78 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
79 - env: INTEGRATION=Geal/nom
80 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
81 - env: INTEGRATION=rust-lang/rustfmt
82 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
83 - env: INTEGRATION=hyperium/hyper
84 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
85 - env: INTEGRATION=bluss/rust-itertools
86 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
87 # FIXME: rustc ICE on `serde_test_suite`
88 # - env: INTEGRATION=serde-rs/serde
89 # if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
90 - env: INTEGRATION=rust-lang-nursery/stdsimd
91 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
92 - env: INTEGRATION=rust-random/rand
93 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
94 - env: INTEGRATION=rust-lang-nursery/futures-rs
95 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
96 - env: INTEGRATION=Marwes/combine
97 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
98 - env: INTEGRATION=rust-lang-nursery/failure
99 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
100 - env: INTEGRATION=rust-lang-nursery/log
101 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
102 - env: INTEGRATION=chronotope/chrono
103 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
106 env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
110 if [[ "$TRAVIS_BRANCH" == "auto" ]] || [[ "$TRAVIS_BRANCH" == "try" ]]; then
111 PR=$(echo "$TRAVIS_COMMIT_MESSAGE" | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
112 output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
113 python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
114 grep "^changelog: " | \
115 sed "s/changelog: //g")
116 if [[ -z "$output" ]]; then
117 echo "ERROR: PR body must contain 'changelog: ...'"
119 elif [[ "$output" = "none" ]]; then
120 echo "WARNING: changelog is 'none'"
127 SYSROOT=$(rustc --print sysroot)
128 case "$TRAVIS_OS_NAME" in
129 windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
130 linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
132 # See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
133 sudo mkdir -p /usr/local/lib
134 sudo find "$SYSROOT/lib" -maxdepth 1 -name '*.dylib' -exec ln -s {} /usr/local/lib \;
140 if [[ -n ${INTEGRATION} ]]; then
141 cargo test --test integration --features integration && sleep 5
143 ./ci/base-tests.sh && sleep 5
148 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
150 if [[ -z ${INTEGRATION} ]]; then
153 echo "Not deploying, because we're in an integration test run"