You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by ap...@apache.org on 2016/04/20 02:23:18 UTC

mahout git commit: (nojira): follow dl4j's travis configuration using a 30 second ping to keep long tests alive

Repository: mahout
Updated Branches:
  refs/heads/master 48f05d6c0 -> df1f064a0


(nojira): follow dl4j's travis configuration using a 30 second ping to keep long tests alive


Project: http://git-wip-us.apache.org/repos/asf/mahout/repo
Commit: http://git-wip-us.apache.org/repos/asf/mahout/commit/df1f064a
Tree: http://git-wip-us.apache.org/repos/asf/mahout/tree/df1f064a
Diff: http://git-wip-us.apache.org/repos/asf/mahout/diff/df1f064a

Branch: refs/heads/master
Commit: df1f064a08ffeef1f413c807d97664d3e6de8118
Parents: 48f05d6
Author: Andrew Palumbo <ap...@apache.org>
Authored: Tue Apr 19 20:20:11 2016 -0400
Committer: Andrew Palumbo <ap...@apache.org>
Committed: Tue Apr 19 20:20:11 2016 -0400

----------------------------------------------------------------------
 .travis.yml | 15 +++++++++------
 runtests.sh | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mahout/blob/df1f064a/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 1deecb7..4776f5f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,12 +1,11 @@
-sudo: false
+sudo: true
 
 cache:
   directories:
   - $HOME/.m2
 
-install: travis_wait mvn -B clean install 
-
-language: java
+script:
+ language: java
 
 branches:
   only:
@@ -16,7 +15,7 @@ branches:
 matrix:
   include:
     - jdk: "oraclejdk7"
-      env: PROFILE="-Dhadoop.version=2.4.1 -Dscala-2.10 -Dflink.version=1.0.1 -Dspark.version=1.5.2"
+      env: PROFILE="-Dhadoop.version=2.4.1 -Dflink.version=1.0.1 -Dspark.version=1.5.2"
 
 git:
   depth: 10
@@ -26,7 +25,7 @@ notifications:
 
 env:
   global:
-    MAVEN_OPTS="-Xmx6g -Xms256m -XX:MaxPermSize=512m"
+    MAVEN_OPTS="-Xmx2g -Xms256m -XX:MaxPermSize=512m"
 
 before_install:
   - wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
@@ -34,6 +33,10 @@ before_install:
   - export M2_HOME=$PWD/apache-maven-3.3.9
   - export PATH=$M2_HOME/bin:$PATH
 
+ script:
+  - cd /home/travis/build/mahout/ && chmod +x ./runtests.sh && ./runtests.sh
+
+
 
 
 

http://git-wip-us.apache.org/repos/asf/mahout/blob/df1f064a/runtests.sh
----------------------------------------------------------------------
diff --git a/runtests.sh b/runtests.sh
new file mode 100644
index 0000000..de45649
--- /dev/null
+++ b/runtests.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+# Abort on Error
+set -e
+
+export PING_SLEEP=30s
+export WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+export BUILD_OUTPUT=$WORKDIR/build.out
+
+touch $BUILD_OUTPUT
+
+dump_output() {
+   echo Tailing the last 500 lines of output:
+   tail -500 $BUILD_OUTPUT
+}
+error_handler() {
+  echo ERROR: An error was encountered with the build.
+  dump_output
+  exit 1
+}
+# If an error occurs, run our error handler to output a tail of the build
+trap 'error_handler' ERR
+
+# Set up a repeating loop to send some output to Travis.
+
+bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" &
+PING_LOOP_PID=$!
+
+
+# My build is using maven, but you could build anything with this, E.g.
+# your_build_command_1 >> $BUILD_OUTPUT 2>&1
+# your_build_command_2 >> $BUILD_OUTPUT 2>&1
+mvn clean test >> $BUILD_OUTPUT 2>&1
+
+# The build finished without returning an error so dump a tail of the output
+dump_output
+
+# nicely terminate the ping output loop
+kill $PING_LOOP_PID
+