language: cpp

sudo: required

dist: trusty

compiler:
  - gcc
  - clang

branches:
  only:
    - master

env:
  global:
    - RENDERDOC_TRAVIS_BUILD=1 RENDERDOC_CI_BUILD=1
  matrix:
    - CODE_BUILD=1 LINUX_BUILD=1 DOCS_BUILD=0

# only build docs once on linux
matrix:
  include:
    - compiler: gcc
      env: CODE_BUILD=0 LINUX_BUILD=0 DOCS_BUILD=1

# install dependencies
install:
  - sudo apt-get update -qq
  - if [ $CODE_BUILD ]; then sudo apt-get install -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qt5-default libqt5x11extras5-dev libxcb-keysyms1-dev ; fi
  - if [ $DOCS_BUILD ]; then sudo apt-get install -y -qq python-sphinx python-sphinx-rtd-theme ; fi

script:
  - sh ./hash_version.sh
  - if [ $CODE_BUILD ]; then make ; fi
  - if [ $DOCS_BUILD ]; then cd docs/ && make html ; fi

language: cpp

sudo: required

dist: trusty

compiler:
  - gcc
  - clang

branches:
  only:
    - master

env:
  global:
    - RENDERDOC_TRAVIS_BUILD=1 RENDERDOC_CI_BUILD=1
  matrix:
    - CODE_BUILD=1 LINUX_BUILD=1 DOCS_BUILD=0

# only build docs once on linux
matrix:
  fast_finish: true
  include:
    - compiler: gcc
      env: CODE_BUILD=0 LINUX_BUILD=0 DOCS_BUILD=1

# install dependencies
install:
  - sudo apt-get update -qq
  - if [[ "$CODE_BUILD" == "1" ]]; then sudo apt-get install -y -qq libx11-dev mesa-common-dev libgl1-mesa-dev qt5-default libqt5x11extras5-dev libxcb-keysyms1-dev ; fi
  - if [[ "$DOCS_BUILD" == "1" ]]; then sudo apt-get install -y -qq python-sphinx python-sphinx-rtd-theme ; fi

script:
  - sh ./hash_version.sh
  - if [[ "$CODE_BUILD" == "1" ]]; then make ; fi
  - if [[ "$DOCS_BUILD" == "1" ]]; then cd docs/ && make html ; fi

Set matrix to fast_finish, fix bash if to actually check value
Travis: Set matrix to fast_finish, fix bash if to actually check value
