forked from twitter/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
441 lines (423 loc) · 14.9 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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
env:
global:
- PANTS_CONFIG_OVERRIDE="['pants.travis-ci.ini']"
- ANDROID_SDK_INSTALL_LOCATION="${HOME}/opt/android-sdk-install"
- ANDROID_HOME="$ANDROID_SDK_INSTALL_LOCATION/android-sdk-linux"
# Credentials for OSX syncing: GH_USER, GH_EMAIL, GH_TOKEN
# These are encrypted with a public key for our repo that only
# Travis-CI has the private key for. We are trusting Travis-CI
# here but no-one else.
#
# See: http://docs.travis-ci.com/user/encryption-keys/
- secure: VvwbndU++a2/iNAjk9cd67ATiipDwqcKnxDR4/J2Ik3GH10wHEDUhJ1+MK4WLhedfaOakDOEmarZQS3GwtgvCHO3knpTJuJc8d/bCfZovYuSqdi//BEv4dS7hDt6tQeJfkbBjG0T4yNjPJ3W9R9KDWCy/vj2CUm90BGg2CmxUbg=
# User for bintray deploys: BINTRAY_USER
- secure: eXGuKvbp297wi/z74jFqGyxzRDCFic9HUb0z2UYDXDmobErILZdgT0KCvqeyAx7QX/JQSp5oQAQNisE8RLrain5lXAIa2ZuswTPsh6yXGmFgwdx/X+Am7CPO27b0P5OxiJAN3kfYglN7qY+opRM1jud4anzEaTJnm7jENFfDXwk=
# Key for bintray deploys: BINTRAY_KEY
- secure: qid/ot1XIWOpNaN+RhgdJq8IEajcpHI5EFvy2ywkYHJO2hKYawyX2M4gFd0Vq8+xmeGB4MUmpPW8D8gijLi5JB+0aZ3+5JHs5r9NWkK7HVMpVnok3CywknzXBgeo+UoEQv9ugYvRr1Sm9Dj9IezAhM0tw1uS95Ap+JLbnWFB830=
before_cache:
# Ensure permissions to do the below removals, which happen with or without caching enabled.
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
# Kill all python bytecode in our cached venvs. Some files appear to
# get bytecode compiled in non-yet-understood circumstances leading to
# a full cache re-pack due to new bytecode files.
- find build-support -name "*.py[co]" -delete
# The `ivydata-*.properties` & root level `*.{properties,xml}` files'
# effect on resolution time is in the noise, but they are
# re-timestamped in internal comments and fields on each run and this
# leads to travis-ci cache thrash. Kill these files before the cache
# check to avoid un-needed cache re-packing and re-upload (a ~100s
# operation).
- find ${HOME}/.ivy2/pants -type f -name "ivydata-*.properties" -delete
- rm -f ${HOME}/.ivy2/pants/*.{css,properties,xml,xsl}
# We have several tests that do local file:// url resolves for
# com.example artifacts, these disrupt the cache but are fast since
# they're resolved from local files when omitted from the cache.
- rm -rf ${HOME}/.ivy2/pants/com.example
# The stats cache contains timestamped reports unused by CI but that
# thrash the cache. Skip caching these.
- rm -rf ${HOME}/.cache/pants/stats
cache:
directories:
- ${HOME}/.cache/pants
- ${HOME}/.ivy2/pants
# TODO(John Sirois): Update this to ~/.npm/pants when pants starts
# using its own isolated cache:
# https://github.com/pantsbuild/pants/issues/2485
- ${HOME}/.npm
- ${HOME}/.android
- ${ANDROID_SDK_INSTALL_LOCATION}
- build-support/isort.venv
- build-support/pants_dev_deps.venv
# NB: There is much repetition in include elements, but there is no known current way to factor
# this duplication up.
matrix:
include:
- os: osx
language: generic
env:
- SHARD="OSX Bintray Builder"
script:
- ./build-support/bin/native/generate-bintray-manifest.sh
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
# Docker runs will write files as root, so avoid caching for this shard.
cache: false
services:
- docker
language: python
python: "2.7.13"
env:
- SHARD="Linux Bintray Builder"
# Use the standard python manylinux image for ideal binary compatibility.
- DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64"
before_install:
# Remove any Ubuntu binary cruft before building.
- git clean -fdx
- rm -rf ~/.cache/pants
- docker pull $DOCKER_IMAGE
script:
# Map virtual mount paths 1:1 to simulate running in-place in travis.
- docker run --rm -t
-v "${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR}"
-v "${HOME}:${HOME}"
-e "HOME=${HOME}"
"${DOCKER_IMAGE}"
sh -c "
export PATH=/opt/python/cp27-cp27mu/bin:/opt/rh/devtoolset-2/root/usr/bin:${PATH} ;
cd $TRAVIS_BUILD_DIR && ./build-support/bin/native/generate-bintray-manifest.sh
"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Various pants self checks and lint"
script:
- ./build-support/bin/ci.sh -x -cjlpn 'Various pants self checks and lint'
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Unit tests for pants and pants-plugins - shard 1"
script:
- ./build-support/bin/ci.sh -x -fkmsrcnt -u 0/2 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Unit tests for pants and pants-plugins - shard 2"
script:
- ./build-support/bin/ci.sh -x -fkmsrcnt -u 1/2 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python contrib tests - shard 1"
script:
- ./build-support/bin/ci.sh -x -fkmsrcjlpt -y 0/2 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python contrib tests - shard 2"
script:
- ./build-support/bin/ci.sh -x -fkmsrcjlpt -y 1/2 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 1"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 0/7 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 2"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 1/7 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 3"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 2/7 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 4"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 3/7 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 5"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 4/7 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 6"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 5/7 "${SHARD}"
- os: linux
dist: trusty
group: deprecated-2017Q2
sudo: required
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
language: python
python: "2.7.13"
before_install:
# Remove bad openjdk6 from trusty image, so
# Pants will pick up oraclejdk6 from `packages` above.
- sudo rm -rf /usr/lib/jvm/java-1.6.0-openjdk-amd64
- sudo rm -rf /usr/lib/jvm/java-6-openjdk-amd64
- jdk_switcher use oraclejdk8
before_script:
- ./build-support/bin/install-android-sdk.sh
env:
- SHARD="Python integration tests for pants - shard 7"
script:
- ./build-support/bin/ci.sh -x -fkmsrjlpnt -i 6/7 "${SHARD}"
deploy:
# See: https://docs.travis-ci.com/user/deployment/bintray/
provider: bintray
# NB: This is generated in after_success in each shard above.
file: ./native-engine.bintray.json
user: ${BINTRAY_USER}
key: ${BINTRAY_KEY}
dry-run: false
on:
condition: -f ./native-engine.bintray.json
# NB: Deploys are always tagged as part of the deploy process encoded in
# `build-support/bin/release.sh`, so this ensures we release an appropriate native engine binary
# for all releases. Unfortunately, CI only runs after the release tag hits origin and so there
# will be a lag of roughly 30 minutes until a pypi release has its paired native engine version
# available on bintray for OSX and linux. This trade-off (vs releasing for all branch builds),
# helps us use bintray in a friendly way.
tags: true
# We accept the default travis-ci email author+committer notification
# for now which is enabled even with no `notifications` config.
# notifications:
# email: ...