Apache DataFusion SQL Query Engine
ARROW-5525: [C++] Add Continuous Fuzzing Integration setup with Fuzzit
Jeka Patsd65d5ed43f4c
diff --git a/README.md b/README.mdindex 24157b3f4c..ff8f52dfca 100644--- a/README.md+++ b/README.md@@ -21,6 +21,7 @@[](https://travis-ci.org/apache/arrow)[](https://codecov.io/gh/apache/arrow?branch=master)+[](https://app.fuzzit.dev/admin/yMxZh42xl9qy6bvg3EiJ/dashboard)[](https://github.com/apache/arrow/blob/master/LICENSE.txt)[](https://twitter.com/apachearrow)diff --git a/ci/docker_build_and_fuzzit.sh b/ci/docker_build_and_fuzzit.shnew file mode 100755index 0000000000..3ab3145c3c--- /dev/null+++ b/ci/docker_build_and_fuzzit.sh@@ -0,0 +1,48 @@+#!/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.++export ARROW_FUZZING="ON"+#export ARROW_DEPENDENCY_SOURCE="BUNDLED"+export ARROW_USE_ASAN="ON"+export CC="clang-7"+export CXX="clang++-7"+export ARROW_BUILD_TYPE="RelWithDebInfo"+export ARROW_ORC="OFF"+export ARROW_PARQUET="OFF"+export ARROW_PLASMA="OFF"+export ARROW_FLIGHT="OFF"+export ARROW_BUILD_BENCHMARKS="OFF"+export ARROW_WITH_BZ2="OFF"+export ARROW_WITH_ZSTD="OFF"+export ARROW_BUILD_UTILITIES="OFF"+/arrow/ci/docker_build_cpp.sh || exit 1+pushd /build/cpp++mkdir ./relwithdebinfo/out+cp ./relwithdebinfo/arrow-ipc-fuzzing-test ./relwithdebinfo/out/fuzzer+ldd ./relwithdebinfo/arrow-ipc-fuzzing-test | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' ./relwithdebinfo/out/.+cd ./relwithdebinfo/out/+tar -czvf fuzzer.tar.gz *+cd ../../++export TARGET_ID=u79f6bXYgNH4NkU99iWK+export FUZZIT_API_KEY=${FUZZIT_API_KEY:-ac6089a1bc2313679f2d99bb80553162c380676bff3f094de826b16229e28184a8084b86f52c95112bde6b3dbb07b9b7}+wget -O fuzzit https://bin.fuzzit.dev/fuzzit-1.1+chmod a+x fuzzit+./fuzzit auth $FUZZIT_API_KEY+./fuzzit create job --type fuzzing --host bionic-llvm7 --revision $CIRCLE_SHA1 --branch $CIRCLE_BRANCH $TARGET_ID ./relwithdebinfo/out/fuzzer.tar.gzdiff --git a/ci/docker_build_cpp.sh b/ci/docker_build_cpp.shindex 471a73202e..77268bc5a7 100755--- a/ci/docker_build_cpp.sh+++ b/ci/docker_build_cpp.sh@@ -56,6 +56,8 @@ cmake -GNinja \-DCMAKE_CXX_FLAGS=$CXXFLAGS \-DBOOST_SOURCE=${ARROW_BOOST_SOURCE:-AUTO} \-Duriparser_SOURCE=AUTO \+ -DARROW_FUZZING=${ARROW_FUZZING:-OFF} \+ -DARROW_USE_ASAN=${ARROW_USE_ASAN:-OFF} \${CMAKE_ARGS} \${source_dir}ninjadiff --git a/dev/fuzzit/Dockerfile b/dev/fuzzit/Dockerfilenew file mode 100644index 0000000000..602cb5f254--- /dev/null+++ b/dev/fuzzit/Dockerfile@@ -0,0 +1,28 @@+# 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 arrow:cpp++RUN apt-get update && \+ apt-get install -y -q \+ clang-7 \+ libclang-7-dev \+ clang-format-7 \+ clang-tidy-7 \+ clang-tools-7++CMD ["arrow/ci/docker_build_and_fuzzit.sh"]diff --git a/dev/tasks/tests.yml b/dev/tasks/tests.ymlindex 2c424fa007..32e2ed586d 100644--- a/dev/tasks/tests.yml+++ b/dev/tasks/tests.yml@@ -25,6 +25,7 @@ groups:- docker-cpp-alpine- docker-cpp-cmake32- docker-cpp-release+ - docker-cpp-fuzzit- docker-c_glib- docker-go- docker-python-2.7@@ -132,6 +133,16 @@ tasks:- docker-compose build cpp-cmake32- docker-compose run cpp-cmake32+ docker-cpp-fuzzit:+ ci: circle+ platform: linux+ template: docker-tests/circle.linux.yml+ params:+ commands:+ - docker-compose build cpp+ - docker-compose build fuzzit+ - docker-compose run fuzzit+docker-c_glib:ci: circleplatform: linuxdiff --git a/docker-compose.yml b/docker-compose.ymlindex 768c4e6eb7..0b977b1d07 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -398,6 +398,17 @@ services:command: arrow/dev/lint/run_linters.shvolumes: *ubuntu-volumes+ fuzzit:+ # Usage:+ # docker-compose build cpp+ # docker-compose build fuzzit+ # docker-compose run fuzzit+ image: arrow:fuzzit+ build:+ context: .+ dockerfile: dev/fuzzit/Dockerfile+ volumes: *ubuntu-volumes+iwyu:# Usage:# export PYTHON_VERSION=3.6