language: objective-c
osx_image: xcode7.3
sudo: false
before_install:
  - brew install carthage

script: ./Scripts/build.sh

branches:
  only:
    - master

env:
- TARGET=WebDriverAgentLib SDK=iphonesimulator DESTINATION='iPad 2' ACTION=test
- TARGET=WebDriverAgentLib SDK=iphonesimulator DESTINATION='iPhone 6' ACTION=test
- TARGET=WebDriverAgentRunner SDK=iphonesimulator ACTION=build
- TARGET=WebDriverAgentRunner SDK=iphoneos ACTION=build
- TARGET=WebDriverAgentUSBClient SDK=macosx ACTION=build

language: objective-c
osx_image: xcode7.3
sudo: false
before_install:
  - brew install carthage

script: ./Scripts/build.sh

branches:
  only:
    - master

env:
- TARGET=WebDriverAgentLib SDK=iphonesimulator DESTINATION='iPad 2' ACTION='build test'
- TARGET=WebDriverAgentLib SDK=iphonesimulator DESTINATION='iPhone 6' ACTION='build test'
- TARGET=WebDriverAgentRunner SDK=iphonesimulator ACTION=build
- TARGET=WebDriverAgentRunner SDK=iphoneos ACTION=build
- TARGET=WebDriverAgentUSBClient SDK=macosx ACTION=build

Fix xcodebuild failure due to exit code 65.
Fix xcodebuild failure due to exit code 65.

Summary:
Travis often fails with exit code 65. After some digging I found out that it is due to fact that xcodebuild's 'test' command counts build time as simulator booting time so it is easy to get timeout on that step.
Easy solution is to explicitly build first and then run test.
Closes https://github.com/facebook/WebDriverAgent/pull/272

Reviewed By: lawrencelomax

Differential Revision: D3823399

Pulled By: marekcirkos

fbshipit-source-id: cccbcbe0499f87f38483438f10c91cdae2e5e135
