This repository has been archived by the owner on Dec 10, 2020. It is now read-only.
forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
111 lines (96 loc) · 4.16 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
# sudo required for jdk_switcher and bad openjdk6 removal on trusty image
# in before_install step, and not for any other purpose.
sudo: required
dist: trusty
language: python
python:
- "2.7.11"
# These are needed to run the Android SDK tools.
addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- oracle-java6-installer
before_cache:
# 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]" -print -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" -print -delete
- rm -fv $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
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
install:
- pip --quiet install coveralls
env:
global:
- ANDROID_SDK_INSTALL_LOCATION="$HOME/opt/android-sdk-install"
- ANDROID_HOME="$ANDROID_SDK_INSTALL_LOCATION/android-sdk-linux"
- CXX=g++
- PANTS_CONFIG_OVERRIDE="['pants.travis-ci.ini']"
# 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=
matrix:
- CI_FLAGS="-cjlpn 'Various pants self checks'" # (fkmsr)
- CI_FLAGS="-fkmsrcn -u 0/2 'Unit tests for pants and pants-plugins - shard 1'" # (jlp)
- CI_FLAGS="-fkmsrcn -u 1/2 'Unit tests for pants and pants-plugins - shard 2'"
- CI_FLAGS="-fkmsrcjlp 'Python contrib tests'" # (n)
- CI_FLAGS="-fkmsrjlpn -i 0/7 'Python integration tests for pants - shard 1'" # (c)
- CI_FLAGS="-fkmsrjlpn -i 1/7 'Python integration tests for pants - shard 2'"
- CI_FLAGS="-fkmsrjlpn -i 2/7 'Python integration tests for pants - shard 3'"
- CI_FLAGS="-fkmsrjlpn -i 3/7 'Python integration tests for pants - shard 4'"
- CI_FLAGS="-fkmsrjlpn -i 4/7 'Python integration tests for pants - shard 5'"
- CI_FLAGS="-fkmsrjlpn -i 5/7 'Python integration tests for pants - shard 6'"
- CI_FLAGS="-fkmsrjlpn -i 6/7 'Python integration tests for pants - shard 7'"
before_script:
- ./build-support/bin/ci-sync.sh
- ./build-support/bin/install-android-sdk.sh
script:
- uname -a
- java -version
- echo $JAVA_HOME
# Check if JAVA_HOME is symlinked to the real home
- ls -l $JAVA_HOME
- ./build-support/bin/ci.sh -x ${CI_FLAGS}
# We accept the default travis-ci email author+comitter notification
# for now which is enabled even with no `notifications` config.
# notifications:
# email: ...
after_success:
coveralls