ci: create a daily build to run with coverage enabled and upload to codecov

Summary:
For this we bring back a native Linux build on the Travis with Ubuntu
bionic. This allows use easy integration with codecov as Travis and
Codecov have figured out all details.
This means we need to be a bit more careful with our $DIST checks as
empty no longer means osx. It could as well be the Linux job.

Covergae reports will show up here:
https://codecov.io/gh/Enlightenment/efl

We are starting with 36%. Time to improve. :-)

Fixes: T7910

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10867
This commit is contained in:
Stefan Schmidt 2019-12-30 11:38:03 -05:00 committed by Mike Blumenkrantz
parent 9c41899a08
commit 2af38d11ed
11 changed files with 42 additions and 10 deletions

View File

@ -3,14 +3,14 @@
set -e
. .ci/travis.sh
if [ "$1" = "coverity" ] || [ "$1" = "mingw" ] || [ "$1" = "release-ready" ] ; then
if [ "$1" = "codecov" ] || [ "$1" = "coverity" ] || [ "$1" = "mingw" ] || [ "$1" = "release-ready" ]; then
exit 0
fi
travis_fold compile_test compile_test
if [ "$DISTRO" != "" ] ; then
docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-example.sh
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
exit 0
#FIXME: we don't install efl_ui.pc on osx?
export PATH="$(brew --prefix gettext)/bin:$PATH"

View File

@ -4,6 +4,6 @@ set -e
if [ "$DISTRO" != "" ] ; then
docker exec $(cat $HOME/cid) ccache -s
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
ccache -s
fi

View File

@ -100,4 +100,8 @@ elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
travis_fold meson meson
mkdir build && meson build -Dopengl=full -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer1,libvlc,xine
travis_endfold meson
else
travis_fold meson meson
mkdir build && meson build -Decore-imf-loaders-disabler=scim,ibus -Db_coverage=true
travis_endfold meson
fi

View File

@ -8,7 +8,7 @@ fi
travis_fold benchmark "ninja benchmark"
if [ "$DISTRO" != "" ] ; then
docker exec --env EIO_MONITOR_POLL=1 --env ELM_ENGINE=buffer $(cat $HOME/cid) ninja benchmark -C build
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
ninja benchmark -C build
fi

View File

@ -3,11 +3,23 @@
set -e
. .ci/travis.sh
if [ "$1" = "release-ready" ] || [ "$1" = "mingw" ] || [ "$1" = "coverity" ] || [ "$1" = "options-enabled" ] || [ "$1" = "options-disabled" ]; then
if [ "$1" = "release-ready" ] || [ "$1" = "mingw" ] || [ "$1" = "coverity" ] || [ "$1" = "options-enabled" ] || [ "$1" = "options-disabled" ] ; then
exit 0
fi
NUM_TRIES=5
if [ "$1" = "codecov" ] ; then
for tries in $(seq 1 ${NUM_TRIES}); do
meson test -t 120 -C build --wrapper dbus-launch && break
cat build/meson-logs/testlog-dbus-launch.txt
if [ $tries != ${NUM_TRIES} ] ; then echo "tests failed, trying again!" ; fi
false
done
curl -s https://codecov.io/bash | bash -s -
exit 0
fi
travis_fold check "ninja test"
if [ "$DISTRO" != "" ] ; then
for tries in $(seq 1 ${NUM_TRIES}); do

View File

@ -14,7 +14,7 @@ if [ "$DISTRO" != "" ] ; then
--env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
--env LD="ld.gold" $(cat $HOME/cid) dbus-launch ninja -C build dist || \
(sudo cat efl-*/_build/sub/src/test-suite.log; false)
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
ninja -C build dist
fi

View File

@ -14,8 +14,10 @@ if [ "$1" = "asan" ]; then
fi
if [ "$DISTRO" != "" ] ; then
docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build install
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"
ninja -C build install
else
sudo ninja -C build install
fi
travis_endfold install

View File

@ -12,6 +12,7 @@ if [ "$1" = "asan" ]; then
docker exec --env EIO_MONITOR_POLL=1 --env ASAN_OPTIONS=abort_on_error=0 --env LSAN_OPTIONS=suppressions=/src/.ci/asan-ignore-leaks.supp $(cat $HOME/cid) ninja -C build
exit $?
fi
if [ "$DISTRO" != "" ] ; then
if [ "$1" = "coverity" ] ; then
docker exec --env EIO_MONITOR_POLL=1 --env PATH="/src/cov-analysis-linux64-2019.03/bin:$PATH" $(cat $HOME/cid) sh -c "cov-build --dir cov-int ninja -C build"
@ -20,8 +21,10 @@ if [ "$DISTRO" != "" ] ; then
else
docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build
fi
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH="$(brew --prefix gettext)/bin:$PATH"
ninja -C build
else
ninja -C build
fi
travis_endfold ninja

View File

@ -5,7 +5,7 @@ set -e
if [ "$DISTRO" != "" ] ; then
docker exec $(cat $HOME/cid) sh -c ".ci/docker-ccache-setup.sh $1"
docker exec $(cat $HOME/cid) ccache -pz
else
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
cp .ci/ccache.conf ~/.ccache
sed -iE '/^base_dir/d' ~/.ccache/ccache.conf
echo "base_dir = $pwd" >> ~/.ccache/ccache.conf

View File

@ -0,0 +1,4 @@
#!/bin/sh
sudo apt-get update -y
sudo apt-get install -y build-essential autoconf automake autopoint doxygen check luajit libharfbuzz-dev libpng-dev libudev-dev libwebp-dev libssl-dev libluajit-5.1-dev libfribidi-dev libcogl-gles2-dev libgif-dev libtiff5-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdbus-1-dev libmount-dev libblkid-dev libpulse-dev libxrandr-dev libxtst-dev libxcursor-dev libxcomposite-dev libxinerama-dev libxkbfile-dev libbullet-dev libvlc-dev libsndfile1-dev libraw-dev libspectre-dev libpoppler-cpp-dev libpam0g-dev liblz4-dev faenza-icon-theme gettext git imagemagick libasound2-dev libbluetooth-dev libfontconfig1-dev libfreetype6-dev libibus-1.0-dev libiconv-hook-dev libjpeg-dev libjpeg-turbo8-dev libpoppler-dev libpoppler-private-dev libproxy-dev librsvg2-dev libscim-dev libsystemd-dev libtool libudisks2-dev libunibreak-dev libxcb-keysyms1-dev libxine2-dev libxss-dev linux-tools-common libcurl4-openssl-dev systemd ccache git binutils-gold python3-pip ninja-build dbus-x11 libavahi-client-dev python3-setuptools
pip3 install meson

View File

@ -5,7 +5,7 @@ cache:
directories:
- $HOME/cachedir
- $HOME/.ccache
dist: trusty
dist: bionic
osx_image: xcode10.2
@ -74,6 +74,9 @@ jobs:
- os: linux
if: type = cron
env: DISTRO=Fedora31 CI_BUILD_TYPE=asan
- os: linux
if: type = cron
env: CI_BUILD_TYPE=codecov
services:
- docker
@ -94,6 +97,10 @@ before_script:
docker version
docker run --cidfile $HOME/cid -t -d -v `pwd`:/src -v $HOME/.ccache:/root/.ccache -w /src stefanschmidt1/ci-support-files:$DISTRO bash
fi
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$DISTRO" == "" ]]; then
.ci/ubuntu-bionic-install-deps.sh
fi
- .ci/ci-ccache-stats.sh
script: