dist: xenial
language: minimal

env:
  - DOCKER=centos7
  - DOCKER=xenial
  - DOCKER=bionic

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
    # compile with java 8 for backwards compatibility
    dist: xenial
    env:
    jdk: openjdk8
    before_install:
    - sudo apt-get -y install openjdk-8-jdk
    addons:
      apt:
        update: true
    script:
    - cd java && cmake . && make

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