forked from bitstadium/HockeySDK-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (50 loc) · 2.54 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
54
55
56
57
58
language: objective-c
osx_image: xcode8.3
env:
global:
- PROJECT="Support/HockeySDK.xcodeproj"
- SDK="iphonesimulator"
- CONFIGURATION="DEBUG"
matrix:
- SCHEME="HockeySDK" DESTINATION="OS=8.1,name=iPad Air" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=8.2,name=iPhone 6 Plus" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=8.3,name=iPad 2" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=8.4,name=iPhone 4s" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.0,name=iPad Air" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.1,name=iPhone 6 Plus" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=10.2,name=iPad Pro (9.7-inch)" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=10.3.1,name=iPhone 6s" RUN_TESTS="YES"
- SCHEME="HockeySDK Framework" DESTINATION="platform=iOS Simulator,OS=10.3.1,name=iPhone 6" RUN_TESTS="YES"
- SCHEME="HockeySDK Distribution" RUN_TESTS="NO" LINT="YES"
before_install:
- xcrun simctl list
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
- gem install xcpretty-travis-formatter --no-rdoc --no-ri --no-document --quiet
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
- brew install carthage
script:
- open -b com.apple.iphonesimulator
- set -o pipefail
- COMMAND="env NSUnbufferedIO=YES xcodebuild -project '$PROJECT' -scheme '$SCHEME' -sdk '$SDK' -configuration '$CONFIGURATION'"
# Add xcpretty
- COMMAND_SUFFIX=" | tee xcodebuild.log | xcpretty -f `xcpretty-travis-formatter`"
# Run tests
- if [ $RUN_TESTS == "YES" ]; then
COMMAND+=" -destination '$DESTINATION' XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS=\"CI=1\" "
COMMAND="$COMMAND clean build-for-testing $COMMAND_SUFFIX && travis_retry $COMMAND test-without-building $COMMAND_SUFFIX";
else
COMMAND+="$COMMAND_SUFFIX";
fi
- echo $COMMAND
- eval $COMMAND && rm xcodebuild.log
- if [ $LINT == "YES" ]; then
cp -R Products/HockeySDK-iOS/ HockeySDK-iOS;
pod lib lint;
carthage build --no-skip-current ;
fi
# Use better failure diagnostics, copied from https://github.com/0xced/XCDYouTubeKit
after_failure:
- cat xcodebuild.log
- cat -n $TMPDIR/com.apple.dt.XCTest-status/Session*.log
- cat -n ~/Library/Logs/DiagnosticReports/xctest*.crash
- sleep 5