language: cpp
dist: bionic

notifications:
    email: false

cache:
    - apt
    - ccache

git:
    depth: 3

addons:
    apt:
        packages:
            - qtbase5-dev
            - libqt5opengl5-dev
            - zlib1g-dev
            - libosmesa6-dev
            - libssl-dev
            - libqwt-dev
            - libfreetype6-dev
            - libftgl-dev

env:
    global:
        - OMP_NUM_THREADS=4

before_install:
    - mkdir ../build
    - cd ../build

script:
    - cmake -D CMAKE_CXX_FLAGS="-W -Wall -Wno-narrowing" -D CMAKE_BUILD_TYPE=Release -D WORKBENCH_MESA_DIR=/usr ../workbench/src
    - make -j 4
    - ctest
