-
Notifications
You must be signed in to change notification settings - Fork 332
/
.travis.yml
46 lines (41 loc) · 2.33 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
38
39
40
41
42
43
44
45
46
language: objective-c
jobs:
include:
- stage: Swift PM
osx_image: xcode11.5
script:
# Build the project using Swift PM
- swift build
# Test the project using Swift PM
- swift test
- stage: Xcode Tests
osx_image: xcode11.1
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 (13" | awk -F '[ ]' '{print $4}' | awk -F '[\[]' '{print $2}' | sed 's/.$//'`
- echo $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
- xcodebuild -project ./Framework/KissXMLTests.xcodeproj -scheme "KissXMLTests (macOS)" -sdk macosx -arch x86_64 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
- bundle exec pod lib lint ../KissXML.podspec