summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-13 18:29:25 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2018-07-26 08:55:59 +0200
commitc06be53b0389a2c5d4d8cad89e53dbfe184b4298 (patch)
tree70603f5e0c491c926c3d46045ba328573bebc0f7
parentd568c6f1251048e0e3378beccbf9d915ce12fa28 (diff)
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
-rwxr-xr-x.ci/ci-configure.sh15
-rwxr-xr-x.ci/ci-make-benchmark.sh5
-rwxr-xr-x.ci/ci-make-checkbuild.sh5
-rwxr-xr-x.ci/ci-make-distcheck.sh5
-rwxr-xr-x.ci/ci-make-examples.sh5
-rwxr-xr-x.ci/ci-make-install.sh5
-rwxr-xr-x.ci/ci-make.sh5
-rwxr-xr-x.ci/travis.sh24
8 files changed, 56 insertions, 13 deletions
diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh
index 74f4848a2f..01a60ea749 100755
--- a/.ci/ci-configure.sh
+++ b/.ci/ci-configure.sh
@@ -2,6 +2,8 @@
2 2
3set -e 3set -e
4 4
5. .ci/travis.sh
6
5CI_BUILD_TYPE="$1" 7CI_BUILD_TYPE="$1"
6 8
7DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings -C" 9DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings -C"
@@ -47,9 +49,16 @@ if [ "$DISTRO" != "" ] ; then
47 OPTS="$OPTS $RELEASE_READY_LINUX_COPTS" 49 OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
48 fi 50 fi
49 docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf' 51 docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf'
52 travis_fold autoreconf autoreconf
53 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
54 --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
55 $(cat $HOME/cid) sh -c "autoreconf -iv"
56 travis_endfold autoreconf
57 travis_fold configure "configure $OPTS"
50 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \ 58 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
51 --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \ 59 --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
52 $(cat $HOME/cid) sh -c "autoreconf -iv && ./configure $OPTS" 60 $(cat $HOME/cid) sh -c "./configure $OPTS"
61 travis_endfold configure
53else 62else
54 OSX_COPTS="--disable-cxx-bindings --with-tests=regular -C" 63 OSX_COPTS="--disable-cxx-bindings --with-tests=regular -C"
55 64
@@ -65,6 +74,10 @@ else
65 74
66 # Normal build test of all targets 75 # Normal build test of all targets
67 rm -f ~/.ccache/ccache.conf 76 rm -f ~/.ccache/ccache.conf
77 travis_fold autoreconf autoreconf
68 autoreconf -iv 78 autoreconf -iv
79 travis_endfold autoreconf
80 travis_fold configure "configure $OSX_COPTS"
69 ./configure $OSX_COPTS 81 ./configure $OSX_COPTS
82 travis_endfold configure
70fi 83fi
diff --git a/.ci/ci-make-benchmark.sh b/.ci/ci-make-benchmark.sh
index bd63977724..9005f482a9 100755
--- a/.ci/ci-make-benchmark.sh
+++ b/.ci/ci-make-benchmark.sh
@@ -1,14 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4. .ci/travis.sh
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8 8travis_fold benchmark "make benchmark"
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make benchmark 10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make benchmark
11else 11else
12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH" 12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
13 make benchmark 13 make benchmark
14fi 14fi
15travis_endfold benchmark
diff --git a/.ci/ci-make-checkbuild.sh b/.ci/ci-make-checkbuild.sh
index 2cb852dba6..aa19844b79 100755
--- a/.ci/ci-make-checkbuild.sh
+++ b/.ci/ci-make-checkbuild.sh
@@ -1,14 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4. .ci/travis.sh
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8 8travis_fold check-build "make check-build"
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make check-build 10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make check-build
11else 11else
12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH" 12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
13 make check-build 13 make check-build
14fi 14fi
15travis_endfold check-build
diff --git a/.ci/ci-make-distcheck.sh b/.ci/ci-make-distcheck.sh
index a00de9911c..79342749ca 100755
--- a/.ci/ci-make-distcheck.sh
+++ b/.ci/ci-make-distcheck.sh
@@ -1,11 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4. .ci/travis.sh
5if [ "$1" != "release-ready" ] ; then 5if [ "$1" != "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8 8travis_fold distcheck "make distcheck"
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \ 10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
11 --env CXX="ccache g++" \ 11 --env CXX="ccache g++" \
@@ -15,3 +15,4 @@ else
15 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH" 15 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
16 make 16 make
17fi 17fi
18travis_endfold distcheck
diff --git a/.ci/ci-make-examples.sh b/.ci/ci-make-examples.sh
index 4ab0f70b7b..7b0a25c12f 100755
--- a/.ci/ci-make-examples.sh
+++ b/.ci/ci-make-examples.sh
@@ -1,14 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4. .ci/travis.sh
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8 8travis_fold examples "make examples"
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make examples 10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make examples
11else 11else
12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH" 12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
13 make examples 13 make examples
14fi 14fi
15travis_endfold examples
diff --git a/.ci/ci-make-install.sh b/.ci/ci-make-install.sh
index 9856179080..0b2970533f 100755
--- a/.ci/ci-make-install.sh
+++ b/.ci/ci-make-install.sh
@@ -1,14 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4. .ci/travis.sh
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8 8travis_fold install "make install"
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make install 10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make install
11else 11else
12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH" 12 export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
13 make install 13 make install
14fi 14fi
15travis_endfold install
diff --git a/.ci/ci-make.sh b/.ci/ci-make.sh
index 988fb1c109..bee5a17500 100755
--- a/.ci/ci-make.sh
+++ b/.ci/ci-make.sh
@@ -1,14 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4. .ci/travis.sh
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8 8travis_fold make make
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make 10 docker exec --env MAKEFLAGS="-j5" --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) make
11else 11else
12 export PATH="$(brew --prefix gettext)/bin:$PATH" 12 export PATH="$(brew --prefix gettext)/bin:$PATH"
13 make 13 make
14fi 14fi
15travis_endfold make
diff --git a/.ci/travis.sh b/.ci/travis.sh
new file mode 100755
index 0000000000..6ae67e2e82
--- /dev/null
+++ b/.ci/travis.sh
@@ -0,0 +1,24 @@
1#!/bin/sh
2
3# https://github.com/travis-ci/travis-rubies/blob/9f7962a881c55d32da7c76baefc58b89e3941d91/build.sh#L38-L44
4
5travis_fold() {
6 echo -e "travis_fold:start:$1\033[33;1m$2\033[0m"
7}
8travis_endfold() {
9 echo -e "\ntravis_fold:end:$1\r"
10}
11
12travis_time_start() {
13 travis_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
14 travis_start_time=$(travis_nanoseconds)
15 echo -en "travis_time:start:$travis_timer_id\r${ANSI_CLEAR}"
16}
17
18travis_time_finish() {
19 local result=$?
20 travis_end_time=$(travis_nanoseconds)
21 local duration=$(($travis_end_time-$travis_start_time))
22 echo -en "\ntravis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration\r${ANSI_CLEAR}"
23 return $result
24}