This repository has been archived by the owner on Feb 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
85 lines (74 loc) · 3.04 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
env:
global:
- IOS_SCHEME="Bootstring-iOS"
- MACOS_SCHEME="Bootstring-macOS"
- TVOS_SCHEME="Bootstring-tvOS"
matrix:
include:
# iOS Tests
- os: osx
language: objective-c
osx_image: xcode10.1
env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=12.1,name=iPhone X" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="YES" CODECOV_FLAG="ios12"
- os: osx
language: objective-c
osx_image: xcode10.1
env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=11.4,name=iPhone 7 Plus" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="YES" COVERAGE="NO" CODECOV_FLAG="ios11"
- os: osx
language: objective-c
osx_image: xcode10.1
env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=10.3.1,name=iPhone 6" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="NO" CODECOV_FLAG="ios10"
- os: osx
language: objective-c
osx_image: xcode10.1
env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=9.3,name=iPhone 5s" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="NO" CODECOV_FLAG="ios9"
# tvOS Tests
- os: osx
language: objective-c
osx_image: xcode10.1
env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=12.1,name=Apple TV 4K" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="NO" CODECOV_FLAG="tvos12"
# - os: osx
# language: objective-c
# osx_image: xcode10.1
# env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=11.4,name=Apple TV 4K" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="NO" CODECOV_FLAG="tvos11"
# - os: osx
# language: objective-c
# osx_image: xcode10.1
# env: PROJ="Bootstring.xcodeproj" DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="NO" CODECOV_FLAG="tvos10"
# macOS Tests
- os: osx
language: objective-c
osx_image: xcode10.1
env: PROJ="Bootstring.xcodeproj" DESTINATION="arch=x86_64" SCHEME="$MACOS_SCHEME" RUN_TESTS="YES" LINT="NO" COVERAGE="NO" CODECOV_FLAG="macos"
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
gem install xcpretty -N --no-ri --no-rdoc;
gem install cocoapods --pre --no-rdoc --no-ri --no-document;
gem install slather;
brew update;
brew outdated carthage || brew upgrade carthage;
fi
install:
- ./install-swiftlint.sh;
script:
- set -o pipefail
- swift -version
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
xcodebuild -version;
xcodebuild -showsdks;
fi
- if [ "$RUN_TESTS" == "YES" ]; then
xcodebuild clean test -project "$PROJ" -scheme "$SCHEME" -destination "$DESTINATION" -enableCodeCoverage YES | xcpretty -c;
elif [ "$RUN_TESTS" == "NO" ]; then
xcodebuild clean build -project "$PROJ" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release | xcpretty -c;
fi
- if [ "$LINT" == "YES" ]; then
swiftlint;
carthage build --no-skip-current;
pod lib lint --verbose;
fi
after_success:
- if [ "$COVERAGE" == "YES" ]; then
bash <(curl -s https://codecov.io/bash) -J 'Bootstring' -cF "$CODECOV_FLAG";
slather;
fi