Skip to content

Commit

Permalink
Prelaunching Xcode 9 simulator to avoid timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Coeur committed Jan 28, 2019
1 parent 293dc82 commit 1fc9118
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,27 @@ matrix:
language: objective-c
cache: cocoapods
podfile: Example/Podfile

before_install:
- gem install cocoapods # Since Travis is not always on latest version
- gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
- pod install --repo-update --project-directory=Example
# Grepping destination device udid
- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
# (not working with osx_image: xcode10 and newer?)
#- open -a "simulator" --args -CurrentDeviceUDID $DESTINATION_UDID
- gem install cocoapods # Since Travis is not always on latest version
- gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
- pod install --repo-update --project-directory=Example
# Grepping destination device udid
- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
# (not working with osx_image: xcode10 and newer?)
- if [ ${SWIFT_VERSION} = "4.0" ]; then
open -a Simulator --args -CurrentDeviceUDID $DESTINATION_UDID;
fi

script:
- set -o pipefail && xcodebuild test
- set -o pipefail && xcodebuild test
`` -enableCodeCoverage YES
`` -workspace Example/CollectionViewCenteredFlowLayout.xcworkspace
`` -scheme Example
`` -sdk iphonesimulator
`` -destination "id=$DESTINATION_UDID"
`` ONLY_ACTIVE_ARCH=NO
`` | xcpretty
- echo $SWIFT_VERSION > .swift-version
- pod lib lint
- echo $SWIFT_VERSION > .swift-version
- pod lib lint

0 comments on commit 1fc9118

Please sign in to comment.