You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2019/02/14 15:36:51 UTC
[arrow] branch master updated: ARROW-4340: [C++][CI] Build IWYU for
LLVM 7 in iwyu docker-compose job
This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 2571b03 ARROW-4340: [C++][CI] Build IWYU for LLVM 7 in iwyu docker-compose job
2571b03 is described below
commit 2571b03cf8dbe1c72e5cbe1ccd921fb07221685e
Author: François Saint-Jacques <fs...@gmail.com>
AuthorDate: Thu Feb 14 09:36:41 2019 -0600
ARROW-4340: [C++][CI] Build IWYU for LLVM 7 in iwyu docker-compose job
Following the instructions in docker-compose.yml gives me a working IWYU build now
```
export PYTHON_VERSION=3.6
docker-compose build cpp
docker-compose build python
docker-compose build lint
docker-compose run iwyu
```
Author: François Saint-Jacques <fs...@gmail.com>
Author: Wes McKinney <we...@apache.org>
Closes #3643 from wesm/ARROW-4340 and squashes the following commits:
56733fc22 <François Saint-Jacques> Refactor iwyu build into docker install script. (#8)
e1c46c721 <Wes McKinney> Build IWYU for LLVM 7 in iwyu docker-compose job
---
dev/lint/run_iwyu.sh => ci/docker_install_iwyu.sh | 31 +++++++++++++----------
dev/lint/Dockerfile | 8 +++---
dev/lint/run_iwyu.sh | 6 +++--
docker-compose.yml | 3 ---
4 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/dev/lint/run_iwyu.sh b/ci/docker_install_iwyu.sh
similarity index 64%
copy from dev/lint/run_iwyu.sh
copy to ci/docker_install_iwyu.sh
index 3f39357..5206f3b 100755
--- a/dev/lint/run_iwyu.sh
+++ b/ci/docker_install_iwyu.sh
@@ -16,21 +16,24 @@
# limitations under the License.
#
-export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX
+set -eu
-mkdir -p /build/lint
-pushd /build/lint
+: ${IWYU_REPO:="https://github.com/include-what-you-use/include-what-you-use.git"}
+: ${IWYU_BRANCH:="clang_7.0"}
+: ${IWYU_SRC:="/tmp/iwyu"}
+: ${IWYU_HOME:="/opt/iwyu"}
-cmake -GNinja \
- -DARROW_PARQUET=ON \
- -DARROW_PYTHON=ON \
- -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' \
- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
- /arrow/cpp
-# Make so that vendored bits are built
-ninja arrow_shared
+git clone "${IWYU_REPO}" "${IWYU_SRC}"
+git -C "${IWYU_SRC}" checkout ${IWYU_BRANCH}
-popd
+mkdir -p "${IWYU_HOME}"
+pushd "${IWYU_HOME}"
+
+# Build IWYU for current Clang
+export CC=clang-7
+export CXX=clang++-7
-export IWYU_COMPILATION_DATABASE_PATH=/build/lint
-/arrow/cpp/build-support/iwyu/iwyu.sh all
+cmake -DCMAKE_PREFIX_PATH=/usr/lib/llvm-7 "${IWYU_SRC}"
+make -j4
+
+popd
diff --git a/dev/lint/Dockerfile b/dev/lint/Dockerfile
index e3562c5..9a547c8 100644
--- a/dev/lint/Dockerfile
+++ b/dev/lint/Dockerfile
@@ -18,9 +18,10 @@
FROM arrow:python-3.6
RUN apt-get install -y -q gnupg && \
- apt update && \
+ apt-get update && \
apt-get install -y -q \
clang-7 \
+ libclang-7-dev \
clang-format-7 \
clang-tidy-7 \
clang-tools-7
@@ -28,5 +29,6 @@ RUN apt-get install -y -q gnupg && \
RUN conda install flake8 && \
conda clean --all -y
-# https://bugs.launchpad.net/ubuntu/+source/iwyu/+bug/1769334
-RUN ln -sv /usr/lib/clang/6.0 /usr/lib/clang/5.0.1
+ENV PATH=/opt/iwyu/bin:$PATH
+ADD ci/docker_install_iwyu.sh /arrow/ci/
+RUN arrow/ci/docker_install_iwyu.sh
diff --git a/dev/lint/run_iwyu.sh b/dev/lint/run_iwyu.sh
index 3f39357..0500968 100755
--- a/dev/lint/run_iwyu.sh
+++ b/dev/lint/run_iwyu.sh
@@ -16,19 +16,21 @@
# limitations under the License.
#
+set -eux
+
export ARROW_BUILD_TOOLCHAIN=$CONDA_PREFIX
mkdir -p /build/lint
pushd /build/lint
cmake -GNinja \
+ -DARROW_FLIGHT=ON \
+ -DARROW_GANDIVA=ON \
-DARROW_PARQUET=ON \
-DARROW_PYTHON=ON \
-DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
/arrow/cpp
-# Make so that vendored bits are built
-ninja arrow_shared
popd
diff --git a/docker-compose.yml b/docker-compose.yml
index b93fed7..b322d9b 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -207,9 +207,6 @@ services:
# docker-compose build lint
# docker-compose run iwyu
image: arrow:lint
- environment:
- CC: clang
- CXX: clang++
command: arrow/dev/lint/run_iwyu.sh
volumes: *ubuntu-volumes