language: rust
sudo: false
rust:
- stable
- beta
- nightly
env:
global:
# GH_TOKEN=...
- secure: "M0zf4QHGVR/VJe9ZKpqzeI2FpjoIuPMmiPvZBAt/wsHhb74JZzgcM5Kyf8c3PI6w8u345OTqxtrkuHdVfbw4oCSj/rRJ2EZQ69akX4c1R7sKAOGqC8WJJkzkuw9NCTSXnnuzO/LmNr0ECJ0h2jkxtcDZ/tAspsj9itSs6YVUoTubto+R7/JlD+PBDmkqTRMRKhkL7x/0I6Kjr6TtY9B2YLifaF42lumP/xtVHkJ25dVZy5bLuQpRNUkqRhltzTE759gJPM48nwvqCxDfWvrEHJvZmZaB6I6bePPBXfM+98sIncISU3gm2ikCvYUnlMrRDbqkgELlRIUNzu3PHrqtmZNdM4Bj7ieA8/Pp5caOSqVP7n9bNTwWnjggbyKPGl7EMNqP1GG5m0t7vHb7APvXZ4omHvskruKPXbb2om0BscoJhfYLJRperm1zi7VbaTDbFvm9lkplaCIQD8LH6iwfv9BqUl9G3eSo/4RyHXbad2N3Idvb3HcMbBGoR4+LJaIqmcJgi3pUJqI+xWcOYwRI9tynvy/p40X4XU1jSHEEpbhSjp8jGDII7cVQrk+tqaq937T/V+cCFmCw02e58nuwU7pRy1m5KYIea3W1jST3R+sjdI29awFHvmafftlZTtd8A+OEr8scQFcg+lwMjaO702oFid9FuRAzfCQ4AXbtmL4="
# CRATES_IO_TOKEN=...
- secure: "jDsL58LsqzfMnYVStYM9wF5skoeq9c1QC9ot91nogGjjEPgTx52Hzo3My//No38DhlHJ+6IzeVwQ/4h4ykyIcKeVuZAm3eJ7eX4D2DxXdNVwcdwD6OivzJQOTwg8jyXQpVAoov72ulRtUVx+egOx2Get3noWdTwqgv1P0Fgi2G7z4Bp+JS+CrA3DLlLMn93NtMUDT4Muvb9dYuB1UR7/nlCb8577lpwNBlRYEte4U9gAywBAkFrB+XoEgK3YLgnksFdNFeaH3CazkajRXjpUbgo6n5Uw+u3QVJWYx6y7QY5xnimKI2k6pkYaKuwK0+fUjtx68XjN6J62jHxHpbx/wQztKg05dT1xxKhx8jkJ6ntKoshS6/7uK9pHRon5VwjhdaksEi/bKt6bb4F31CR+j2uqoP2CwOjFXMhQGZLH/wjGNkvS7hewPq3qeOlVU3ttWN2cJgvdlykR6w/tvkGFsS05pnYQQraUSpVX9LB9MpV40VJ3ZlRIfB15GpY4DiYh8eu8r9mMkXOtHDmxkYuTsgY4aPrt+toYdyHqq3vvn+s6DqeGEs+VSntuC5KBLUm59lGCFiw2sJMXFlDCMmyx2oAGdLhwZJ5jRGWlVlQjlc0Vcwk+bA4MZA2QMJjNS8Ql4uIGihOrNGL/505no/S77huq6g/1iHS7MpmB1CJNrqY="
matrix:
allow_failures:
- rust: nightly
before_install:
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
rustup component add clippy;
fi
script:
- cargo build -v --no-default-features
- cargo build -v
- cargo test -v
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
cargo clippy -v;
fi
before_deploy:
# Login to cates.io
- cargo login -v "${CRATES_IO_TOKEN}"
# Build crate
- cargo package -v
# Build docs
- cargo doc -v
- echo "<meta http-equiv=refresh content=0;url=accurate/index.html>" >> target/doc/index.html
deploy:
# Build and upload documentation to GitHub pages
- provider: pages
github_token: $GH_TOKEN
local_dir: target/doc
skip_cleanup: true
on:
tags: true
condition: "${TRAVIS_RUST_VERSION} = stable"
# Deploy the crate to crates.io
- provider: script
script: ci/deploy-crate.sh
skip_cleanup: true
on:
tags: true
condition: "${TRAVIS_RUST_VERSION} = stable"
# Deploy crate to GitHub releases
- provider: releases
api_key: $GH_TOKEN
file: "target/package/accurate-${TRAVIS_TAG}.crate"
skip_cleanup: true
on:
tags: true
condition: "${TRAVIS_RUST_VERSION} = stable"