Apache DataFusion SQL Query Engine
ARROW-3385: [Gandiva][C++][Java] Crossbow support for deploying gandiva jars
Praveen8334741b227c
diff --git a/ci/travis_script_gandiva_java.sh b/ci/travis_script_gandiva_java.shindex 8c26e5c859..1f188e7e91 100755--- a/ci/travis_script_gandiva_java.sh+++ b/ci/travis_script_gandiva_java.sh@@ -27,9 +27,9 @@ pushd $JAVA_DIRexport MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"# build with gandiva profile-mvn -P gandiva -B install -DskipTests -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR+mvn -P gandiva -B install -DskipTests -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug# run gandiva tests-mvn test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR+mvn test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debugpopddiff --git a/dev/tasks/gandiva-jars/build-cpp.sh b/dev/tasks/gandiva-jars/build-cpp.shnew file mode 100755index 0000000000..9316afd1a7--- /dev/null+++ b/dev/tasks/gandiva-jars/build-cpp.sh@@ -0,0 +1,35 @@+#!/bin/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 -e++source arrow/ci/travis_env_common.sh++# Builds arrow + gandiva and tests the same.+pushd arrow/cpp+ mkdir build+ pushd build+ cmake -DCMAKE_BUILD_TYPE=Release \+ -DARROW_GANDIVA=ON \+ -DARROW_BUILD_UTILITIES=OFF \+ ..+ make -j4+ ctest+ popd+popddiff --git a/dev/tasks/gandiva-jars/build-java.sh b/dev/tasks/gandiva-jars/build-java.shnew file mode 100755index 0000000000..a9b0bfe8ea--- /dev/null+++ b/dev/tasks/gandiva-jars/build-java.sh@@ -0,0 +1,29 @@+#!/bin/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 -e++pushd arrow/java+ # build the entire project+ mvn clean install -DskipTests -P gandiva -Dgandiva.cpp.build.dir=../../cpp/build/release+ # test only gandiva+ mvn test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=../../cpp/build/release+ # copy the jars to distribution folder+ find gandiva/target/ -name "*.jar" -not -name "*tests*" -exec cp {} ../../dist/ \;+popddiff --git a/dev/tasks/gandiva-jars/travis.linux.yml b/dev/tasks/gandiva-jars/travis.linux.ymlnew file mode 100644index 0000000000..8b311ca962--- /dev/null+++ b/dev/tasks/gandiva-jars/travis.linux.yml@@ -0,0 +1,66 @@+# 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.++os: linux+dist: trusty+sudo: required+language: cpp+compiler: gcc+services:+ - docker++# don't build twice+if: tag IS blank++env:+ global:+ - PLAT=x86_64+ - TRAVIS_TAG={{ task.tag }}+ - ARROW_TRAVIS_USE_TOOLCHAIN=1++before_install:+ - export CC="gcc-4.9" CXX="g++-4.9"+ - ulimit -c unlimited -S+ - |+ sudo bash -c "echo -e 'Acquire::Retries 10; Acquire::http::Timeout \"20\";' > /etc/apt/apt.conf.d/99-travis-retry"+ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test+ sudo apt-get update -qq++before_script:+ - git clone -b {{ arrow.branch }} {{ arrow.remote }} arrow+ - git -C arrow checkout {{ arrow.head }}+ - arrow/ci/travis_install_linux.sh+ - arrow/ci/travis_install_clang_tools.sh+ - export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR/arrow+ - arrow/ci/travis_install_toolchain.sh++script:+ - mkdir -p dist+ - arrow/dev/tasks/gandiva-jars/build-cpp.sh+ - arrow/dev/tasks/gandiva-jars/build-java.sh++deploy:+ provider: releases+ api_key: $CROSSBOW_GITHUB_TOKEN+ file_glob: true+ file: dist/*.jar+ skip_cleanup: true+ on:+ tags: true++notifications:+ email:+ - {{ job.email }}diff --git a/dev/tasks/gandiva-jars/travis.osx.yml b/dev/tasks/gandiva-jars/travis.osx.ymlnew file mode 100644index 0000000000..8c0627bc5d--- /dev/null+++ b/dev/tasks/gandiva-jars/travis.osx.yml@@ -0,0 +1,57 @@+# 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.++os: osx+osx_image: xcode8.3+sudo: required+language: cpp+compiler: clang+services:+ - docker++# don't build twice+if: tag IS blank++env:+ global:+ - PLAT=x86_64+ - TRAVIS_TAG={{ task.tag }}+ - ARROW_TRAVIS_USE_TOOLCHAIN=1+ - ARROW_TRAVIS_GANDIVA=1++before_script:+ - git clone -b {{ arrow.branch }} {{ arrow.remote }} arrow+ - git -C arrow checkout {{ arrow.head }}+ - export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR/arrow+ - arrow/ci/travis_install_toolchain.sh++script:+ - mkdir -p dist+ - arrow/dev/tasks/gandiva-jars/build-cpp.sh+ - arrow/dev/tasks/gandiva-jars/build-java.sh++deploy:+ provider: releases+ api_key: $CROSSBOW_GITHUB_TOKEN+ file_glob: true+ file: dist/*.jar+ skip_cleanup: true+ on:+ tags: true++notifications:+ email:+ - {{ job.email }}diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.ymlindex aef70332b8..514942df93 100644--- a/dev/tasks/tasks.yml+++ b/dev/tasks/tasks.yml@@ -48,6 +48,9 @@ groups:- ubuntu-cosmic- centos-6- centos-7+ gandiva:+ - gandiva-jar-trusty+ - gandiva-jar-osxtasks:# arbitrary_task_name:@@ -482,3 +485,17 @@ tasks:- parquet-glib-doc-{no_rc_version}-1.el7.x86_64.rpm- parquet-glib-libs-{no_rc_version}-1.el7.x86_64.rpm- parquet-libs-{no_rc_version}-1.el7.x86_64.rpm++ ############################## Gandiva Tasks ################################++ gandiva-jar-trusty:+ platform: linux+ template: gandiva-jars/travis.linux.yml+ artifacts:+ - arrow-gandiva-{version}-SNAPSHOT.jar++ gandiva-jar-osx:+ platform: osx+ template: gandiva-jars/travis.osx.yml+ artifacts:+ - arrow-gandiva-{version}-SNAPSHOT.jar