|
1 | 1 | language: objective-c |
2 | | -osx_image: xcode8 |
| 2 | +osx_image: xcode8.3 |
3 | 3 | env: |
4 | 4 | global: |
5 | 5 | - LC_CTYPE=en_US.UTF-8 |
6 | 6 | - LANG=en_US.UTF-8 |
7 | 7 | - WORKSPACE=FDWaveformView.xcworkspace |
8 | 8 | - IOS_FRAMEWORK_SCHEME="FDWaveformView" |
9 | | - - IOS_SDK=iphonesimulator10.0 |
10 | 9 | - EXAMPLE_SCHEME="iOS Example" |
11 | 10 | matrix: |
12 | | - - DESTINATION="OS=10.0,name=iPhone 7S Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" POD_LINT="NO" |
| 11 | + - DESTINATION="OS=10.3,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES" |
| 12 | +before_install: |
| 13 | + - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet |
13 | 14 | script: |
14 | 15 | - set -o pipefail |
15 | 16 | - xcodebuild -version |
16 | 17 | - xcodebuild -showsdks |
17 | | - - xcodebuild -list |
18 | | - - xcodebuild -workspace "$WORKSPACE" -list |
| 18 | +# - xcodebuild -list |
| 19 | +# - xcodebuild -workspace "$WORKSPACE" -list |
19 | 20 |
|
20 | | - # Build and test Framework in Debug |
21 | | - - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty |
| 21 | + # Build Framework in Debug and Run Tests if specified |
| 22 | + - if [ $RUN_TESTS == "YES" ]; then |
| 23 | + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; |
| 24 | + else |
| 25 | + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; |
| 26 | + fi |
22 | 27 |
|
23 | | - # Build Framework in ReleaseTest |
24 | | - - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration ReleaseTest ONLY_ACTIVE_ARCH=NO build | xcpretty |
| 28 | + # Build Framework in Release and Run Tests if specified |
| 29 | + - if [ $RUN_TESTS == "YES" ]; then |
| 30 | + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; |
| 31 | + else |
| 32 | + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; |
| 33 | + fi |
25 | 34 |
|
26 | 35 | # Build Example in Debug if specified |
27 | | - - xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty |
| 36 | + - if [ $BUILD_EXAMPLE == "YES" ]; then |
| 37 | + xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; |
| 38 | + fi |
28 | 39 |
|
29 | 40 | # Run `pod lib lint` if specified |
30 | 41 | - if [ $POD_LINT == "YES" ]; then |
|
0 commit comments