forked from jessesquires/JSQMessagesViewController
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
44 lines (34 loc) · 1.53 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
language: objective-c
osx_image: xcode7.3
env:
global:
- LANG=en_US.UTF-8
- WORKSPACE="JSQMessages.xcworkspace"
- IOS_SCHEME="JSQMessages"
- IOS_SDK=iphonesimulator9.3
matrix:
- DESTINATION="OS=8.1,name=iPhone 5" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" COVERAGE="NO"
- DESTINATION="OS=9.0,name=iPhone 6 Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="YES" COVERAGE="YES"
before_install:
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
# skip pod install on travis-ci
# since we check-in the pods folder, etc. this isn't needed
install: true
script:
- if [ $POD_LINT == "YES" ]; then
pod spec lint;
pod lib lint;
fi
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild clean build test -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO | xcpretty -c;
else
xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO | xcpretty -c;
fi
# Build for reporting test coverage
- if [ $COVERAGE == "YES" ]; then
xcodebuild clean build test -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES;
fi
after_success:
- if [ $COVERAGE == "YES" ]; then
bash <(curl -s https://codecov.io/bash);
fi