diff --git a/.travis.sh b/.travis.sh index cba5909..120cbbe 100755 --- a/.travis.sh +++ b/.travis.sh @@ -46,11 +46,25 @@ build_only() { channel build -v --features 'serde bincode' } +run_clippy() { + # cached installation will not work on a later nightly + if [ -n "${TRAVIS}" ] && ! cargo install clippy --debug --force; then + echo "COULD NOT COMPILE CLIPPY, IGNORING CLIPPY TESTS" + exit + fi + + cargo clippy --features 'serde bincode rustc-serialize' -- -Dclippy +} + rustc --version cargo --version CHANNEL=nightly -build_and_test +if [ "x${CLIPPY}" = xy ] ; then + run_clippy +else + build_and_test +fi CHANNEL=beta build_and_test diff --git a/.travis.yml b/.travis.yml index 74a29cb..3b726d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,15 @@ os: matrix: allow_failures: - rust: nightly + env: CLIPPY=n + include: + - rust: nightly + env: CLIPPY=y + env: global: - LD_LIBRARY_PATH: /usr/local/lib + - CLIPPY: n script: ./.travis.sh notifications: email: false