forked from Orderella/PopupDialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (44 loc) · 2.7 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
47
48
49
language: objective-c
osx_image: xcode10
env:
global:
- WORKSPACE=Example/PopupDialog.xcworkspace
- IOS_FRAMEWORK_SCHEME="PopupDialog-Example"
- IOS_SDK=iphonesimulator12.0
- EXAMPLE_SCHEME="PopupDialog-Example"
matrix:
- DESTINATION="OS=11.1,name=iPhone 7 Plus" SIMNAME="com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus, 11.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"
before_install:
- npm install ios-sim -g
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
- pod install --project-directory=./Example --repo-update
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks
- xcrun simctl list
# "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
# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint;
fi