forked from java-native-access/jna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (32 loc) · 1.72 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
os: linux
dist: trusty
language: java
git:
depth: false
install:
- if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
sudo apt-get -m install openjdk-11-jdk libltdl-dev;
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64;
export PATH=$JAVA_HOME/bin:$PATH;
fi
- export APACHE_ANT_BASE=$(curl http://apache.mirror.iphh.net/ant/binaries/ | grep "apache-ant-1.9..*-bin.tar.gz" | tail -1 | sed 's/.*href="\(.*\)-bin.tar.gz".*/\1/g')
- 'echo "Apache Ant ARCHIVE: $APACHE_ANT_BASE"'
- '[ "${TRAVIS_OS_NAME}" = "linux" ] && wget http://apache.mirror.iphh.net/ant/binaries/$APACHE_ANT_BASE-bin.tar.gz && tar xzf $APACHE_ANT_BASE-bin.tar.gz && sudo mv $APACHE_ANT_BASE /usr/local/$APACHE_ANT_BASE && sudo rm -f /usr/local/ant && sudo ln -s /usr/local/$APACHE_ANT_BASE /usr/local/ant && sudo ln -s /usr/local/$APACHE_ANT_BASE/bin/ant /usr/local/bin/ant || true'
- '[ "${TRAVIS_OS_NAME}" = "osx" ] && brew update || true'
- '[ "${TRAVIS_OS_NAME}" = "osx" ] && brew uninstall libtool && brew install libtool || true'
- '[ "${TRAVIS_OS_NAME}" = "osx" ] && brew install ant || true'
script:
- if [[ "${TRAVIS_CPU_ARCH}" != "arm64" && "x$JDK" != "xdefault" ]]; then wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh && export JAVA_HOME=$(bash install-jdk.sh --feature $JDK --emit-java-home | tail -1); export PATH=$JAVA_HOME/bin:$PATH; fi || true
- ant test
- ant test-platform
- if [ "x$JDK" == "xdefault" ]; then ant checkstyle; fi
- if [ "x$JDK" == "xdefault" ]; then ant dist; fi
jobs:
include:
- env: JDK=default
- env: JDK=11
- env: JDK=ea
- env: JDK=11
arch: arm64
- env: JDK=11
os: osx