2018-05-04 02:19:36 -07:00
|
|
|
language: rust
|
2018-05-21 02:01:49 -07:00
|
|
|
rust:
|
2018-07-13 06:56:17 -07:00
|
|
|
- stable
|
|
|
|
cache:
|
|
|
|
cargo: true
|
|
|
|
timeout: 1200
|
2018-05-04 02:19:36 -07:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- unzip
|
|
|
|
before_install:
|
2018-08-09 06:44:57 -07:00
|
|
|
- if [ "$TRAVIS_SECURE_ENV_VARS" = true ]; then
|
|
|
|
openssl aes-256-cbc -K $encrypted_ab99677a831c_key -iv $encrypted_ab99677a831c_iv -in deploy_rsa.enc -out deploy_rsa -d;
|
|
|
|
fi
|
2018-07-13 06:56:17 -07:00
|
|
|
# The Rust stable toolchain is already installed, ${RUST_NEXT} is added to
|
|
|
|
# provide `cargo clippy` and `cargo fmt`.
|
|
|
|
- rustup toolchain install ${RUST_NEXT}
|
|
|
|
- rustup component add --toolchain=${RUST_NEXT} rustfmt-preview clippy-preview
|
|
|
|
# Some symlinking is still necessary for clippy to function properly.
|
2018-07-16 05:28:36 -07:00
|
|
|
- ln -sf ${HOME}/.rustup/toolchains/${RUST_NEXT}-x86_64-unknown-linux-gnu/bin/clippy-driver ${HOME}/.rustup/toolchains/${RUST_NEXT}-x86_64-unknown-linux-gnu/bin/cargo-clippy $HOME/.cargo/bin/
|
2018-08-10 05:32:33 -07:00
|
|
|
# after_failure:
|
|
|
|
# # Outputs the syslog after a failed build, e.g. to debug `SIGILL` occurrences.
|
|
|
|
# # Unfortunately this is likely to disable container-based travis images,
|
|
|
|
# # causing a CI slowdown, so this option is commented out by default. It can
|
|
|
|
# # be enabled per-branch to debug issues.
|
|
|
|
# - sudo tail -n 250 /var/log/syslog
|
2018-05-04 02:19:36 -07:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- RUST_BACKTRACE=1
|
|
|
|
- RUSTFLAGS="-D warnings"
|
2018-07-13 06:56:17 -07:00
|
|
|
# Note: Currently (as of 2018-07-13), `clippy-preview` is only in the nightly
|
|
|
|
# release. A version of `rustfmt` that supports the `--check` option
|
|
|
|
# is also not in stable yet.
|
|
|
|
#
|
|
|
|
# A Clear migration path is swapping out `nightly-2018-07-13` with
|
|
|
|
# `beta` after the stable release of Rust 1.28; and finally migrating
|
|
|
|
# everything to `stable` at Rust 1.29.
|
|
|
|
- RUST_NEXT=nightly-2018-07-13
|
2018-08-06 07:53:37 -07:00
|
|
|
- MLOCK_SECRETS=false
|
2018-05-08 07:20:32 -07:00
|
|
|
script:
|
2018-07-13 06:56:17 -07:00
|
|
|
- cargo +${RUST_NEXT} clippy -- --deny clippy
|
2018-07-17 06:54:12 -07:00
|
|
|
- cargo +${RUST_NEXT} clippy --tests --examples -- --deny clippy
|
2018-07-13 06:56:17 -07:00
|
|
|
- cargo +${RUST_NEXT} clippy --all-features -- --deny clippy
|
|
|
|
- cargo +${RUST_NEXT} clippy --all-features --tests -- --deny clippy
|
|
|
|
- cargo +${RUST_NEXT} fmt -- --check
|
2018-06-13 03:38:55 -07:00
|
|
|
- cargo test --all-features --release
|