language: rust
rust:
  - stable

language: rust
sudo: false
matrix:
  include:
    - rust: stable
      env:
       - FEATURES='serialize'
    - rust: nightly
      env:
       - FEATURES='serialize'
       - BENCH=1
script:
  - |
      cargo build --verbose --features "$FEATURES" &&
      cargo test --verbose --features "$FEATURES" &&
      ([ "$BENCH" != 1 ] || cargo bench --verbose --features "$FEATURES")

Use build matrix, and set 'serialize' feature in Travis build script
Use build matrix, and set 'serialize' feature in Travis build script
