Here is what I ended up using. Adding feature flags in the nightly and skipping benchmarks in stable (beta right now).
.travis.yml
language: rust
rust:
- nightly
- beta
script:
- ./travis_cargo.sh build --verbose
- ./travis_cargo.sh test --verbose
- ./travis_cargo.sh bench --verbose
- ./travis_cargo.sh doc --verbose
travis_cargo.sh
#!/bin/sh
FEATURES=
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
FEATURES="--features unstable"
else
if [ "$1" = "bench" ]; then exit 0; fi
fi
exec cargo "$@" $FEATURES