forked from mxcl/PromiseKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
221 lines (211 loc) · 6.92 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
branches:
only:
- master
- v4
- v7
- legacy-1.x
- /^\d+\.\d+\.\d+$/
stages:
- name: pretest
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
- name: lint
if: NOT branch =~ ^\d+\.\d+\.\d+$
- name: compile
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
- name: test
if: type != push OR branch =~ /^\d+\.\d+\.\d+$/
- name: deploy
if: branch =~ ^\d+\.\d+\.\d+$
jobs:
include:
- stage: pretest
name: Validate Linux has complete test coverage
install: swift test --generate-linuxmain -Xswiftc -target -Xswiftc x86_64-apple-macosx10.12
script: git diff --exit-code
os: osx
osx_image: xcode10.1
language: swift
- &carthage
stage: compile
osx_image: xcode9.2
name: Carthage / Xcode 9.2
os: osx
language: objective-c
script: carthage build --no-skip-current --configuration Release
- <<: *carthage
osx_image: xcode9.4
name: Carthage / Xcode 9.4
- <<: *carthage
osx_image: xcode10.1
name: Carthage / Xcode 10.1
- &pod
stage: lint
osx_image: xcode8.3
env: SWIFT=3.1
name: pod lib lint --swift-version=3.1
os: osx
cache: cocoapods
language: objective-c
before_install: mv .github/PromiseKit.podspec .
install: gem install cocoapods --pre -v 1.7.0.beta.2
script: pod lib lint --subspec=PromiseKit/CorePromise --fail-fast --swift-version=$SWIFT
- <<: *pod
osx_image: xcode9.2
env: SWIFT=3.2
name: pod lib lint --swift-version=3.2
- <<: *pod
osx_image: xcode9.4
env: SWIFT=3.3
name: pod lib lint --swift-version=3.3
- <<: *pod
osx_image: xcode10.1
env: SWIFT=3.4
name: pod lib lint --swift-version=3.4
- <<: *pod
osx_image: xcode9.2
env: SWIFT=4.0
name: pod lib lint --swift-version=4.0
- <<: *pod
osx_image: xcode9.4
env: SWIFT=4.1
name: pod lib lint --swift-version=4.1
- <<: *pod
osx_image: xcode10.1
env: SWIFT=4.2
name: pod lib lint --swift-version=4.2
- <<: *pod
osx_image: xcode10.2
env: SWIFT=4.2
name: pod lib lint --swift-version=5.0
- &linux
stage: compile
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.0.3
name: Linux / Swift 3.2
os: linux
dist: trusty
sudo: false
language: generic
before_install: eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
install: swift build -Xswiftc -swift-version -Xswiftc $SWIFT_BUILD_VERSION
script: "true"
- <<: *linux
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.1.2
name: Linux / Swift 3.3
- <<: *linux
env: SWIFT_BUILD_VERSION=3 SWIFT_VERSION=4.2.1
name: Linux / Swift 3.4
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.0.3
name: Linux / Swift 4.0
stage: test
script: swift test -Xswiftc -swift-version -Xswiftc 4
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.1.2
name: Linux / Swift 4.1
- <<: *linux
env: SWIFT_BUILD_VERSION=4 SWIFT_VERSION=4.2.2
name: Linux / Swift 4.2
stage: test
script: swift test -Xswiftc -swift-version -Xswiftc 4
- <<: *linux
env: SWIFT_BUILD_VERSION=5 SWIFT_VERSION=5.0
name: Linux / Swift 5.0
stage: test
script: swift test -Xswiftc -swift-version -Xswiftc 5
- &test
stage: test
name: macOS / Xcode 9.2 / Swift 4.0.3
osx_image: xcode9.2
os: osx
language: objective-c
env: DST='platform=OS X,arch=x86_64'
before_install: |
set -exo pipefail
gem install xcpretty
install:
xcodebuild -scheme PromiseKit -target PromiseKit -destination "$DST" SWIFT_TREAT_WARNINGS_AS_ERRORS=YES build | xcpretty
script:
xcodebuild -scheme PromiseKit -destination="$DST" -enableCodeCoverage YES SWIFT_VERSION=4 test | xcpretty
after_success:
bash <(curl -s https://codecov.io/bash)
- <<: *test
name: macOS / Xcode 9.4 / Swift 4.1.2
osx_image: xcode9.4
script:
xcodebuild -scheme PromiseKit -destination "$DST" -enableCodeCoverage YES SWIFT_VERSION=4 test | xcpretty
- <<: *test
name: macOS / Xcode 10.1 / Swift 4.2.1
osx_image: xcode10.1
script:
xcodebuild -scheme PromiseKit -destination "$DST" -enableCodeCoverage YES SWIFT_VERSION=4 test | xcpretty
- <<: *test
name: iOS / Xcode 10.1
osx_image: xcode10.1
env: DST='OS=12.1,name=iPhone SE'
- <<: *test
name: tvOS / Xcode 10.1
env: DST='OS=12.1,name=Apple TV'
osx_image: xcode10.1
- stage: test
name: Promises/A+ (via WebKit JavaScript Bridge)
language: objective-c
os: osx
osx_image: xcode10.1
before_install: |
set -exo pipefail
npm install -g npm
gem install xcpretty
install:
bash -c "cd Tests/JS-A+; npm ci &>/dev/null && npm run --hide-modules build"
script: |
set -exo pipefail
xcodebuild -scheme PromiseKit -target PMKJSA+Tests -enableCodeCoverage NO -only-testing:PMKJSA+Tests test | xcpretty
#FIXME ^^ still _builds_ *all* the tests
cache:
directories:
- Tests/JS-A+/build
- Tests/JS-A+/node_modules
- &swiftpm
stage: compile
name: SwiftPM / macOS / Xcode 9.4 / Swift 3.3
os: osx
osx_image: xcode9.4
script: swift build
- <<: *swiftpm
osx_image: xcode10.1
name: SwiftPM / macOS / Xcode 10.1 / Swift 4.2
- stage: deploy
install: gem install cocoapods --pre -v 1.7.0.beta.2
before_script: mv .github/PromiseKit.podspec .
script: |
set -exo pipefail
pod trunk push --verbose --allow-warnings | tee pod.log | ruby -e 'ARGF.each{ print "." }'
# ^^ pipe because Travis times us out if there is no output
# AND `pod` defaults to hardly any output
# BUT `--verbose` generates so much output that Travis kills our script due to *too much* output!
# --allow-warnings because Bolts generates warnings and CocoaPods fails you even if your deps emit warnings
os: osx
osx_image: xcode10.2
language: swift
after_failure: cat pod.log | grep error
- name: Generate Documentation
os: osx
git.depth: false
osx_image: xcode10.1
language: swift
install: gem install jazzy
script: |
set -exo pipefail
jazzy --config .github/jazzy.yml \
--github_url "https://github.com/$TRAVIS_REPO_SLUG" \
--module-version "$TRAVIS_TAG"
git fetch origin
git checkout gh-pages
rm -rf reference/v6
mv foo reference/v6
git add reference/v6
git config user.name "Travis"
git config user.email "[email protected]"
git commit -m "Updated docs for v$TRAVIS_TAG"
git remote add secure-origin https://${GITHUB_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git
git push secure-origin gh-pages