# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode8
language: objective-c
env:
  - DESTINATION="OS=10.0,name=iPhone 6s" SCHEME="TinyPlayerDemo" SDK=iphonesimulator10.0

podfile: Examples/Podfile
before_install:
  - gem install cocoapods # Since Travis is not always on latest version
  - gem install xcpretty -N --no-ri --no-rdoc
  - pod install --project-directory=Examples
  - xcrun simctl list # list devices

script:
  - set -o pipefail
  - xcodebuild version
  - xcodebuild clean test -workspace Examples/TinyPlayerDemo+Benchmark.xcworkspace -scheme "$SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO -enableCodeCoverage YES | xcpretty -c
  - pod lib lint

# Some test configurations:
# cache: cocoapods
# xcode_sdk: iphonesimulator10.2
# xcodebuild clean build -workspace Examples/TinyPlayerDemo+Benchmark.xcworkspace -scheme TinyPlayerDemo -destination "platform=iOS Simulator,name=iPhone 7" ONLY_ACTIVE_ARCH=NO | xcpretty -c || ture

# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode8.2
language: objective-c
env:
  - DESTINATION="OS=10.2,name=iPhone 6s" SCHEME="TinyPlayerDemo" SDK=iphonesimulator10.2

podfile: Examples/Podfile
before_install:
  - gem install cocoapods # Since Travis is not always on latest version
  - gem install xcpretty -N --no-ri --no-rdoc
  - pod install --project-directory=Examples
  - xcrun simctl list # list devices

script:
  - set -o pipefail
  - xcodebuild version
  - xcodebuild clean test -workspace Examples/TinyPlayerDemo+Benchmark.xcworkspace -scheme "$SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO -enableCodeCoverage YES | xcpretty -c
  - pod lib lint

# Some test configurations:
# cache: cocoapods
# xcode_sdk: iphonesimulator10.2
# xcodebuild clean build -workspace Examples/TinyPlayerDemo+Benchmark.xcworkspace -scheme TinyPlayerDemo -destination "platform=iOS Simulator,name=iPhone 7" ONLY_ACTIVE_ARCH=NO | xcpretty -c || ture

Switch osx image for Travis.
Switch osx image for Travis.
