sudo: required
dist: trusty
language: cpp

branches:
  only:
    - master

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      # Modern GCC
      - gcc-5
      - g++-5
      # Vortex2D dependencies
      - cmake
      - doxygen
      # GLFW3 dependencies
      - libxrandr-dev
      - libxinerama-dev
      - libxcursor-dev
      - libxi-dev

cache: ccache

install:
# Doxyrest
 - pip install --user sphinx sphinx_rtd_theme breathe
# LunarG SDK install
 - wget https://vulkan.lunarg.com/sdk/download/1.1.77.0/linux/vulkansdk-linux-x86_64-1.1.77.0.run
 - chmod +x vulkansdk-linux-x86_64-1.1.77.0.run
 - ./vulkansdk-linux-x86_64-1.1.77.0.run
 - cd VulkanSDK/1.1.77.0/
 - . setup-env.sh

script:
  - cd ${TRAVIS_BUILD_DIR}
  - mkdir build && cd build
  - cmake .. -DVORTEX2D_ENABLE_TESTS=On -DVORTEX2D_ENABLE_EXAMPLES=On -DVORTEX2D_ENABLE_DOCS=On -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5
  - make -j 4

sudo: required
dist: trusty
language: cpp

branches:
  only:
    - master

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      # Modern GCC
      - gcc-5
      - g++-5
      # Vortex2D dependencies
      - cmake
      - doxygen
      # GLFW3 dependencies
      - libxrandr-dev
      - libxinerama-dev
      - libxcursor-dev
      - libxi-dev

cache: ccache

install:
# Doxyrest
 - pip install --user sphinx sphinx_rtd_theme breathe
# LunarG SDK install
 - wget https://vulkan.lunarg.com/sdk/download/1.1.77.0/linux/vulkansdk-linux-x86_64-1.1.77.0.tar.gz
 - tar xf vulkansdk-linux-x86_64-1.1.77.0.tar.gz
 - cd 1.1.77.0/
 - . setup-env.sh

script:
  - cd ${TRAVIS_BUILD_DIR}
  - mkdir build && cd build
  - cmake .. -DVORTEX2D_ENABLE_TESTS=On -DVORTEX2D_ENABLE_EXAMPLES=On -DVORTEX2D_ENABLE_DOCS=On -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5
  - make -j 4

Correct linux vulkan sdk extraction
Correct linux vulkan sdk extraction