deephacks / lmdbjni

LMDB for Java
Apache License 2.0
204 stars 28 forks source link

Automated multi-platform builds #60

Closed krisskross closed 8 years ago

krisskross commented 8 years ago

It would be great to set up automated multi-platform builds. It seems travis-ci.org could take care of most of it (Linux, Mac OS X, alas no Windows) – here's an example JNI binding library that successfully uses it: https://github.com/luben/zstd-jni

krisskross commented 8 years ago

Switching jdk on OSX seems to be missing atm.

https://github.com/travis-ci/travis-ci/issues/2317

krisskross commented 8 years ago

Fails without jdk_switcher also.

Worker information
hostname: worker-jupiter-brain:16fc3e50-4212-464c-ab69-7723ed8eab0b
version: v2.0.0 https://github.com/travis-ci/worker/tree/ca6cb0c5d3920912b1c3acc87c44a5da2120a971
instance: 16eab74a-7b6e-49d6-9b85-b333db5d98b1:
startup: 1m6.250472941s
Build system information
Build language: java
Build group: stable
Build dist: precise

$ git clone --depth=50 --branch=master https://github.com/deephacks/lmdbjni.git deephacks/lmdbjni
Cloning into 'deephacks/lmdbjni'...
remote: Counting objects: 540, done.
remote: Compressing objects: 100% (279/279), done.
remote: Total 540 (delta 180), reused 444 (delta 126), pack-reused 0
Receiving objects: 100% (540/540), 513.38 KiB | 0 bytes/s, done.
Resolving deltas: 100% (180/180), done.
Checking connectivity... done.

$ cd deephacks/lmdbjni
$ git checkout -qf b401a8196ebc1beea18a642be1308fbe931402ec
$ java -Xmx32m -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
$ javac -J-Xmx32m -version
javac 1.7.0_45
$ mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/libexec/java_home/bin/java

The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" failed. Retrying, 2 of 3.

Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/libexec/java_home/bin/java

The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" failed. Retrying, 3 of 3.

Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/libexec/java_home/bin/java

The command "eval mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" failed 3 times.

The command "mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V" failed and exited with 1 during .

Your build has been stopped.
krisskross commented 8 years ago

Fixed. Also got more coverage using both Java 7, 8 and OpenJDK, nice!