language: cpp
os: osx
osx_image: xcode7.3

env:
  - BUILD_TOOL=Xcode
  - BUILD_TOOL=CMake

git:
  submodules: false

branches:
  only:
    - master

compiler:
  - clang

before_script:
  # Take care of dependencies.
  - sed -i '' 's/git@github.com:/https:\/\/github.com\//' .gitmodules
  - ./setup.sh
  - >
    xcodebuild -configuration Release -target emptyExample
    -project "third-party/openFrameworks/scripts/templates/osx/emptyExample.xcodeproj"
  # CMake
  - >
    if [ "$BUILD_TOOL" = "CMake" ]; then
      mkdir build
      cd build
      cmake ..
    fi
script:
  - >
    if [ "$BUILD_TOOL" = "CMake" ]; then
      make;
    fi;
  - >
    if [ "$BUILD_TOOL" = "Xcode" ]; then
      xcodebuild -configuration Release -target ESP -project "Xcode/ESP/ESP.xcodeproj"
    fi
cache:
  directories:
    - third-party/openFrameworks/libs

language: cpp
os: osx
osx_image: xcode7.3

env:
  - BUILD_TOOL=Xcode
  - BUILD_TOOL=CMake

git:
  submodules: false

branches:
  only:
    - master

compiler:
  - clang

before_script:
  # Take care of dependencies.
  - sed -i '' 's/git@github.com:/https:\/\/github.com\//' .gitmodules
  - ./setup.sh
  - >
    xcodebuild -configuration Release -target emptyExample
    -project "third-party/openFrameworks/scripts/templates/osx/emptyExample.xcodeproj"
  # CMake
  - >
    if [ "$BUILD_TOOL" = "CMake" ]; then
      mkdir build
      cd build
      cmake ..
    fi
script:
  - >
    if [ "$BUILD_TOOL" = "CMake" ]; then
      USER_CPP=Xcode/ESP/src/user.cpp
      EXAMPLES=Xcode/ESP/src/examples/*
      for f in $EXAMPLES
      do
        name=$(basename "$f")
        echo "Compiling example: $f ..."
        echo "#include \"user.h\"" > $USER_CPP
        echo "#include \"examples/$name\"" >> $USER_CPP
        make -j4;
      done
    fi;
  - >
    if [ "$BUILD_TOOL" = "Xcode" ]; then
      xcodebuild -configuration Release -target ESP -project "Xcode/ESP/ESP.xcodeproj"
    fi
cache:
  directories:
    - third-party/openFrameworks/libs

Build all examples in Travis
Build all examples in Travis
