os: linux
dist: trusty
language: python
python: 3.6
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
      - llvm-toolchain-trusty-5.0
    packages:
      - clang-format-5.0
      - g++-6
      - xsltproc

install:
  - export CC=gcc-6
  - export CXX=g++-6
  - make env


jobs:
  include:
    # State 1 - Tests
    - stage: "Tests"
      name: "C++ Tests"
      script: make test-cpp

    - name: "Python Tests"
      script: make test-py

    - name: "Format"
      script:
        - make format
        - test $(git status --porcelain | wc -l) -eq 0 || { git diff; false; }
