parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jul...@apache.org
Subject parquet-cpp git commit: PARQUET-514: Automate code coverage uploads to coveralls.io, add README badge
Date Fri, 19 Feb 2016 22:15:56 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master fed331727 -> 9cab887f2


PARQUET-514: Automate code coverage uploads to coveralls.io, add README badge

Author: Wes McKinney <wesm@apache.org>

Closes #57 from wesm/PARQUET-514 and squashes the following commits:

f12b5d9 [Wes McKinney] Configure Travis to do a coveralls build. Add coveralls badge


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/9cab887f
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/9cab887f
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/9cab887f

Branch: refs/heads/master
Commit: 9cab887f2337ae6205cbd7ea908bcb749c5c9343
Parents: fed3317
Author: Wes McKinney <wesm@apache.org>
Authored: Fri Feb 19 14:15:50 2016 -0800
Committer: Julien Le Dem <julien@dremio.com>
Committed: Fri Feb 19 14:15:50 2016 -0800

----------------------------------------------------------------------
 .travis.yml           | 14 +++++++++++---
 README.md             | 17 ++++++++++++++++-
 ci/upload_coverage.sh | 17 +++++++++++++++++
 3 files changed, 44 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/9cab887f/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index ad71e29..f93f232 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ addons:
     packages:
     - gcc-4.9
     - g++-4.9
+    - gcov
     - cmake
     - valgrind
     - libboost-dev                 #needed for thrift cpp compilation
@@ -20,16 +21,23 @@ addons:
     - pkg-config                   #needed for thrift cpp compilation
 cache:
   directories:
-  - $HOME/parquet-build
+  - $TRAVIS_BUILD_DIR/parquet-build
 
 matrix:
   include:
   - compiler: gcc
     os: linux
+    before_script:
+    - source $TRAVIS_BUILD_DIR/ci/before_script_travis.sh
+    - cmake -DCMAKE_CXX_FLAGS="-Werror" -DPARQUET_GENERATE_COVERAGE=1 $TRAVIS_BUILD_DIR
+    - export PARQUET_TEST_DATA=$TRAVIS_BUILD_DIR/data
     script:
     - make lint
     - make -j4 || exit 1
     - valgrind --tool=memcheck --leak-check=yes --error-exitcode=1 ctest
+    - sudo pip install cpp_coveralls
+    - export PARQUET_ROOT=$TRAVIS_BUILD_DIR
+    - $TRAVIS_BUILD_DIR/ci/upload_coverage.sh
   - compiler: clang
     os: linux
     script:
@@ -44,8 +52,8 @@ matrix:
 
 language: cpp
 before_install:
-- mkdir $HOME/parquet-build
-- pushd $HOME/parquet-build
+- mkdir $TRAVIS_BUILD_DIR/parquet-build
+- pushd $TRAVIS_BUILD_DIR/parquet-build
 
 before_script:
 - source $TRAVIS_BUILD_DIR/ci/before_script_travis.sh

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/9cab887f/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index b6ec89e..a38b555 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,21 @@
 ## parquet-cpp: a C++ library to read and write the Apache Parquet columnar data format.
 
-[![Build Status](https://travis-ci.org/apache/parquet-cpp.svg)](https://travis-ci.org/apache/parquet-cpp)
+<table>
+  <tr>
+    <td>Build Status</td>
+    <td>
+    <a href="https://travis-ci.org/apache/parquet-cpp">
+    <img src="https://travis-ci.org/apache/parquet-cpp.svg?branch=master" alt="travis
build status" />
+    </a>
+    </td>
+  </tr>
+  <tr>
+    <td>Test coverage</td>
+    <td>
+      <a href='https://coveralls.io/github/apache/parquet-cpp?branch=master'><img
src='https://coveralls.io/repos/github/apache/parquet-cpp/badge.svg?branch=master' alt='Coverage
Status' /></a>
+    </td>
+  </tr>
+</table>
 
 ## Third Party Dependencies
 

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/9cab887f/ci/upload_coverage.sh
----------------------------------------------------------------------
diff --git a/ci/upload_coverage.sh b/ci/upload_coverage.sh
new file mode 100755
index 0000000..066c1f2
--- /dev/null
+++ b/ci/upload_coverage.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -e
+set -x
+
+ROOT_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
+
+mkdir coverage_artifacts
+python $ROOT_DIR/../build-support/collect_coverage.py CMakeFiles/parquet.dir/src/ coverage_artifacts
+
+cd coverage_artifacts
+
+ls -l
+
+echo $PARQUET_ROOT
+
+coveralls --gcov-options '\-l' -r $PARQUET_ROOT --exclude $PARQUET_ROOT/parquet-build/thirdparty
--exclude $PARQUET_ROOT/build --exclude /usr --exclude $PARQUET_ROOT/src/parquet/thrift


Mime
View raw message