forked from kitt-browser/HockeySDK-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
54 lines (45 loc) · 2 KB
/
.travis.yml
File metadata and controls
54 lines (45 loc) · 2 KB
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
language: objective-c
osx_image: xcode8
env:
global:
- PROJECT="Support/HockeySDK.xcodeproj"
- SDK="iphonesimulator"
- CONFIGURATION="DEBUG"
matrix:
- 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=9.2,name=iPad Pro" RUN_TESTS="YES"
- SCHEME="HockeySDK" DESTINATION="OS=9.3,name=iPhone 6s" RUN_TESTS="YES"
- SCHEME="HockeySDK Framework" DESTINATION="platform=iOS Simulator,OS=9.3,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 unlink carthage
- 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'"
# Run tests
- if [ $RUN_TESTS == "YES" ]; then
COMMAND+=" -destination '$DESTINATION' XCODEBUILD_GCC_PREPROCESSOR_DEFINITIONS="CI=1" clean test";
fi
- COMMAND+=" | tee xcodebuild.log"
# Add xcpretty
- COMMAND+=" | xcpretty -f `xcpretty-travis-formatter`"
- 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