forked from enlightenment/efl
ci: add folding for travis logs
make the build a bit nicer to read the build output is still insanely verbose, so this isn't super useful as the 'pretty' view still takes so long to load that it's almost always better to just read the raw text log Differential Revision: https://phab.enlightenment.org/D6616
This commit is contained in:
parent
d568c6f125
commit
c06be53b03
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
. .ci/travis.sh
|
||||||
|
|
||||||
CI_BUILD_TYPE="$1"
|
CI_BUILD_TYPE="$1"
|
||||||
|
|
||||||
DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings -C"
|
DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings -C"
|
||||||
|
@ -47,9 +49,16 @@ if [ "$DISTRO" != "" ] ; then
|
||||||
OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
|
OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
|
||||||
fi
|
fi
|
||||||
docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf'
|
docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf'
|
||||||
|
travis_fold autoreconf autoreconf
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
||||||
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
|
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
|
||||||
$(cat $HOME/cid) sh -c "autoreconf -iv && ./configure $OPTS"
|
$(cat $HOME/cid) sh -c "autoreconf -iv"
|
||||||
|
travis_endfold autoreconf
|
||||||
|
travis_fold configure "configure $OPTS"
|
||||||
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
||||||
|
--env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
|
||||||
|
$(cat $HOME/cid) sh -c "./configure $OPTS"
|
||||||
|
travis_endfold configure
|
||||||
else
|
else
|
||||||
OSX_COPTS="--disable-cxx-bindings --with-tests=regular -C"
|
OSX_COPTS="--disable-cxx-bindings --with-tests=regular -C"
|
||||||
|
|
||||||
|
@ -65,6 +74,10 @@ else
|
||||||
|
|
||||||
# Normal build test of all targets
|
# Normal build test of all targets
|
||||||
rm -f ~/.ccache/ccache.conf
|
rm -f ~/.ccache/ccache.conf
|
||||||
|
travis_fold autoreconf autoreconf
|
||||||
autoreconf -iv
|
autoreconf -iv
|
||||||
|
travis_endfold autoreconf
|
||||||
|
travis_fold configure "configure $OSX_COPTS"
|
||||||
./configure $OSX_COPTS
|
./configure $OSX_COPTS
|
||||||
|
travis_endfold configure
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
. .ci/travis.sh
|
||||||
if [ "$1" = "release-ready" ] ; then
|
if [ "$1" = "release-ready" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
travis_fold benchmark "make benchmark"
|
||||||
if [ "$DISTRO" != "" ] ; then
|
if [ "$DISTRO" != "" ] ; then
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make benchmark
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make benchmark
|
||||||
else
|
else
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
||||||
make benchmark
|
make benchmark
|
||||||
fi
|
fi
|
||||||
|
travis_endfold benchmark
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
. .ci/travis.sh
|
||||||
if [ "$1" = "release-ready" ] ; then
|
if [ "$1" = "release-ready" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
travis_fold check-build "make check-build"
|
||||||
if [ "$DISTRO" != "" ] ; then
|
if [ "$DISTRO" != "" ] ; then
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make check-build
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make check-build
|
||||||
else
|
else
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
||||||
make check-build
|
make check-build
|
||||||
fi
|
fi
|
||||||
|
travis_endfold check-build
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
. .ci/travis.sh
|
||||||
if [ "$1" != "release-ready" ] ; then
|
if [ "$1" != "release-ready" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
travis_fold distcheck "make distcheck"
|
||||||
if [ "$DISTRO" != "" ] ; then
|
if [ "$DISTRO" != "" ] ; then
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
|
||||||
--env CXX="ccache g++" \
|
--env CXX="ccache g++" \
|
||||||
|
@ -15,3 +15,4 @@ else
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
||||||
make
|
make
|
||||||
fi
|
fi
|
||||||
|
travis_endfold distcheck
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
. .ci/travis.sh
|
||||||
if [ "$1" = "release-ready" ] ; then
|
if [ "$1" = "release-ready" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
travis_fold examples "make examples"
|
||||||
if [ "$DISTRO" != "" ] ; then
|
if [ "$DISTRO" != "" ] ; then
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make examples
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make examples
|
||||||
else
|
else
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
||||||
make examples
|
make examples
|
||||||
fi
|
fi
|
||||||
|
travis_endfold examples
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
. .ci/travis.sh
|
||||||
if [ "$1" = "release-ready" ] ; then
|
if [ "$1" = "release-ready" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
travis_fold install "make install"
|
||||||
if [ "$DISTRO" != "" ] ; then
|
if [ "$DISTRO" != "" ] ; then
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make install
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make install
|
||||||
else
|
else
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
|
||||||
make install
|
make install
|
||||||
fi
|
fi
|
||||||
|
travis_endfold install
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
. .ci/travis.sh
|
||||||
if [ "$1" = "release-ready" ] ; then
|
if [ "$1" = "release-ready" ] ; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
travis_fold make make
|
||||||
if [ "$DISTRO" != "" ] ; then
|
if [ "$DISTRO" != "" ] ; then
|
||||||
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make
|
docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make
|
||||||
else
|
else
|
||||||
export PATH="$(brew --prefix gettext)/bin:$PATH"
|
export PATH="$(brew --prefix gettext)/bin:$PATH"
|
||||||
make
|
make
|
||||||
fi
|
fi
|
||||||
|
travis_endfold make
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# https://github.com/travis-ci/travis-rubies/blob/9f7962a881c55d32da7c76baefc58b89e3941d91/build.sh#L38-L44
|
||||||
|
|
||||||
|
travis_fold() {
|
||||||
|
echo -e "travis_fold:start:$1\033[33;1m$2\033[0m"
|
||||||
|
}
|
||||||
|
travis_endfold() {
|
||||||
|
echo -e "\ntravis_fold:end:$1\r"
|
||||||
|
}
|
||||||
|
|
||||||
|
travis_time_start() {
|
||||||
|
travis_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
|
||||||
|
travis_start_time=$(travis_nanoseconds)
|
||||||
|
echo -en "travis_time:start:$travis_timer_id\r${ANSI_CLEAR}"
|
||||||
|
}
|
||||||
|
|
||||||
|
travis_time_finish() {
|
||||||
|
local result=$?
|
||||||
|
travis_end_time=$(travis_nanoseconds)
|
||||||
|
local duration=$(($travis_end_time-$travis_start_time))
|
||||||
|
echo -en "\ntravis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration\r${ANSI_CLEAR}"
|
||||||
|
return $result
|
||||||
|
}
|
Loading…
Reference in New Issue