language: rust
sudo: false
env:
  - FEATURES='serde'
matrix:
  include:
    - rust: 1.36.0
      env:
      - FEATURES='array-sizes-33-128 array-sizes-129-255'
    - rust: stable
    - rust: stable
      env:
      - FEATURES='serde'
    - rust: stable
      env:
      - FEATURES='array-sizes-33-128 array-sizes-129-255'
    - rust: beta
    - rust: nightly
    - rust: nightly
      env:
      - FEATURES='serde'
    - rust: nightly
      env:
      - FEATURES='array-sizes-33-128 array-sizes-129-255'
    - rust: nightly
      env:
      - FEATURES='unstable-const-fn'
    - name: "miri"
      script: sh ci/miri.sh
branches:
  only:
    - master
    - 0.4
script:
  - |
      cargo build -v --no-default-features &&
      cargo build -v --features "$FEATURES" &&
      cargo test -v --features "$FEATURES" &&
      cargo test -v --release --features "$FEATURES" &&
      cargo bench -v --features "$FEATURES" --no-run &&
      cargo doc -v --features "$FEATURES" &&
      cargo build -v --manifest-path=nodrop/Cargo.toml &&
      cargo test -v --manifest-path=nodrop/Cargo.toml
