mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
First cut at IWYU docker setup
Change-Id: Iccfdc2fd0649dd0345b555354c74956c255326fc
This commit is contained in:
1 parent
b5a97cb774
commit
5c4ade8abd
4 files changed
+81
-1
No files matched your search
@@ -85,4 +85,3 @@ RUN pip install -q \
|
||||
pycodestyle
|
||||
|
||||
CMD arrow/dev/dask_integration/dask_integration.sh
|
||||
|
||||
@@ -67,6 +67,12 @@ services:
|
||||
volumes:
|
||||
- ../..:/apache-arrow
|
||||
|
||||
iwyu:
|
||||
build:
|
||||
context: iwyu
|
||||
volumes:
|
||||
- ../..:/apache-arrow
|
||||
|
||||
run_site:
|
||||
build:
|
||||
context: run_site
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
FROM ubuntu:18.04
|
||||
ADD . /apache-arrow
|
||||
WORKDIR /apache-arrow
|
||||
|
||||
RUN apt-get update -qq &&\
|
||||
apt-get install -qq apt-utils wget gnupg software-properties-common
|
||||
|
||||
RUN wget -O llvm-apt.gpg.key http://llvm.org/apt/llvm-snapshot.gpg.key &&\
|
||||
apt-key add llvm-apt.gpg.key &&\
|
||||
apt-add-repository -y \
|
||||
"deb http://llvm.org/apt/bionic/ llvm-toolchain-bionic-6.0 main" &&\
|
||||
apt-get update -qq &&\
|
||||
apt-get install -q -y cmake clang-6.0 clang-format-6.0 clang-tidy-6.0 libclang-6.0-dev
|
||||
|
||||
CMD arrow/dev/iwyu/run_iwyu.sh
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You 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.
|
||||
#
|
||||
|
||||
# Set up environment and working directory
|
||||
CLANG_VERSION=6.0
|
||||
IWYU_BUILD_DIR=`pwd`/arrow/cpp/docker-iwyu
|
||||
IWYU_URL=https://github.com/include-what-you-use/include-what-you-use/archive/clang_$CLANG_VERSION.tar.gz
|
||||
|
||||
mkdir -p $IWYU_BUILD_DIR
|
||||
pushd $IWYU_BUILD_DIR
|
||||
|
||||
# Build IWYU
|
||||
wget -O iwyu.tar.gz $IWYU_URL
|
||||
tar xzf iwyu.tar.gz
|
||||
rm -f iwyu.tar.gz
|
||||
|
||||
IWYU_SRC=`pwd`/include-what-you-use-clang_$CLANG_VERSION
|
||||
|
||||
mkdir iwyu-build
|
||||
pushd iwyu-build
|
||||
cmake -G "Unix Makefiles" -DIWYU_LLVM_ROOT_PATH=/usr/lib/llvm-$CLANG_VERSION $IWYU_SRC
|
||||
make -j4
|
||||
popd
|
||||
|
||||
# Add iwyu and iwyu_tool.py to path
|
||||
export PATH=$IWYU_BUILD_DIR/iwyu-build:$IWYU_SRC:$PATH
|
||||
|
||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
|
||||
iwyu_tool.py -p .
|
||||
Reference in new issue
Block a user