zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2af38d11ed58d95f050dc08cc038d6b4aa30ac91

commit 2af38d11ed58d95f050dc08cc038d6b4aa30ac91
Author: Stefan Schmidt <[email protected]>
Date:   Mon Dec 30 11:38:03 2019 -0500

    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
---
 .ci/ci-build-test.sh              |  4 ++--
 .ci/ci-ccache-stats.sh            |  2 +-
 .ci/ci-configure.sh               |  4 ++++
 .ci/ci-make-benchmark.sh          |  2 +-
 .ci/ci-make-check.sh              | 14 +++++++++++++-
 .ci/ci-make-distcheck.sh          |  2 +-
 .ci/ci-make-install.sh            |  4 +++-
 .ci/ci-make.sh                    |  5 ++++-
 .ci/ci-setup-ccache.sh            |  2 +-
 .ci/ubuntu-bionic-install-deps.sh |  4 ++++
 .travis.yml                       |  9 ++++++++-
 11 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/.ci/ci-build-test.sh b/.ci/ci-build-test.sh
index 05b753e38b..949fede958 100755
--- a/.ci/ci-build-test.sh
+++ b/.ci/ci-build-test.sh
@@ -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"
diff --git a/.ci/ci-ccache-stats.sh b/.ci/ci-ccache-stats.sh
index 76b270488c..42f44397d0 100755
--- a/.ci/ci-ccache-stats.sh
+++ b/.ci/ci-ccache-stats.sh
@@ -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
diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh
index f9a58604e7..773e536aa1 100755
--- a/.ci/ci-configure.sh
+++ b/.ci/ci-configure.sh
@@ -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
diff --git a/.ci/ci-make-benchmark.sh b/.ci/ci-make-benchmark.sh
index 17455c1e52..58871dc52f 100755
--- a/.ci/ci-make-benchmark.sh
+++ b/.ci/ci-make-benchmark.sh
@@ -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
diff --git a/.ci/ci-make-check.sh b/.ci/ci-make-check.sh
index 44f5f2bf90..afbf74da35 100755
--- a/.ci/ci-make-check.sh
+++ b/.ci/ci-make-check.sh
@@ -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
diff --git a/.ci/ci-make-distcheck.sh b/.ci/ci-make-distcheck.sh
index 22f441c14b..414c8abd1a 100755
--- a/.ci/ci-make-distcheck.sh
+++ b/.ci/ci-make-distcheck.sh
@@ -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
diff --git a/.ci/ci-make-install.sh b/.ci/ci-make-install.sh
index 157f1a2401..0a4cea890a 100755
--- a/.ci/ci-make-install.sh
+++ b/.ci/ci-make-install.sh
@@ -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
diff --git a/.ci/ci-make.sh b/.ci/ci-make.sh
index 167e2369cb..5611f5dca4 100755
--- a/.ci/ci-make.sh
+++ b/.ci/ci-make.sh
@@ -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
diff --git a/.ci/ci-setup-ccache.sh b/.ci/ci-setup-ccache.sh
index ab7d3b8613..810720e28d 100755
--- a/.ci/ci-setup-ccache.sh
+++ b/.ci/ci-setup-ccache.sh
@@ -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
diff --git a/.ci/ubuntu-bionic-install-deps.sh 
b/.ci/ubuntu-bionic-install-deps.sh
new file mode 100755
index 0000000000..70f0287f09
--- /dev/null
+++ b/.ci/ubuntu-bionic-install-deps.sh
@@ -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 lib [...]
+pip3 install meson
diff --git a/.travis.yml b/.travis.yml
index 15a5aeb93c..1af79309c3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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:

-- 


Reply via email to