language: c

dist: trusty

addons:
  apt:
    packages:
    - libsdl2-dev
    - cmake-data
    - cmake
    - doxygen
    - graphviz

branches:
  only:
    - master
    

matrix:
  include:
  - os: linux
    compiler: gcc
    after_success:
    - tar -zcvf SDL_gpu-bin-linux-gcc.tar.gz lib
    - tar -zcvf SDL_gpu-docs.tar.gz html
#    - cd ..
#    - git tag -d latest-linux-gcc;
#    - git push origin :latest-linux-gcc
#    - cd build
#    deploy:
#      provider: pages
#      skip_cleanup: true
#      github_token: $GithubDocsToken
#      local_dir: html
#      on:
#        branch: master
#    deploy:
#      provider: releases
#      skip_cleanup: true
#      tag_name: latest-linux-gcc
#      overwrite: true
#      prerelease: true
#      file:
#      - SDL_gpu-bin-linux-gcc.tar.gz
#      - SDL_gpu-docs.tar.gz
#      api_key:
#        secure: $GithubDocsToken
#      name: "Automated Linux GCC build"
#      on:
#        branch: master
  - os: linux
    compiler: clang
  - os: osx
    compiler: gcc
    before_install:
    - brew update
    - brew install
        sdl2
  - os: osx
    compiler: clang
    before_install:
    - brew update
    - brew install
        sdl2


before_script:
    - if [[ "$BUILD" == "native" ]]; then
      $CC --version;
      cmake --version;
      sdl2-config --version;
      fi
    - mkdir build
    - cd build
    - cmake -DBUILD_DEMOS=ON -DBUILD_TESTS=ON -DBUILD_TOOLS=ON -DBUILD_SHARED=ON -DBUILD_STATIC=ON ..

script: make