Skip to content

Commit c146684

Browse files
authored
1 parent fd0c224 commit c146684

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

.travis.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
11
language: objective-c
2-
osx_image: xcode8
2+
osx_image: xcode8.3
33
env:
44
global:
55
- LC_CTYPE=en_US.UTF-8
66
- LANG=en_US.UTF-8
77
- WORKSPACE=FDWaveformView.xcworkspace
88
- IOS_FRAMEWORK_SCHEME="FDWaveformView"
9-
- IOS_SDK=iphonesimulator10.0
109
- EXAMPLE_SCHEME="iOS Example"
1110
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
1314
script:
1415
- set -o pipefail
1516
- xcodebuild -version
1617
- xcodebuild -showsdks
17-
- xcodebuild -list
18-
- xcodebuild -workspace "$WORKSPACE" -list
18+
# - xcodebuild -list
19+
# - xcodebuild -workspace "$WORKSPACE" -list
1920

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
2227

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
2534

2635
# 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
2839

2940
# Run `pod lib lint` if specified
3041
- if [ $POD_LINT == "YES" ]; then

0 commit comments

Comments
 (0)