language: rust
sudo: false
env:
  - FEATURES='serde-1'
matrix:
  include:
    - rust: 1.12.0
    - rust: stable
      env:
        - NODEFAULT=1
    - rust: beta
    - rust: nightly
      env:
        - NODEFAULT=1
    - rust: nightly
      env:
      - NODROP_FEATURES='use_needs_drop'
    - rust: nightly
      env:
      - FEATURES='serde use_union'
      - NODROP_FEATURES='use_union'
branches:
  only:
    - master
    - 0.3
script:
  - |
      ([ ! -z "$NODROP_FEATURES" ] || cargo build --verbose --features "$FEATURES") &&
      ([ "$NODEFAULT" != 1 ] || cargo build --verbose --no-default-features) &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo test --verbose --features "$FEATURES") &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo test --release --verbose --features "$FEATURES") &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo bench --verbose --features "$FEATURES" -- --test) &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo doc --verbose --features "$FEATURES") &&
      ([ "$NODEFAULT" != 1 ] || cargo build --verbose --manifest-path=nodrop/Cargo.toml --no-default-features) &&
      cargo test --verbose --manifest-path=nodrop/Cargo.toml --features "$NODROP_FEATURES" &&
      cargo bench --verbose --manifest-path=nodrop/Cargo.toml --features "$NODROP_FEATURES" -- --test

language: rust
sudo: false
env:
  - FEATURES='serde-1'
matrix:
  include:
    - rust: 1.18.0
    - rust: stable
      env:
        - NODEFAULT=1
    - rust: beta
    - rust: nightly
      env:
        - NODEFAULT=1
    - rust: nightly
      env:
      - NODROP_FEATURES='use_needs_drop'
    - rust: nightly
      env:
      - FEATURES='serde use_union'
      - NODROP_FEATURES='use_union'
branches:
  only:
    - master
    - 0.3
script:
  - |
      ([ ! -z "$NODROP_FEATURES" ] || cargo build --verbose --features "$FEATURES") &&
      ([ "$NODEFAULT" != 1 ] || cargo build --verbose --no-default-features) &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo test --verbose --features "$FEATURES") &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo test --release --verbose --features "$FEATURES") &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo bench --verbose --features "$FEATURES" -- --test) &&
      ([ ! -z "$NODROP_FEATURES" ] || cargo doc --verbose --features "$FEATURES") &&
      ([ "$NODEFAULT" != 1 ] || cargo build --verbose --manifest-path=nodrop/Cargo.toml --no-default-features) &&
      cargo test --verbose --manifest-path=nodrop/Cargo.toml --features "$NODROP_FEATURES" &&
      cargo bench --verbose --manifest-path=nodrop/Cargo.toml --features "$NODROP_FEATURES" -- --test

Test in Travis from Rust 1.18
FEAT: Test in Travis from Rust 1.18
