|
9 | 9 | - MACOS_FRAMEWORK_SCHEME="IPAPI macOS" |
10 | 10 | - TVOS_FRAMEWORK_SCHEME="IPAPI tvOS" |
11 | 11 | - WATCHOS_FRAMEWORK_SCHEME="IPAPI watchOS" |
| 12 | + matrix: |
| 13 | + - DESTINATION="OS=3.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" POD_LINT="NO" |
| 14 | + - DESTINATION="OS=2.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" POD_LINT="NO" |
| 15 | + |
| 16 | + - DESTINATION="OS=10.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="YES" |
| 17 | + - DESTINATION="OS=9.0,name=iPad 2" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" |
| 18 | + - DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" |
| 19 | + |
| 20 | + - DESTINATION="OS=10.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" |
| 21 | + - DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" |
| 22 | + |
| 23 | + - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" POD_LINT="NO" |
12 | 24 | script: |
13 | 25 | - set -o pipefail |
14 | 26 | - xcodebuild -version |
15 | 27 |
|
16 | | - # Builds |
17 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$IOS_FRAMEWORK_SCHEME" -destination "platform=iOS Simulator,name=iPhone 6" build | xcpretty; |
18 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$MACOS_FRAMEWORK_SCHEME" build | xcpretty; |
19 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$TVOS_FRAMEWORK_SCHEME" -destination "platform=tvOS Simulator,name=Apple TV 1080p" build | xcpretty; |
20 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$WATCHOS_FRAMEWORK_SCHEME" -destination "platform=watchOS Simulator,name=Apple Watch - 42mm" build | xcpretty; |
| 28 | + # Build Framework in Debug and Run Tests if specified |
| 29 | + - if [ $RUN_TESTS == "YES" ]; then |
| 30 | + travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build-for-testing test | xcpretty; |
| 31 | + else |
| 32 | + travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; |
| 33 | + fi |
21 | 34 |
|
22 | | - # Tests |
23 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$IOS_FRAMEWORK_SCHEME" -destination "platform=iOS Simulator,name=iPhone 6" build-for-testing test | xcpretty; |
24 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$MACOS_FRAMEWORK_SCHEME" build-for-testing test | xcpretty; |
25 | | - - travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$TVOS_FRAMEWORK_SCHEME" -destination "platform=tvOS Simulator,name=Apple TV 1080p" build-for-testing test | xcpretty; |
| 35 | + # Build Framework in Release and Run Tests if specified |
| 36 | + - if [ $RUN_TESTS == "YES" ]; then |
| 37 | + travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build-for-testing test | xcpretty; |
| 38 | + else |
| 39 | + travis_retry xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; |
| 40 | + fi |
26 | 41 |
|
27 | | - # Run `pod lib lint` |
28 | | - - pod lib lint; |
| 42 | + # Run `pod lib lint` if specified |
| 43 | + - if [ $POD_LINT == "YES" ]; then |
| 44 | + pod lib lint; |
| 45 | + fi |
0 commit comments