language: rust
matrix:
include:
- rust: stable
- rust: beta
branches:
only:
- dev
- rust: nightly
branches:
only:
- dev
# Allow nightly build to fail
allow_failures:
- rust: nightly
# Don't wait for nightly to finish building to mark a run as passed
# (since its failure won't affect the overall pass/fail status of the run)
fast_finish: true
script:
- cargo build --verbose
- cargo test --verbose
# Run benchmarks after success so they don't interfere with the cache
after_success:
- ./benchmark.sh
# Need to cache the whole `.cargo` directory to keep .crates.toml for
# cargo-update to work
cache:
directories:
- /home/travis/.cargo
# But don't cache the cargo registry
before_cache:
- rm -rf /home/travis/.cargo/registry