Skip to content

Commit

Permalink
Simplified CI test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mwfire committed Mar 31, 2019
1 parent 3c9f9e4 commit 7048a95
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ env:
- WORKSPACE=Example/PopupDialog.xcworkspace
- IOS_FRAMEWORK_SCHEME="PopupDialog-Example"
- IOS_SDK=iphonesimulator12.1
- EXAMPLE_SCHEME="PopupDialog-Example"
matrix:
- DESTINATION="OS=12.1,name=iPhone XR" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPhone-XR, 12.1" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=10.2,name=iPhone 6" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPhone-6, 10.2" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 5s" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPhone-5s, 9.2" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=11.1,name=iPad Air 2" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPad-Air-2, 11.1" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=12.1,name=iPhone XR" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPhone-XR, 12.1" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" POD_LINT="YES"
- DESTINATION="OS=10.2,name=iPhone 6" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPhone-6, 10.2" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" POD_LINT="NO"
- DESTINATION="OS=11.1,name=iPad Air 2" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPad-Air-2, 11.1" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" POD_LINT="NO"
before_install:
- npm install ios-sim -g
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
Expand All @@ -24,24 +22,8 @@ script:
# "Prewarm" simulators as of https://github.com/travis-ci/travis-ci/issues/6675
- ios-sim start --devicetypeid "$SIMNAME"

# Build Framework in Debug and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;
else
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi

# Build Framework in Release and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;
else
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi

# Build Example in Debug if specified
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi
# Build Framework in Debug and run tests
- xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;

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

0 comments on commit 7048a95

Please sign in to comment.