forked from facebookarchive/facebook-swift-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (46 loc) · 1.89 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
branches:
only:
- master
language: objective-c
os: osx
osx_image: xcode8.3
cache:
- cocoapods
env:
matrix:
- TEST_TYPE=iOS
- TEST_TYPE=Lint
- TEST_TYPE=Samples
- TEST_TYPE=CocoaPods
before_install:
- |
if [ "$TEST_TYPE" = Lint ] || [ "$TEST_TYPE" = Carthage ]; then
brew update
fi
install:
- |
gem update --system --no-document
bundle install
if [ "$TEST_TYPE" = Lint ]; then
brew install swiftlint || brew upgrade swiftlint
elif [ "$TEST_TYPE" = CocoaPods ]; then
pod repo update --silent
fi
script:
- |
if [ "$TEST_TYPE" = iOS ]; then
set -o pipefail
xcodebuild build -workspace FacebookSwift.xcworkspace -sdk iphonesimulator -scheme FacebookCore -configuration Debug -destination "platform=iOS Simulator,name=iPhone 5" -destination "platform=iOS Simulator,name=iPhone 7 Plus" | xcpretty -c
xcodebuild build -workspace FacebookSwift.xcworkspace -sdk iphonesimulator -scheme FacebookLogin -configuration Debug -destination "platform=iOS Simulator,name=iPhone 5" -destination "platform=iOS Simulator,name=iPhone 7 Plus" | xcpretty -c
xcodebuild build -workspace FacebookSwift.xcworkspace -sdk iphonesimulator -scheme FacebookShare -configuration Debug -destination "platform=iOS Simulator,name=iPhone 5" -destination "platform=iOS Simulator,name=iPhone 7 Plus" | xcpretty -c
elif [ "$TEST_TYPE" = Lint ]; then
swiftlint lint --path Sources --quiet
swiftlint lint --path Samples --quiet
elif [ "$TEST_TYPE" = Samples ]; then
set -o pipefail
xcodebuild build -workspace FacebookSwift.xcworkspace -sdk iphonesimulator -scheme SwiftCatalog -configuration Debug -destination "platform=iOS Simulator,name=iPhone 5" -destination "platform=iOS Simulator,name=iPhone 7 Plus" | xcpretty -c
elif [ "$TEST_TYPE" = CocoaPods ]; then
pod lib lint FacebookCore.podspec
pod lib lint FacebookLogin.podspec
pod lib lint FacebookShare.podspec
fi