-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (42 loc) · 1.69 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
50
51
52
53
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage
language: swift
osx_image: xcode10.2
branches:
only:
- master
- develop
- feature/swift
env:
global:
- WORKSPACE="SNavigationController.xcworkspace"
- IOS_FRAMEWORK_SCHEME="SNavigationController"
- iOS_DEMO_SCHEME="SNavigationControllerDemo-iOS"
matrix:
- DESTINATION="OS=11.3,name=iPhone X" RUN_TESTS="NO" BUILD_DEMO="iOS" POD_LINT="YES" ENABLECCODECOVERAGE="YES"
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus" RUN_TESTS="NO" BUILD_DEMO="iOS" POD_LINT="NO" ENABLECCODECOVERAGE="NO"
- DESTINATION="OS=9.3,name=iPhone 6" RUN_TESTS="NO" BUILD_DEMO="iOS" POD_LINT="NO" ENABLECCODECOVERAGE="NO"
script:
- set -o pipefail
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" ENABLE_TESTABILITY=YES test | xcpretty;
else
xcodebuild -workspace "$WORKSPACE" -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" | xcpretty;
fi
- if [ $BUILD_DEMO == "iOS" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$iOS_DEMO_SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi
- if [ $ENABLECCODECOVERAGE = "YES" ]; then
xcodebuild -enableCodeCoverage YES -workspace "$WORKSPACE" -scheme "$IOS_FRAMEWORK_SCHEME" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO test | xcpretty;
fi
# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint;
fi
notifications:
slack: cyrex-group:ByK4WXNdYYjQ1yYZ2tjDOKyr
after_success:
- if [ $ENABLECCODECOVERAGE = "YES"]; then
bash <(curl -s https://codecov.io/bash)
fi