forked from foursquare/fsqio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (41 loc) · 1.44 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
sudo: false
services:
- mongodb
before_cache:
- find . -name "*.py[co]" -print -delete
- rm -fv $HOME/.ivy2/pants/*.{css,properties,xml,xsl}
- rm -rf $HOME/.cache/pants/stats
cache:
directories:
# These three are Fsq.io specific and hold artifacts that were intended to be managed by a shared artifact cache.
- .local_artifact_cache/fsqio_pants_pom_pom_resolve_PomResolve
- .local_artifact_cache/fsqio_pants_spindle_tasks_build_spindle_BuildSpindle
- $HOME/.pom2
# The fsqio and pants virtualenvs and shaded tooling.
- $HOME/.cache/fsqio
- $HOME/.cache/pants
- $HOME/.ivy2/pants
# The install location for our managed JDK install.
- $HOME/opt
language: python
python:
- "2.7"
env:
global:
- JAVA_HOME="$HOME/opt/jdk1.8.0_40"
- PANTS_CONFIG_OVERRIDE="['pants.ini', 'pants-travis-ci.ini']"
# Travis does not enable much JDK configuration within Python projects, so we download a JDK and cache it.
before_script: |
if ! "$HOME"/opt/jdk1.8.0_40/bin/java -version; then
mkdir -p ~/opt
wget --no-cookies --no-check-certificate --header \
"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u40-b25/jdk-8u40-linux-x64.tar.gz"
tar xzf jdk-8u40-linux-x64.tar.gz -C ~/opt
fi
script: |
uname -a
./pants buildgen
git diff --exit-code || exit "$?"
./pants compile src::
./pants test test::