language: c
compiler:
  - clang
  - gcc
install: skip

env:
  global:
    - PROCS=2
    - secure: "Zh2oYit2y9TJb0U1omqoN2UMxVJAn08pJKTPOxHEsFOkDrNaLI2rptXYRJ1TjRNpOKc6FXDYt+Ut0lIehmJ9qOcBFs2sn6laRitytiA5eBrKdifyaJCNvF2PyZWgilRBBN2DyFJQJmWQRLz3w/bWbyHSpD10g6P0n92FGHXMyUEAqq0swmGE9HVug8cZYnJ8DfUGyHHp0+sxWOIKCVzi+UHisCGIYs4xkvidV7D0dVNIM3CsZfBvyNeRRtOzwsGVqx07PVjIWPjo9KZ38ndgz+sk3b74Ip/fYQ0iEGlZ6U+t+lMGBq1kZVMewSjgcStYI8lV5FedIlNK2bVoUQdta6uQi1kg7tJYmyM9FPiQ+SEN2WyoRg54Rr/Xaw9CGwP3qZ2FcL3TWBKLY3EKm2TJGxqhtqJt9pgbNoVimeH5KvyYZB2mdd3eK7a3Zf4TobTy0qcuKxXDI9UpkUsrp2WmTppXzuradBU0IjBGsaIbwGJSWyhq1l7U0Jl2qF2vXf0HckUVDZOieEEtGQxrJeX+BtM0N7hQ674T74LCQ9xuHdL9ZEcyxGk8fzKkB5aLSW3j+1i9E4tq9Ycf085ISCWmp1lbpXQj5JDZbiw9GxoGXPJfW0VKlKP7NUd1eSq16Ym37DcVUuXyPJobyxe7DujoZbeRXLMEA1pVeJU6ZEp9+BA="
  matrix:
    - TARGET=test
    - OS=el DIST=6
    - OS=el DIST=7
    - OS=fedora DIST=24
    - OS=fedora DIST=25
    - OS=ubuntu DIST=precise
    - OS=ubuntu DIST=trusty
    - OS=ubuntu DIST=xenial
    - OS=ubuntu DIST=yakkety
    - OS=debian DIST=wheezy
    - OS=debian DIST=jessie
    - OS=debian DIST=stretch

before_script:
  - (
      mkdir build;
      cd build;
      cmake .. -DCMAKE_BUILD_TYPE=Release -DLEXBOR_BUILD_TESTS=ON
    )

script:
  - make -C build -j${PROCS}
  - make test -C build -j${PROCS}

addons:
  apt:
    sources:
      - george-edison55-precise-backports
    packages:
      - cmake-data
      - cmake
  coverity_scan:
    project:
      name: "lexborisov/lexbor"
      description: "Lexbor is an open source HTML Renderer library"
    notification_email: lex.borisov@gmail.com
    build_command_prepend: "cmake . -DLEXBOR_BUILD_TESTS=ON"
    build_command: "make -j"
    branch_pattern: coverity_scan
