Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
test: add jdk9 Travis job
- Loading branch information
Showing
with
150 additions
and
13 deletions.
-
+19
−6
.travis.yml
-
+54
−0
pgjdbc/pom.xml
-
+10
−0
toolchains.xml
-
+11
−5
travis_build.sh
-
+56
−2
ubenchmark/pom.xml
|
@@ -8,6 +8,7 @@ before_script: |
|
|
- echo "MAVEN_OPTS='-Xmx1g -Dgpg.skip=true'" > ~/.mavenrc |
|
|
- test "x$PG_VERSION" == 'x' || test $PG_VERSION == '8.4' || test $PG_VERSION == '9.0' || psql test -c 'CREATE EXTENSION hstore;' -U postgres |
|
|
- test "x$PG_VERSION" == 'x' || test $PG_VERSION != '8.4' || createlang -U postgres plpgsql test |
|
|
- if [[ "x$JDK" == *'x9'* ]]; then remove_dir_from_path $JAVA_HOME/bin; export JAVA_HOME=/usr/lib/jvm/java-9-oracle; export PATH=$JAVA_HOME/bin:$PATH; java -Xmx32m -version; fi |
|
|
|
|
|
env: |
|
|
global: |
|
@@ -20,6 +21,8 @@ script: |
|
|
- export JDK6_HOME=$(jdk_switcher home openjdk6) |
|
|
- export JDK7_HOME=$(jdk_switcher home openjdk7) |
|
|
- export JDK8_HOME=$(jdk_switcher home oraclejdk8) |
|
|
- export JDK9_HOME=/usr/lib/jvm/java-9-oracle |
|
|
- test -d "${JDK9_HOME}" || export JDK9_HOME=$(jdk_switcher home oraclejdk8) |
|
|
- envsubst < toolchains.xml > ~/.m2/toolchains.xml |
|
|
- ./travis_build.sh |
|
|
# To avoid useless S3 cache updates (https://github.com/travis-ci/travis-ci/issues/1441#issuecomment-67607074) |
|
@@ -72,6 +75,7 @@ matrix: |
|
|
- PG_VERSION=9.4 |
|
|
- COVERAGE=Y |
|
|
- MCENTRAL=Y |
|
|
- JDOC=Y |
|
|
- jdk: openjdk7 |
|
|
addons: |
|
|
postgresql: "9.4" |
|
@@ -84,6 +88,21 @@ matrix: |
|
|
env: |
|
|
- PG_VERSION=9.4 |
|
|
- MCENTRAL=Y |
|
|
- jdk: oraclejdk8 # this will be overwritten by before_install above |
|
|
addons: |
|
|
apt: |
|
|
packages: |
|
|
- oracle-java9-installer |
|
|
env: |
|
|
- PG_VERSION=9.5 |
|
|
- JDK=9 |
|
|
- jdk: oraclejdk8 |
|
|
addons: |
|
|
postgresql: "9.4" |
|
|
env: |
|
|
- PG_VERSION=9.4 |
|
|
- NO_WAFFLE_NO_OSGI=Y |
|
|
- JDOC=Y |
|
|
- jdk: openjdk7 |
|
|
addons: |
|
|
postgresql: "9.3" |
|
@@ -102,12 +121,6 @@ matrix: |
|
|
env: |
|
|
- PG_VERSION=9.1 |
|
|
- COVERAGE=Y |
|
|
- jdk: oraclejdk8 |
|
|
addons: |
|
|
postgresql: "9.4" |
|
|
env: |
|
|
- PG_VERSION=9.4 |
|
|
- NO_WAFFLE_NO_OSGI=Y |
|
|
|
|
|
# Deploy snapshots to Maven Central |
|
|
after_success: |
|
|
|
@@ -180,6 +180,60 @@ |
|
|
</build> |
|
|
</profile> |
|
|
|
|
|
<profile> |
|
|
<id>jdk9-workarounds</id> |
|
|
<!-- see https://github.com/pgjdbc/pgjdbc/pull/565 --> |
|
|
<activation> |
|
|
<property> |
|
|
<name>javac.target</name> |
|
|
<value>1.9</value> |
|
|
</property> |
|
|
</activation> |
|
|
<build> |
|
|
<pluginManagement> |
|
|
<plugins> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-source-plugin</artifactId> |
|
|
<dependencies> |
|
|
<dependency> |
|
|
<groupId>org.codehaus.plexus</groupId> |
|
|
<artifactId>plexus-archiver</artifactId> |
|
|
<version>2.4.4</version> |
|
|
<!-- newer versions fail as described in http://stackoverflow.com/a/36605759/1261287 |
|
|
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 |
|
|
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.<clinit>(AbstractZipArchiver.java:116) |
|
|
--> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
</plugin> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-jar-plugin</artifactId> |
|
|
<dependencies> |
|
|
<dependency> |
|
|
<groupId>org.codehaus.plexus</groupId> |
|
|
<artifactId>plexus-archiver</artifactId> |
|
|
<version>2.4.4</version> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
</plugin> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-assembly-plugin</artifactId> |
|
|
<version>2.4.1</version> <!-- override version to older one --> |
|
|
<dependencies> |
|
|
<dependency> |
|
|
<groupId>org.codehaus.plexus</groupId> |
|
|
<artifactId>plexus-archiver</artifactId> |
|
|
<version>2.4.4</version> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
</plugin> |
|
|
</plugins> |
|
|
</pluginManagement> |
|
|
</build> |
|
|
</profile> |
|
|
|
|
|
</profiles> |
|
|
|
|
|
|
@@ -39,4 +39,14 @@ |
|
|
<jdkHome>${JDK8_HOME}</jdkHome> |
|
|
</configuration> |
|
|
</toolchain> |
|
|
<toolchain> |
|
|
<type>jdk</type> |
|
|
<provides> |
|
|
<version>1.9</version> |
|
|
<vendor>oracle</vendor> |
|
|
</provides> |
|
|
<configuration> |
|
|
<jdkHome>${JDK9_HOME}</jdkHome> |
|
|
</configuration> |
|
|
</toolchain> |
|
|
</toolchains> |
|
@@ -15,7 +15,17 @@ then |
|
|
MVN_PROFILES="$MVN_PROFILES,coverage" |
|
|
fi |
|
|
|
|
|
if [[ "${TRAVIS_JDK_VERSION}" == *"jdk6"* ]]; |
|
|
if [[ "${JDK}" == *"9"* ]]; |
|
|
then |
|
|
export MAVEN_SKIP_RC=true |
|
|
MVN_ARGS="$MVN_ARGS -Dcurrent.jdk=1.9 -Djavac.target=1.9" |
|
|
fi |
|
|
|
|
|
if [[ "$JDOC" == *"Y"* ]]; |
|
|
then |
|
|
# Build javadocs for Java 8 only |
|
|
mvn ${MVN_ARGS} -P ${MVN_PROFILES},release-artifacts |
|
|
elif [[ "${TRAVIS_JDK_VERSION}" == *"jdk6"* ]]; |
|
|
then |
|
|
git clone --depth=50 https://github.com/pgjdbc/pgjdbc-jre6.git pgjdbc-jre6 |
|
|
cd pgjdbc-jre6 |
|
@@ -25,10 +35,6 @@ then |
|
|
git clone --depth=50 https://github.com/pgjdbc/pgjdbc-jre7.git pgjdbc-jre7 |
|
|
cd pgjdbc-jre7 |
|
|
mvn ${MVN_ARGS} -P ${MVN_PROFILES},skip-unzip-jdk |
|
|
elif [ "${PG_VERSION}" == "9.4" ]; |
|
|
then |
|
|
# Build javadocs for Java 8 and PG 9.4 only |
|
|
mvn ${MVN_ARGS} -P ${MVN_PROFILES},release-artifacts |
|
|
else |
|
|
mvn ${MVN_ARGS} -P ${MVN_PROFILES} |
|
|
fi |
|
|
|
@@ -67,7 +67,7 @@ POSSIBILITY OF SUCH DAMAGE. |
|
|
</dependencies> |
|
|
|
|
|
<properties> |
|
|
<jmh.version>1.11.2</jmh.version> |
|
|
<jmh.version>1.12</jmh.version> |
|
|
<uberjar.name>benchmarks</uberjar.name> |
|
|
<current.jdk>1.8</current.jdk> |
|
|
<javac.target>${current.jdk}</javac.target> |
|
@@ -155,7 +155,7 @@ POSSIBILITY OF SUCH DAMAGE. |
|
|
<jdk>1.6</jdk> |
|
|
</activation> |
|
|
<properties> |
|
|
<current.jdk>1.7</current.jdk> |
|
|
<current.jdk>1.6</current.jdk> |
|
|
</properties> |
|
|
</profile> |
|
|
<profile> |
|
@@ -182,5 +182,59 @@ POSSIBILITY OF SUCH DAMAGE. |
|
|
</plugins> |
|
|
</build> |
|
|
</profile> |
|
|
<profile> |
|
|
<id>jdk9-workarounds</id> |
|
|
<!-- see https://github.com/pgjdbc/pgjdbc/pull/565 --> |
|
|
<activation> |
|
|
<property> |
|
|
<name>javac.target</name> |
|
|
<value>1.9</value> |
|
|
</property> |
|
|
</activation> |
|
|
<build> |
|
|
<pluginManagement> |
|
|
<plugins> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-source-plugin</artifactId> |
|
|
<dependencies> |
|
|
<dependency> |
|
|
<groupId>org.codehaus.plexus</groupId> |
|
|
<artifactId>plexus-archiver</artifactId> |
|
|
<version>2.4.4</version> |
|
|
<!-- newer versions fail as described in http://stackoverflow.com/a/36605759/1261287 |
|
|
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 |
|
|
at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.<clinit>(AbstractZipArchiver.java:116) |
|
|
--> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
</plugin> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-jar-plugin</artifactId> |
|
|
<dependencies> |
|
|
<dependency> |
|
|
<groupId>org.codehaus.plexus</groupId> |
|
|
<artifactId>plexus-archiver</artifactId> |
|
|
<version>2.4.4</version> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
</plugin> |
|
|
<plugin> |
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
<artifactId>maven-assembly-plugin</artifactId> |
|
|
<version>2.4.1</version> <!-- override version to older one --> |
|
|
<dependencies> |
|
|
<dependency> |
|
|
<groupId>org.codehaus.plexus</groupId> |
|
|
<artifactId>plexus-archiver</artifactId> |
|
|
<version>2.4.4</version> |
|
|
</dependency> |
|
|
</dependencies> |
|
|
</plugin> |
|
|
</plugins> |
|
|
</pluginManagement> |
|
|
</build> |
|
|
</profile> |
|
|
</profiles> |
|
|
</project> |
This comment has been minimized.
bbb0d35
WOW that took a lot of hacking to get to work! Awesome. Now if we could only figure out how to test against postgresql HEAD