sudo: required

language: cpp

notifications:
  email:
    on_success: never
    on_failure: always

before_install:
  - . ./BuildTools/Scripts/travis/before_install.sh

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - gcc-7
      - g++-7
      - cmake

matrix:
  include:
  - os: linux
    compiler: gcc
    env: 
      - CONFIG=Debug
  - os: osx
    compiler: clang
    env: 
      - CONFIG=Debug
      - IOS=false
  - os: osx
    compiler: clang
    env: 
      - CONFIG=Debug
      - IOS=true
  - os: linux
    compiler: gcc
    env:
      - CONFIG=Release
  - os: osx
    compiler: clang
    env: 
      - CONFIG=Release
      - IOS=false
  - os: osx
    compiler: clang
    env: 
      - CONFIG=Release
      - IOS=true

script:
  - cd ./BuildTools/FormatValidation
  - . ../Scripts/travis/validate_format.sh
  - cd ../..
  - . ./BuildTools/Scripts/travis/build_install.sh

after_success:

  - cd ../build/install
  - export ZIP_NAME=DiligentCore-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip;
  - zip -r ${ZIP_NAME} .
