forked from Decybel07/L10n-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (56 loc) · 4.06 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
56
57
58
59
60
61
62
63
64
65
66
67
68
osx_image: xcode9
language: objective-c
env:
global:
- LC_CTYPE=en_US.UTF-8
- WORKSPACE=L10n.xcworkspace
- IOS="iOS"
- MACOS="macOS"
- TVOS="tvOS"
- WATCHOS="watchOS"
matrix:
# iOS
- DESTINATION="OS=9.1,name=iPad Air" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=9.2,name=iPad Air 2" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=10.1,name=iPad Pro (12.9-inch)" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=9.1,name=iPhone 6" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=10.0,name=iPhone 7" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=11.0,name=iPhone 8 Plus" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
- DESTINATION="OS=11.0,name=iPhone X" PLATFORM="$IOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="YES"
# watchOS
- DESTINATION="OS=2.0,name=Apple Watch - 38mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=3.2,name=Apple Watch Series 2 - 42mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=4.0,name=Apple Watch Series 3 - 42mm" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
# iOS + watchOS
- DESTINATION="OS=10.3.1,name=iPhone 6s Plus" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=10.3.1,name=iPhone 7 Plus" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.0,name=iPhone 8" PLATFORM="$WATCHOS" RUN_TESTS="NO" BUILD_FRAMEWORK="NO" BUILD_EXAMPLE="NO"
# tvOS
- DESTINATION="OS=9.0,name=Apple TV 1080p" PLATFORM="$TVOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=10.2,name=Apple TV 1080p" PLATFORM="$TVOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
- DESTINATION="OS=11.0,name=Apple TV 4K" PLATFORM="$TVOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
# macOS
- DESTINATION="arch=x86_64" PLATFORM="$MACOS" RUN_TESTS="YES" BUILD_FRAMEWORK="YES" BUILD_EXAMPLE="NO"
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks
- FRAMEWORK_SCHEME="L10n $PLATFORM";
- EXAMPLE_SCHEME="Example $PLATFORM";
# Build Framework
- if [ $BUILD_FRAMEWORK == "YES" ]; then
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build| xcpretty;
fi
# Run Tests
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
xcodebuild -project "L10n_swift.xcodeproj" -scheme "$FRAMEWORK_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
fi
# Build Example
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -project "Example/Example.xcodeproj" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
xcodebuild -project "Example/Example.xcodeproj" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build| xcpretty;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)