forked from nmdias/FeedKit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
54 lines (47 loc) · 2.46 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
language: objective-c
osx_image: xcode14
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=16,name=iPhone 14" SCHEME="$FRAMEWORK_SCHEME_IOS" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$EXAMPLE_SCHEME_IOS" POD_LINT="NO"
- DESTINATION="OS=9,name=Apple Watch - 42mm" SCHEME="$FRAMEWORK_SCHEME_WATCHOS" RUN_TESTS="NO" BUILD_EXAMPLE="NO" EXAMPLE_SCHEME="" POD_LINT="NO"
- DESTINATION="OS=16,name=Apple TV 4K" 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