Skip to content

Apache DataFusion SQL Query Engine

ARROW-8: Add .travis.yml and test script for Arrow C++. OS X build fixes

Wes McKinneyb7d1cae441c9
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..cb2d5cb1ba
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,27 @@
+sudo: required
+dist: trusty
+addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ - kalakris-cmake
+ packages:
+ - gcc-4.9 # Needed for C++11
+ - g++-4.9 # Needed for C++11
+ - gcov
+ - cmake
+ - valgrind
+
+matrix:
+ include:
+ - compiler: gcc
+ language: cpp
+ os: linux
+ script:
+ - $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh
+ - compiler: clang
+ language: cpp
+ os: osx
+ addons:
+ script:
+ - $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh
diff --git a/README.md b/README.md
index 4423a91351..d948a996bc 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,16 @@
## Apache Arrow
+<table>
+ <tr>
+ <td>Build Status</td>
+ <td>
+ <a href="https://travis-ci.org/apache/arrow">
+ <img src="https://travis-ci.org/apache/arrow.svg?branch=master" alt="travis build status" />
+ </a>
+ </td>
+ </tr>
+</table>
+
#### Powering Columnar In-Memory Analytics
Arrow is a set of technologies that enable big-data systems to process and move data fast.
diff --git a/ci/travis_script_cpp.sh b/ci/travis_script_cpp.sh
new file mode 100755
index 0000000000..28f16cc021
--- /dev/null
+++ b/ci/travis_script_cpp.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+set -e
+
+mkdir $TRAVIS_BUILD_DIR/cpp-build
+pushd $TRAVIS_BUILD_DIR/cpp-build
+
+CPP_DIR=$TRAVIS_BUILD_DIR/cpp
+
+# Build an isolated thirdparty
+cp -r $CPP_DIR/thirdparty .
+cp $CPP_DIR/setup_build_env.sh .
+
+if [ $TRAVIS_OS_NAME == "linux" ]; then
+ # Use a C++11 compiler on Linux
+ export CC="gcc-4.9"
+ export CXX="g++-4.9"
+fi
+
+source setup_build_env.sh
+
+echo $GTEST_HOME
+
+cmake -DCMAKE_CXX_FLAGS="-Werror" $CPP_DIR
+make lint
+make -j4
+
+if [ $TRAVIS_OS_NAME == "linux" ]; then
+ valgrind --tool=memcheck --leak-check=yes --error-exitcode=1 ctest
+else
+ ctest
+fi
+
+popd
+rm -rf cpp-build