mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Update Travis configuration (#643)
Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
797a78e718
commit
166432985d
57
.travis.yml
57
.travis.yml
@ -1,27 +1,54 @@
|
||||
sudo: required
|
||||
dist: trusty
|
||||
dist: xenial
|
||||
|
||||
language: java
|
||||
jdk: oraclejdk8
|
||||
|
||||
jdk:
|
||||
- openjdk8
|
||||
- openjdk11
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
- $HOME/.p2
|
||||
- extensions/ui/org.eclipse.smarthome.ui.paper/npm_cache
|
||||
|
||||
before_install: echo "MAVEN_OPTS='-Xms1g -Xmx2g -XX:PermSize=512m -XX:MaxPermSize=1g'" > ~/.mavenrc
|
||||
|
||||
#$ mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
#$ mvn test -B
|
||||
|
||||
before_install:
|
||||
- echo "MAVEN_OPTS='-Xms1g -Xmx2g'" > ~/.mavenrc
|
||||
install:
|
||||
- echo 'mvn clean verify -B -V -Dspotbugs.skip=true 1> .build.stdout 2> .build.stderr' > .build.sh
|
||||
- chmod 0755 .build.sh
|
||||
script:
|
||||
- travis_wait 60 ./.build.sh
|
||||
- |
|
||||
function extra_maven_opts() {
|
||||
if [ "$TRAVIS_JDK_VERSION" != "openjdk8" ]; then echo "-Denforcer.skip=true"; fi;
|
||||
}
|
||||
function prevent_timeout() {
|
||||
local i=0
|
||||
while [ -e /proc/$1 ]; do
|
||||
# print zero width char every 3 minutes while building
|
||||
if [ "$i" -eq "180" ]; then printf %b '\u200b'; i=0; else i=$((i+1)); fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
function print_reactor_summary() {
|
||||
sed -ne '/\[INFO\] Reactor Summary:/,$ p' "$1" | sed 's/\[INFO\] //'
|
||||
}
|
||||
function mvnp() {
|
||||
set -o pipefail # exit build with error when pipes fail
|
||||
local command=(mvn $@)
|
||||
exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout
|
||||
tee .build.log | # write output to log
|
||||
stdbuf -oL grep -E '^\[INFO\] Building .+ \[.+\]$' | # filter progress
|
||||
sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress
|
||||
sed -e :a -e 's/^.\{1,6\}|/ &/;ta' & # right align progress with padding
|
||||
local pid=$!
|
||||
prevent_timeout $pid &
|
||||
wait $pid
|
||||
}
|
||||
after_success:
|
||||
- tail -n 200 .build.stdout
|
||||
- print_reactor_summary .build.log
|
||||
after_failure:
|
||||
- tail -n 300 .build.stderr
|
||||
- tail -n 2000 .build.stdout
|
||||
- tail -n 2000 .build.log
|
||||
env: # required for allowing failures
|
||||
matrix:
|
||||
allow_failures:
|
||||
- jdk: openjdk11
|
||||
script:
|
||||
- mvnp clean verify -B -DskipChecks $(extra_maven_opts)
|
||||
|
Loading…
Reference in New Issue
Block a user