Skip to content

Commit

Permalink
Added build for H2O R library
Browse files Browse the repository at this point in the history
  • Loading branch information
anqif committed Jul 22, 2013
1 parent fdf4582 commit 3df06ec
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set -o errexit ## set -e : exit the script if any statement returns a non-true
TESTSRC=src/test/java
SAMPLESRC=src/samples/java
RESOURCES=src/main/resources
RSRC=R/h2o-package
# and this is where the jar contents is stored relative to this file again
JAR_ROOT=lib

Expand Down Expand Up @@ -164,6 +165,15 @@ function build_javadoc() {
"${JAVADOC}" -classpath "${CLASSPATH}" -d "${OUTDIR}"/javadoc -sourcepath "${SRC}" -subpackages hex:water 1> /dev/null 2> /dev/null
}

function build_rpackage() {
echo "creating R package..."
if which R > /dev/null; then
R CMD build ${RSRC}
else
echo "Missing R, please install"
fi
}

function junit() {
echo "running JUnit tests..."
"$JAVA" -ea -cp ${JAR_FILE} water.Boot -mainClass water.JUnitRunner
Expand All @@ -179,4 +189,5 @@ build_src_jar
if [ "$1" = "build" ]; then exit 0; fi
build_javadoc
if [ "$1" = "doc" ]; then exit 0; fi
build_rpackage
junit

0 comments on commit 3df06ec

Please sign in to comment.