sudo: false

language: rust

rust:
  - stable
  - beta
  - nightly

matrix:
  fast_finish: true
  allow_failures:
    - rust: nightly

addons:
  apt:
    packages: # recommanded versions for rust-bindgen
      - llvm-3.9-dev
      - libclang-3.9-dev
      - libsqlcipher-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 build --features sqlcipher
  - cargo build --features "bundled sqlcipher"
  - cargo test
  - cargo test --features "backup blob extra_check"
  - cargo test --features "collation functions"
  - cargo test --features "hooks limits"
  - cargo test --features load_extension
  - cargo test --features trace
  - cargo test --features chrono
  - cargo test --features serde_json
  - cargo test --features url
  - cargo test --features bundled
  - cargo test --features sqlcipher
  - cargo test --features i128_blob
  - cargo test --features uuid
  - cargo test --features "bundled unlock_notify window"
  - cargo test --features "array bundled csvtab series vtab"
  - cargo test --features "backup blob chrono collation csvtab functions hooks limits load_extension serde_json trace url uuid vtab"
  - cargo test --features "backup blob chrono collation csvtab functions hooks limits load_extension serde_json trace url uuid vtab buildtime_bindgen"
  - cargo test --features "backup blob chrono collation csvtab functions hooks limits load_extension serde_json trace url uuid vtab bundled"
  - cargo test --features "backup blob chrono collation csvtab functions hooks limits load_extension session serde_json trace url uuid vtab bundled buildtime_bindgen"
