Skip to content

Apache DataFusion SQL Query Engine

ARROW-1135: [C++] Use clang 4.0 in one of the Linux builds

Wes McKinney4c043e4199f2
diff --git a/.travis.yml b/.travis.yml
index 315cbd21f2..ff2cafede9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,8 +85,9 @@ matrix:
env: ARROW_TEST_GROUP=integration
jdk: openjdk7
before_script:
- - export CC="gcc-4.9"
- - export CXX="g++-4.9"
+ - source $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
+ - export CC="clang-4.0"
+ - export CXX="clang++-4.0"
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_integration.sh
@@ -122,11 +123,6 @@ matrix:
before_install:
- ulimit -c unlimited -S
-- export CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
-- export ARROW_CPP_INSTALL=$TRAVIS_BUILD_DIR/cpp-install
-
-after_script:
-- rm -rf $CPP_BUILD_DIR
after_failure:
- COREFILE=$(find . -maxdepth 2 -name "core*" | head -n 1)
diff --git a/ci/travis_before_script_cpp.sh b/ci/travis_before_script_cpp.sh
index 3a1836ca3a..36966da32f 100755
--- a/ci/travis_before_script_cpp.sh
+++ b/ci/travis_before_script_cpp.sh
@@ -64,7 +64,7 @@ fi
if [ $TRAVIS_OS_NAME == "linux" ]; then
cmake $CMAKE_COMMON_FLAGS \
$CMAKE_LINUX_FLAGS \
- -DARROW_CXXFLAGS="-Wconversion -Werror" \
+ -DARROW_CXXFLAGS="-Wconversion -Wno-sign-conversion -Werror" \
$ARROW_CPP_DIR
else
cmake $CMAKE_COMMON_FLAGS \
diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh
index 9ded3e07e7..a2e591014c 100755
--- a/ci/travis_env_common.sh
+++ b/ci/travis_env_common.sh
@@ -23,6 +23,8 @@ export ARROW_JAVA_DIR=${TRAVIS_BUILD_DIR}/java
export ARROW_JS_DIR=${TRAVIS_BUILD_DIR}/js
export ARROW_INTEGRATION_DIR=$TRAVIS_BUILD_DIR/integration
+export CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
+
export ARROW_CPP_INSTALL=$TRAVIS_BUILD_DIR/cpp-install
export ARROW_CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
export ARROW_C_GLIB_INSTALL=$TRAVIS_BUILD_DIR/c-glib-install
diff --git a/ci/travis_install_clang_tools.sh b/ci/travis_install_clang_tools.sh
new file mode 100644
index 0000000000..a4fd0e2461
--- /dev/null
+++ b/ci/travis_install_clang_tools.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License. See accompanying LICENSE file.
+
+wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
+sudo apt-add-repository -y \
+ "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-4.0 main"
+sudo apt-get update
+sudo apt-get install clang-4.0 clang-format-4.0 clang-tidy-4.0