forked from FabrizioBrancati/Queuer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
121 lines (111 loc) · 4.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
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
env:
global:
- IOS_SCHEME="Queuer iOS"
- MACOS_SCHEME="Queuer macOS"
- TVOS_SCHEME="Queuer tvOS"
- WATCHOS_SCHEME="Queuer watchOS"
matrix:
include:
- os: linux
language: generic
sudo: required
dist: trusty
env: SPM="YES"
- os: linux
language: generic
sudo: required
dist: xenial
env: SPM="YES"
- os: linux
language: generic
sudo: required
dist: yakkety
env: SPM="YES"
- os: osx
language: objective-c
osx_image: xcode9
env: SPM="YES"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=11.0,name=iPhone 7 Plus" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="YES"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=10.3.1,name=iPhone 7" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="YES" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=8.1,name=iPhone 4s" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=11.0,name=Apple TV 1080p" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=4.0,name=Apple Watch Series 2 - 42mm" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="OS=2.0,name=Apple Watch - 38mm" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" LINT="NO" CODECOV="NO"
- os: osx
language: objective-c
osx_image: xcode9
env: PROJ="Queuer.xcodeproj" DESTINATION="arch=x86_64" SCHEME="$MACOS_SCHEME" RUN_TESTS="YES" LINT="NO" CODECOV="NO"
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;
brew update;
brew outdated carthage || brew upgrade carthage;
fi
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)";
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
./install_swiftlint.sh;
fi
script:
- set -o pipefail
- swift -version
- if [ "$SPM" == "YES" ]; then
swift build;
swift test --parallel;
fi
- 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;
fi
- if [ "$RUN_TESTS" == "NO" ]; then
xcodebuild clean build -project "$PROJ" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release | xcpretty;
fi
- if [ "$LINT" == "YES" ]; then
swiftlint;
pod lib lint --verbose;
carthage build --no-skip-current;
fi
after_success:
- if [ "$CODECOV" == "YES" ]; then
bash <(curl -s https://codecov.io/bash) -X xcodeplist;
fi