dist: xenial
language: minimal

env:
  - DOCKER=centos6
  - DOCKER=centos7
  - DOCKER=trusty
  - DOCKER=xenial

matrix:
  include:
  - language: cpp
    env:
    before_install:
    - sudo apt-get install -y libgnutls-dev libfltk1.3-dev fluid
    - sudo apt-get install -y libxtst-dev libxdamage-dev libxfixes-dev libxrandr-dev
    script:
    - cmake -DCMAKE_BUILD_TYPE=Debug . && make

  - language: java
    # We're not compatible with the newer java
    dist: trusty
    env:
    before_install: skip
    script:
    - cd java && cmake . && make

before_install:
  - docker build -t tigervnc/$DOCKER .travis/$DOCKER
script:
  - .travis/$DOCKER/build.sh
