forked from nmdias/FeedKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (48 loc) · 2.64 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
language: objective-c
osx_image: xcode11
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
- PROJECT=FeedKit.xcodeproj
# Framework targets
- FRAMEWORK_SCHEME_IOS="FeedKit iOS"
- FRAMEWORK_SCHEME_MACOS="FeedKit macOS"
- FRAMEWORK_SCHEME_TVOS="FeedKit tvOS"
- FRAMEWORK_SCHEME_WATCHOS="FeedKit watchOS"
# Example targets
- EXAMPLE_SCHEME_IOS="FeedKit Example iOS"
- EXAMPLE_SCHEME_TVOS="FeedKit Example tvOS"
- EXAMPLE_SCHEME_MACOS="FeedKit Example macOS"
matrix:
- DESTINATION="OS=10.3.1,name=iPhone 7" SCHEME="$FRAMEWORK_SCHEME_IOS" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$EXAMPLE_SCHEME_IOS" POD_LINT="YES"
- DESTINATION="OS=11.3,name=iPhone X" SCHEME="$FRAMEWORK_SCHEME_IOS" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$EXAMPLE_SCHEME_IOS" POD_LINT="NO"
- DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="$FRAMEWORK_SCHEME_WATCHOS" RUN_TESTS="NO" BUILD_EXAMPLE="NO" EXAMPLE_SCHEME="" POD_LINT="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$FRAMEWORK_SCHEME_TVOS" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$EXAMPLE_SCHEME_TVOS" POD_LINT="NO"
- DESTINATION="arch=x86_64" SCHEME="$FRAMEWORK_SCHEME_MACOS" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$EXAMPLE_SCHEME_MACOS" POD_LINT="NO"
before_install:
- gem install cocoapods --no-document --quiet
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks
# Build Framework in Debug and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
else
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi
# Build Framework in Release and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration 'Release Test' ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
else
xcodebuild -project "$PROJECT" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi
# Build Example in Debug if specified
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -project "$PROJECT" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
fi
# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint;
fi