Skip to content

Commit

Permalink
Split up travis build in build and test phase
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Jul 11, 2017
1 parent aa455df commit fdcb848
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
27 changes: 21 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -34,4 +49,4 @@ after_script:
addons:
apt:
packages:
- oracle-java8-installer
- oracle-java8-installer
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
<version>3.0.0</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
Expand Down Expand Up @@ -392,7 +398,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<!-- Travis has an overall 3GB limit -->
<argLine>@{argLine} -Xmx1024m</argLine>
Expand Down
7 changes: 3 additions & 4 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
kill $HEARTBEAT_PROCESS_PID

0 comments on commit fdcb848

Please sign in to comment.