forked from jython/jython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (93 loc) · 3.4 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
# https://docs.travis-ci.com/user/languages/java/
# https://docs.travis-ci.com/user/reference/osx/
# https://docs.travis-ci.com/user/reference/windows/
os: linux
dist: focal
language: java
addons:
apt: # only active on Linux
packages:
- ant
hostname: jyshort
jobs:
include:
- name: "openjdk8 on Linux"
dist: xenial
jdk: openjdk8
- name: "openjdk11 on Linux"
jdk: openjdk11
- name: "openjdk13 on Linux"
jdk: openjdk13
- name: "openjdk8 on macOS"
os: osx
osx_image: xcode11.6 # Supports homebrew bundle without needing update
# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/26
# https://docs.travis-ci.com/user/installing-dependencies/
addons:
homebrew:
taps:
# - AdoptOpenJDK/openjdk # for java
# but see https://github.com/AdoptOpenJDK/homebrew-openjdk/issues/106
- homebrew/cask-versions # ant & jdk 8
casks:
- adoptopenjdk8
packages:
- ant
before_install:
# Add the required JDK to the path
- export JAVA_HOME="$(/usr/libexec/java_home -v1.8)"
- echo $JAVA_HOME
- export PATH="$JAVA_HOME/bin:$PATH"
- name: "openjdk11 on macOS"
os: osx
osx_image: xcode11.6 # Supports homebrew bundle without update
# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/26
# https://docs.travis-ci.com/user/installing-dependencies/
addons:
homebrew:
taps:
- AdoptOpenJDK/openjdk # for java
- homebrew/cask-versions # for ant
casks:
- adoptopenjdk11
packages:
- ant
before_install:
# Add the required JDK to the path
- export JAVA_HOME="$(/usr/libexec/java_home -v11)"
- echo $JAVA_HOME
- export PATH="$JAVA_HOME/bin:$PATH"
- name: "openjdk11 on Windows"
os: windows
language: shell # Travis CI Windows does not yet support language: java
env:
- JAVA_HOME="/c/Program Files/AdoptOpenJDK/jdk-11.0.8.10-hotspot"
- ANT_HOME="/c/Users/travis/apache-ant"
- PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH"
before_install:
- pwd # /c/Users/travis/build/<github-user>/<repo-name>
# Install the required JDK (must match JAVA_HOME in env: section)
- choco install adoptopenjdk11
- ls "/c/Program Files/AdoptOpenJDK" # Check JAVA_HOME is correct :(
# Install ant at $ANT_HOME (chosen in env: section)
- curl https://downloads.apache.org/ant/binaries/apache-ant-1.10.8-bin.zip -o apache-ant.zip
- unzip -q apache-ant.zip
- rm apache-ant.zip
- mv apache-ant-1.10.8 $ANT_HOME
#- name: "Lint Python 2 code for syntax errors and undefined names"
# language: python # lint Python code for syntax errors and undefined names
# python: 2.7
# install: pip install flake8
# script: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
allow_failures:
- language: python
- os: osx # remains flakey
# Install (i.e. build) Jython
install:
# Confirm versions and paths (this has been a problem)
- echo $PATH
- java -version
- ant -version
- ant developer-build
# Run the regression test (tweaked for Travis in build.xml)
script: ant regrtest-travis