branches:
  only:
    - master
os:
  - osx
  - linux
matrix:
  include:
    - os: osx
      osx_image:
        - xcode7.3
        - xcode8
      language: objective-c
    - os: linux
      language: generic
      sudo: required
      dist: trusty
env:
  global:
    - LC_CTYPE=en_US.UTF-8
    - LANG=en_US.UTF-8
    - FRAMEWORK_NAME="Sage"
    - SWIFT_VERSION=swift-3.0-PREVIEW-2
    - SWIFTENV_INSTALL="https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh"
before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then gem install xcpretty -N; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then eval "$(curl -sL $SWIFTENV_INSTALL)"; fi
script:
  - |
    if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
      swift build
      swift test
    elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      xcodebuild -version
      xcodebuild
        -project $FRAMEWORK_NAME.xcodeproj
        -scheme "$FRAMEWORK_NAME macOS"
        ONLY_ACTIVE_ARCH=YES test
        | xcpretty -c
      xcodebuild
        -project $FRAMEWORK_NAME.xcodeproj
        -scheme "$FRAMEWORK_NAME iOS"
        -sdk iphonesimulator
        -destination "platform=iOS Simulator,name=iPhone 6"
        ONLY_ACTIVE_ARCH=NO
        test
        | xcpretty -c
      xcodebuild
        -project $FRAMEWORK_NAME.xcodeproj
        -scheme "$FRAMEWORK_NAME tvOS"
        -sdk appletvsimulator
        -destination "platform=tvOS Simulator,name=Apple TV 1080p"
        ONLY_ACTIVE_ARCH=NO
        test
        | xcpretty -c
      pod lib lint --quick
    fi

Create Travis CI configuration file
Create Travis CI configuration file
