-
Notifications
You must be signed in to change notification settings - Fork 79
/
.travis.yml
executable file
·59 lines (48 loc) · 2.42 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
os: osx
osx_image: xcode11.2
language: objective-c
cache: cocoapods
before_install:
- gem install xcpretty -N --no-document
- xcrun simctl delete 38C891AB-EC79-43E4-9311-6FDEB12DCF11 || true # https://github.com/travis-ci/travis-ci/issues/7580
- pod install
env:
global:
- WORKSPACE=FastEasyMapping.xcworkspace
- RUN_TESTS="YES"
- IOS_SCHEME="FastEasyMapping iOS"
- MACOS_SCHEME="FastEasyMapping macOS"
- TVOS_SCHEME="FastEasyMapping tvOS"
- WATCHOS_SCHEME="FastEasyMapping watchOS"
matrix:
- SCHEME="$IOS_SCHEME" DESTINATION="OS=11.4,name=iPhone 6"
- SCHEME="$IOS_SCHEME" DESTINATION="OS=12.1,name=iPhone SE"
- SCHEME="$IOS_SCHEME" DESTINATION="OS=13.2.2,name=iPhone 8"
- SCHEME="$MACOS_SCHEME" DESTINATION="arch=x86_64"
- SCHEME="$TVOS_SCHEME" DESTINATION="OS=12.1,name=Apple TV 4K (at 1080p)" RUN_TESTS="NO"
- SCHEME="$TVOS_SCHEME" DESTINATION="OS=13.2,name=Apple TV 4K (at 1080p)" RUN_TESTS="NO"
- SCHEME="$WATCHOS_SCHEME" DESTINATION="OS=5.1,name=Apple Watch Series 2 - 38mm" RUN_TESTS="NO"
- SCHEME="$WATCHOS_SCHEME" DESTINATION="OS=6.1,name=Apple Watch Series 5 - 44mm" RUN_TESTS="NO"
script:
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks
- instruments -s devices
# Build Framework in Debug and Run Tests if specified
- |
if [ $RUN_TESTS == "YES" ]; then
xcodebuild build-for-testing -configuration Debug -enableCodeCoverage YES -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild test-without-building -configuration Debug -enableCodeCoverage YES -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
else
xcodebuild build -configuration Debug -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
fi;
# Build Framework in Release and Run Tests if specified
- |
if [ $RUN_TESTS == "YES" ]; then
xcodebuild build-for-testing -configuration Release -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
xcodebuild test-without-building -configuration Release -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
else
xcodebuild build -configuration Release -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" | xcpretty
fi
after_success:
- bash <(curl -s https://codecov.io/bash)