hbbft/.travis.yml

47 lines
2.0 KiB
YAML

language: rust
rust:
- stable
cache:
cargo: true
timeout: 1200
addons:
apt:
packages:
- unzip
before_install:
- 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
# 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.
- 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/
# 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
env:
global:
- RUST_BACKTRACE=1
- RUSTFLAGS="-D warnings"
# 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
- MLOCK_SECRETS=false
script:
- cargo +${RUST_NEXT} clippy -- --deny clippy
- cargo +${RUST_NEXT} clippy --tests --examples -- --deny clippy
- cargo +${RUST_NEXT} clippy --all-features -- --deny clippy
- cargo +${RUST_NEXT} clippy --all-features --tests -- --deny clippy
- cargo +${RUST_NEXT} fmt -- --check
- cargo test --all-features --release