Skip to content

Commit 1fc9118

Browse files
committed
Prelaunching Xcode 9 simulator to avoid timeout
1 parent 293dc82 commit 1fc9118

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

.travis.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,27 @@ matrix:
2828
language: objective-c
2929
cache: cocoapods
3030
podfile: Example/Podfile
31+
3132
before_install:
32-
- gem install cocoapods # Since Travis is not always on latest version
33-
- gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
34-
- pod install --repo-update --project-directory=Example
35-
# Grepping destination device udid
36-
- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
37-
# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
38-
# (not working with osx_image: xcode10 and newer?)
39-
#- open -a "simulator" --args -CurrentDeviceUDID $DESTINATION_UDID
33+
- gem install cocoapods # Since Travis is not always on latest version
34+
- gem update xcodeproj # https://github.com/CocoaPods/CocoaPods/issues/7835
35+
- pod install --repo-update --project-directory=Example
36+
# Grepping destination device udid
37+
- DESTINATION_UDID=$(instruments -s devices | grep "$DESTINATION \[" | sed -E 's/.*\[([0-9A-F-]+)\].*/\1/g')
38+
# Prelaunching simulator to avoid timeout https://github.com/travis-ci/travis-ci/issues/6422
39+
# (not working with osx_image: xcode10 and newer?)
40+
- if [ ${SWIFT_VERSION} = "4.0" ]; then
41+
open -a Simulator --args -CurrentDeviceUDID $DESTINATION_UDID;
42+
fi
43+
4044
script:
41-
- set -o pipefail && xcodebuild test
45+
- set -o pipefail && xcodebuild test
4246
`` -enableCodeCoverage YES
4347
`` -workspace Example/CollectionViewCenteredFlowLayout.xcworkspace
4448
`` -scheme Example
4549
`` -sdk iphonesimulator
4650
`` -destination "id=$DESTINATION_UDID"
4751
`` ONLY_ACTIVE_ARCH=NO
4852
`` | xcpretty
49-
- echo $SWIFT_VERSION > .swift-version
50-
- pod lib lint
53+
- echo $SWIFT_VERSION > .swift-version
54+
- pod lib lint

0 commit comments

Comments
 (0)