-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (63 loc) · 2.55 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
language: java
matrix:
include:
- name: "JDK 8, Python 3.7"
jdk: "openjdk8"
env: TEST_SUITE=java8-3.7
dist: xenial
sudo: true
# Necessary because xenial is still alpha and java can stop working at
# any time.
group: edge
- name: "JDK 8, Python 3.6"
jdk: "openjdk8"
env: TEST_SUITE=java8
- name: "JDK 8, Python 2.7"
jdk: "openjdk8"
env: TEST_SUITE=java8-2.7
# Left in case someone wants to try to build with JDK 6, which uses an old
# TLS version no longer supported by Maven Central. Maven Central is
# required to build and test Py4J (junit).
#- name: "JDK 6, Python 2.7"
#jdk: "openjdk6"
#env: TEST_SUITE=java6
#before_install:
#- wget -O ~/gradle.bin.zip 'https://services.gradle.org/distributions/gradle-2.14.1-bin.zip'
#- unzip ~/gradle.bin.zip -d ~/gradle
#- ls -l ~/
#- ls -l ~/gradle/gradle-2.14.1
#- export PATH="~/gradle/gradle-2.14.1/bin:$PATH"
before_cache:
# Recommended by Travis CI doc
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.cache/pip
install:
- eval "$(pyenv init -)"
# Xenial is alpha right now so we install python 3.7 from deadsnakes ppa, create a venv and run our python commands from that venv.
- if [ $TEST_SUITE == "java8-3.7" ] ; then sudo add-apt-repository ppa:deadsnakes/ppa -y; sudo apt-get update; sudo apt-get install python3.7 python3.7-venv -y; python3.7 -m venv virtualenv; . virtualenv/bin/activate; pip install nose; fi
- if [ $TEST_SUITE == "java8" ] ; then pyenv global 3.6.3; pip install --user flake8==2.5.0; pip install --user nose; fi
- if [ $TEST_SUITE == "java8-2.7" ] ; then pyenv install 2.7.12; pyenv global 2.7.12; pip install --user nose; fi
# Left in case someone wants to try to build with JDK 6.
#- if [ $TEST_SUITE == "java6" ] ; then pyenv install 2.7.12; pyenv global 2.7.12; pip install --user nose; fi
- cd py4j-java
# Useful in case the build stops working because of version issues.
- ./gradlew --version
- echo `java -version` && echo `javac -version` && echo `python --version`
- echo $PATH
- echo $JAVA_HOME
- ./gradlew clean
before_script:
# Enable IPv6
- echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
script:
- ./gradlew check
- ./gradlew assemble
- cd ../py4j-python
# Only run flake8 once to save time.
- if [ $TEST_SUITE == "java8" ] ; then flake8; fi
- nosetests -v