-
Notifications
You must be signed in to change notification settings - Fork 627
/
circle.yml
40 lines (34 loc) · 2.37 KB
/
circle.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
machine:
xcode:
version: 8.0
environment:
SCAN_OUTPUT_TYPES: "junit"
SCAN_OUTPUT_DIRECTORY: "$CIRCLE_TEST_REPORTS/junit/"
SCAN_XCARGS: "RUN_CLANG_STATIC_ANALYZER=YES CLANG_STATIC_ANALYZER_MODE=Deep"
dependencies:
pre:
- xcodebuild -version -sdk
- xcrun simctl list
# Need bundler < 1.13.{1,2,3} because of https://github.com/bundler/bundler/issues/5000
- sudo gem uninstall bundler -v '>1.12.5' --force || echo "bundler >1.12.5 is not installed"
- sudo gem install bundler -v 1.12.5 --no-rdoc --no-ri --no-document --quiet
- sudo gem install scan --no-rdoc --no-ri --no-document --quiet
- sudo gem install specific_install --no-rdoc --no-ri --no-document --quiet
- sudo gem specific_install -l https://github.com/0xced/slather.git -b coveralls-verbose
test:
pre:
- open -b com.apple.iphonesimulator
override:
# Run unit tests and generate junit reports
- scan --destination "platform=OS X" --custom_report_file_name "test-results-macOS.xml"
- scan --destination "platform=iOS Simulator,name=iPhone 5s" --custom_report_file_name "test-results-iOS.xml" --code_coverage
- scan --destination "platform=tvOS Simulator,name=Apple TV 1080p" --custom_report_file_name "test-results-tvOS.xml"
# Compile with latest deployment target (catches deprecation warnings)
- SCAN_OUTPUT_TYPES="" scan --destination "platform=OS X" --xcargs "MACOSX_DEPLOYMENT_TARGET=`xcrun --sdk "macosx" --show-sdk-version`"
- SCAN_OUTPUT_TYPES="" scan --destination "platform=iOS Simulator,name=iPhone 5s" --xcargs "IPHONEOS_DEPLOYMENT_TARGET=`xcrun --sdk "iphonesimulator" --show-sdk-version`"
- SCAN_OUTPUT_TYPES="" scan --destination "platform=tvOS Simulator,name=Apple TV 1080p" --xcargs "TVOS_DEPLOYMENT_TARGET=`xcrun --sdk "appletvsimulator" --show-sdk-version`"
# Run unit tests on older OS versions (see https://circleci.com/docs/ios-builds-on-os-x/ for list of available simulators)
- SCAN_OUTPUT_TYPES="" SCAN_XCARGS="" scan --destination "platform=iOS Simulator,name=iPhone 5s,OS=9.0"
post:
- slather coverage --verbose --circleci --coveralls --ignore "../**/Contents/Developer/**" --scheme "$(sed -n 's/scheme "\(.*\)"/\1/p' Scanfile)" "$(sed -n 's/project "\(.*\)"/\1/p' Scanfile)"
- bash <(curl -s https://codecov.io/bash) -g "*XCDYouTubeKit Tests*"