forked from robbiehanson/KissXML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (33 loc) · 2.27 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
osx_image: xcode9.1
language: objective-c
cache:
directories:
- Tests/Mac/Pods
- Tests/iOS/Pods
- Tests/Swift/Pods
- Tests/Swift-iOS/Pods
before_install:
# Fix Travis xcodebuild exited with 65 https://github.com/travis-ci/travis-ci/issues/6675#issuecomment-257964767
- export IOS_SIMULATOR_UDID=`instruments -s devices | grep -m 1 "iPhone 8 (11" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'`
- echo $IOS_SIMULATOR_UDID
- open -a "simulator" --args -CurrentDeviceUDID $IOS_SIMULATOR_UDID
install:
- cd Tests/
- bundle install
- bundle exec pod repo update --silent
- bundle exec pod install --project-directory=./Mac
- bundle exec pod install --project-directory=./iOS
- bundle exec pod install --project-directory=./Swift
- bundle exec pod install --project-directory=./Swift-iOS
script:
- set -o pipefail
# The Swift and Obj-C tests need to be run separately due to a bug in Apple's NSXML code
- xcodebuild -project ./Framework/KissXMLTests.xcodeproj -scheme "KissXMLTests (macOS)" -sdk macosx -arch x86_64 -only-testing:"KissXMLTests (macOS)/KissXMLSwiftTests" test | xcpretty -c
- xcodebuild -project ./Framework/KissXMLTests.xcodeproj -scheme "KissXMLTests (macOS)" -sdk macosx -arch x86_64 -only-testing:"KissXMLTests (macOS)/KissXMLTests" test | xcpretty -c
- travis_retry xcodebuild -project ./Framework/KissXMLTests.xcodeproj -scheme "KissXMLTests (iOS)" -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c
- xcodebuild -project ../KissXML.xcodeproj -scheme "KissXML (tvOS)" -sdk appletvsimulator -arch x86_64 build | xcpretty -c
- xcodebuild -project ../KissXML.xcodeproj -scheme "KissXML (watchOS)" -sdk watchos build | xcpretty -c
- xcodebuild -workspace ./Mac/KissXML.xcworkspace -scheme KissXMLTests -sdk macosx -arch x86_64 test | xcpretty -c
- travis_retry xcodebuild -workspace ./iOS/KissXML.xcworkspace -scheme KissXMLTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c
- xcodebuild -workspace ./Swift/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk macosx -arch x86_64 test | xcpretty -c
- travis_retry xcodebuild -workspace ./Swift-iOS/KissXML.xcworkspace -scheme KissXMLSwiftTests -sdk iphonesimulator -destination "id=$IOS_SIMULATOR_UDID" test | xcpretty -c