2020-09-09 18:51:15 +00:00
|
|
|
os: linux
|
|
|
|
dist: focal
|
2017-08-16 10:09:51 +00:00
|
|
|
|
|
|
|
language: java
|
2020-01-12 21:32:28 +00:00
|
|
|
jdk: openjdk11
|
2019-01-28 12:07:31 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.m2
|
|
|
|
|
2019-03-12 12:02:43 +00:00
|
|
|
before_install:
|
|
|
|
- echo "MAVEN_OPTS='-Xms1g -Xmx2g'" > ~/.mavenrc
|
2017-08-16 10:09:51 +00:00
|
|
|
install:
|
2019-03-12 12:02:43 +00:00
|
|
|
- |
|
|
|
|
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() {
|
2019-08-05 12:40:49 +00:00
|
|
|
sed -ne '/\[INFO\] Reactor Summary.*:/,$ p' "$1" | sed 's/\[INFO\] //'
|
2019-03-12 12:02:43 +00:00
|
|
|
}
|
|
|
|
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
|
2019-08-05 12:40:49 +00:00
|
|
|
stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress
|
2019-03-12 12:02:43 +00:00
|
|
|
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
|
|
|
|
}
|
2017-08-16 10:09:51 +00:00
|
|
|
after_success:
|
2019-03-12 12:02:43 +00:00
|
|
|
- print_reactor_summary .build.log
|
2017-08-16 10:09:51 +00:00
|
|
|
after_failure:
|
2019-03-12 12:02:43 +00:00
|
|
|
- tail -n 2000 .build.log
|
|
|
|
script:
|
2019-04-01 04:25:43 +00:00
|
|
|
- mvnp clean verify -B -DskipChecks
|