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"
30 case "$TRAVIS_OS_NAME" in
31 linux ) HOST=x86_64-unknown-linux-gnu;;
32 osx ) HOST=x86_64-apple-darwin;;
33 windows ) HOST=x86_64-pc-windows-msvc;;
35 - curl -sSL https://sh.rustup.rs | sh -s -- -y --default-host="$HOST" --default-toolchain=nightly --profile=minimal
36 - export PATH="$HOME/.cargo/bin:$PATH"
39 if [[ -z ${INTEGRATION} ]]; then
40 if ! rustup component add rustfmt; then
41 cargo install --git https://github.com/rust-lang/rustfmt --bin rustfmt
43 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
47 npm install remark-cli remark-lint
48 elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
49 choco install windows-sdk-10.1
53 # disabling the integration tests in forks should be done with
55 # but this is currently buggy travis-ci/travis-ci#9118
59 # Builds that are executed for every PR
61 # i686 toolchain could run on x86_64 system.
63 env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
68 - libssl-dev:i386 # openssl dev in Cargo.toml
69 if: branch IN (auto, try)
71 env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
73 # Builds that are only executed when a PR is r+ed or a try build is started
74 # We don't want to run these always because they go towards
75 # the build limit within the Travis rust-lang account.
76 # The jobs are approximately sorted by execution time
78 if: branch IN (auto, try)
79 - env: INTEGRATION=rust-lang/rls
80 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
81 - env: INTEGRATION=rust-lang/cargo
82 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
83 - env: INTEGRATION=rust-lang/chalk
84 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
85 - env: INTEGRATION=Geal/nom
86 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
87 - env: INTEGRATION=rust-lang/rustfmt
88 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
89 - env: INTEGRATION=hyperium/hyper
90 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
91 - env: INTEGRATION=rust-itertools/itertools
92 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
93 # FIXME: rustc ICE on `serde_test_suite`
94 # - env: INTEGRATION=serde-rs/serde
95 # if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
96 - env: INTEGRATION=rust-lang/stdarch
97 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
98 - env: INTEGRATION=rust-random/rand
99 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
100 - env: INTEGRATION=rust-lang/futures-rs
101 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
102 - env: INTEGRATION=Marwes/combine
103 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
104 - env: INTEGRATION=rust-lang-nursery/failure
105 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
106 - env: INTEGRATION=rust-lang/log
107 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
108 - env: INTEGRATION=chronotope/chrono
109 if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
112 env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
116 if [[ "$TRAVIS_BRANCH" == "auto" ]] || [[ "$TRAVIS_BRANCH" == "try" ]]; then
117 PR=$(echo "$TRAVIS_COMMIT_MESSAGE" | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
118 output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
119 python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
120 grep "^changelog: " | \
121 sed "s/changelog: //g")
122 if [[ -z "$output" ]]; then
123 echo "ERROR: PR body must contain 'changelog: ...'"
125 elif [[ "$output" = "none" ]]; then
126 echo "WARNING: changelog is 'none'"
133 SYSROOT=$(rustc --print sysroot)
134 case "$TRAVIS_OS_NAME" in
135 windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
136 linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
138 # See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
139 sudo mkdir -p /usr/local/lib
140 sudo find "$SYSROOT/lib" -maxdepth 1 -name '*.dylib' -exec ln -s {} /usr/local/lib \;
146 if [[ -n ${INTEGRATION} ]]; then
147 cargo test --test integration --features integration && sleep 5
149 ./ci/base-tests.sh && sleep 5
154 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
156 if [[ -z ${INTEGRATION} ]]; then
159 echo "Not deploying, because we're in an integration test run"