-
-
Notifications
You must be signed in to change notification settings - Fork 107
/
.travis.yml
69 lines (51 loc) · 2.77 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
69
os: osx
osx_image: xcode11.3
rvm: 2.6.4
branches:
only:
- master
- develop
env:
global:
- LANG=en_US.UTF-8
- PROJECT="JSQSystemSoundPlayer.xcodeproj"
- IOS_SCHEME="JSQSystemSoundPlayer-iOS"
- TVOS_SCHEME="JSQSystemSoundPlayer-tvOS"
- OSX_SCHEME="JSQSystemSoundPlayer-OSX"
- IOS_SDK=iphonesimulator13.2
- TVOS_SDK=appletvsimulator13.2
- OSX_SDK=macosx10.15
matrix:
- DESTINATION="OS=10.3.1,name=iPhone 5" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=11.1,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=12.1,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=13.2.2,name=iPhone 11" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="arch=x86_64" SDK="$OSX_SDK" SCHEME="$OSX_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=11.1,name=Apple TV" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=12.1,name=Apple TV" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=13.2,name=Apple TV" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
before_install:
- gem install cocoapods --without=documentation
script:
- set -o pipefail
- xcodebuild -version -sdk
- if [ $POD_LINT == "YES" ]; then
pod lib lint --skip-tests;
fi
- if [[ $BUILD_EXAMPLE == "YES" && $SDK == $IOS_SDK ]]; then
xcodebuild build analyze -project Example/Example.xcodeproj -scheme Example-iOS -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO | xcpretty -c;
fi
- if [[ $BUILD_EXAMPLE == "YES" && $SDK == $OSX_SDK ]]; then
xcodebuild build analyze -project Example/Example.xcodeproj -scheme Example-OSX -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=NO | xcpretty -c;
fi
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild analyze test -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO | xcpretty -c;
else
xcodebuild build analyze -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO | xcpretty -c;
fi
# Build for reporting test coverage
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild test -project JSQSystemSoundPlayer.xcodeproj -scheme "JSQSystemSoundPlayer-iOS" -destination "platform=iOS Simulator,name=iPhone 11" CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES;
fi
after_success:
- bash <(curl -s https://codecov.io/bash)