-
Notifications
You must be signed in to change notification settings - Fork 123
/
.travis.yml
43 lines (32 loc) · 1.8 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
osx_image: xcode8.2
language: objective-c
branches:
only:
- master
before_install:
- gem install cocoapods # Since Travis is not always on latest version
- gem install xcpretty
env:
global:
- LANG=en_US.UTF-8
- PROJECT="Diff.xcodeproj"
- SCHEME="Diff"
- IOS_SDK=iphonesimulator10.2
- OSX_SDK=macosx10.12
- TVOS_SDK=appletvsimulator10.1
- WATCHOS_SDK=watchsimulator3.1
matrix:
- DESTINATION="arch=x86_64" SDK="$OSX_SDK" SCHEME="$SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=10.2,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=10.1,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=3.1,name=Apple Watch - 42mm" SDK="$WATCHOS_SDK" SCHEME="$SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
script:
- set -o pipefail
- if [ $POD_LINT == "YES" ]; then pod lib lint; fi
- if [ $BUILD_EXAMPLE == "YES" ]; then xcodebuild clean build -project Examples/TableViewExample/TableViewExample.xcodeproj -scheme TableViewExample -sdk "$SDK" -destination "$DESTINATION" | xcpretty -c; fi
- if [ $RUN_TESTS == "YES" ]; then xcodebuild clean test -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | xcpretty -c; fi
- if [ $RUN_TESTS != "YES" ]; then xcodebuild clean build -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | xcpretty -c; fi
- swift build
after_success:
- bash <(curl -s https://codecov.io/bash)
- sleep 5 # Workaround for https://github.com/travis-ci/travis-ci/issues/4725