sudo: false

language: rust

rust:
  - stable
  - beta
  - nightly

matrix:
  allow_failures:
    - rust: nightly

addons:
  apt:
    sources:
      - llvm-toolchain-precise-3.9
      - ubuntu-toolchain-r-test
    packages: # recommanded versions for rust-bindgen
      - llvm-3.9-dev
      - libclang-3.9-dev

env: # specify the clang path for rust-bindgen
  - LIBCLANG_PATH=/usr/lib/llvm-3.9/lib

script:
  - cargo build
  - cargo build --features bundled
  - cargo test
  - cargo test --features backup
  - cargo test --features blob
  - cargo test --features functions
  - cargo test --features limits
  - cargo test --features load_extension
  - cargo test --features trace
  - cargo test --features chrono
  - cargo test --features serde_json
  - cargo test --features bundled
  - cargo test --features "backup blob chrono functions limits load_extension serde_json trace"
  - cargo test --features "backup blob chrono functions limits load_extension serde_json trace buildtime_bindgen"
  - cargo test --features "backup blob chrono functions limits load_extension serde_json trace bundled"
  - cargo test --features "backup blob chrono functions limits load_extension serde_json trace bundled buildtime_bindgen"
