From fdcb848caf31502b71fc8c01ed2746c432abebba Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Mon, 26 Jun 2017 17:15:07 +0200 Subject: [PATCH] Split up travis build in build and test phase --- .travis.yml | 27 +++++++++++++++++++++------ pom.xml | 7 ++++++- travis.sh | 7 +++---- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac04a01b3b6..5a400abc39d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,12 @@ jdk: sudo: false +# The cache is stored per-branch + +cache: + directories: + - $HOME/.m2 + install: - echo ==== Setting up toolchain.xml ==== - ls /usr/lib/jvm @@ -18,13 +24,22 @@ install: before_script: - export M2_HOME=$PWD/maven - - export PATH=$PWD/maven/bin:${PATH} + - export PATH=${M2_HOME}/bin:${PATH} - hash -r -script: ./travis.sh - -after_script: - - bash <(curl -s https://codecov.io/bash) +jobs: + include: + - stage: build + script: + - $M2_HOME/bin/mvn -v + - $M2_HOME/bin/mvn -B -Dgwt.compiler.localWorkers=2 -DskipTests install + - stage: test + script: + - $M2_HOME/bin/mvn -B javadoc:jar + - stage: test + script: + - ./travis.sh $M2_HOME/bin/mvn -B -Dgwt.compiler.localWorkers=2 -Pdev test + - bash <(curl -s https://codecov.io/bash) # The following upgrades Java during the build in # order to work around an older Java 8 compiler issue @@ -34,4 +49,4 @@ after_script: addons: apt: packages: - - oracle-java8-installer \ No newline at end of file + - oracle-java8-installer diff --git a/pom.xml b/pom.xml index ada111a0e76..68f61d6b6ac 100644 --- a/pom.xml +++ b/pom.xml @@ -194,6 +194,12 @@ 3.0.0 + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.version} + + org.apache.maven.plugins maven-war-plugin @@ -392,7 +398,6 @@ org.apache.maven.plugins maven-surefire-plugin - ${surefire.version} @{argLine} -Xmx1024m diff --git a/travis.sh b/travis.sh index 5708e62ebe0..a5283741b00 100755 --- a/travis.sh +++ b/travis.sh @@ -26,12 +26,11 @@ trap 'on_error' ERR bash -c "while true; do echo Building Kapua...; sleep 30; done" & HEARTBEAT_PROCESS_PID=$! -### Build itself +### Run -"$M2_HOME"/bin/mvn -v -"$M2_HOME"/bin/mvn -B -Dorg.eclipse.kapua.qa.waitMultiplier=2.0 -Dgwt.compiler.localWorkers=2 -Pjavadoc,console >> $OUTPUT 2>&1 +"$@" >> $OUTPUT 2>&1 tail_log ### Cleaning up heartbeat process -kill $HEARTBEAT_PROCESS_PID \ No newline at end of file +kill $HEARTBEAT_PROCESS_PID