Skip to content

Apache DataFusion SQL Query Engine

ARROW-4372: [C++] Embed precompiled bitcode in the gandiva library

Krisztián Szűcs6b7447c88bc8
diff --git a/.travis.yml b/.travis.yml
index 60c44462f6..7458ab6ed8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -225,6 +225,8 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6
- name: "[manylinux1] Python"
language: cpp
+ env:
+ - PYTHON_VERSIONS="2.7,32 3.6,16"
before_script:
- if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then docker pull quay.io/xhochy/arrow_manylinux1_x86_64_base:llvm-7-manylinux1; fi
script:
diff --git a/ci/docker_build_cpp.sh b/ci/docker_build_cpp.sh
index 450dc87024..5bf6094ae2 100755
--- a/ci/docker_build_cpp.sh
+++ b/ci/docker_build_cpp.sh
@@ -34,6 +34,8 @@ cmake -GNinja \
-DARROW_PARQUET=${ARROW_PARQUET:-ON} \
-DARROW_HDFS=${ARROW_HDFS:-OFF} \
-DARROW_PYTHON=${ARROW_PYTHON:-OFF} \
+ -DARROW_GANDIVA=${ARROW_GANDIVA:-OFF} \
+ -DARROW_GANDIVA_JAVA=${ARROW_GANDIVA_JAVA:-OFF} \
-DARROW_BUILD_TESTS=${ARROW_BUILD_TESTS:-OFF} \
-DARROW_BUILD_UTILITIES=${ARROW_BUILD_UTILITIES:-ON} \
-DARROW_INSTALL_NAME_RPATH=${ARROW_INSTALL_NAME_RPATH:-ON} \
diff --git a/ci/travis_script_gandiva_java.sh b/ci/travis_script_gandiva_java.sh
index 387be9a092..9d5871f69f 100755
--- a/ci/travis_script_gandiva_java.sh
+++ b/ci/travis_script_gandiva_java.sh
@@ -22,6 +22,8 @@ set -e
source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
JAVA_DIR=${TRAVIS_BUILD_DIR}/java
+export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
+
pushd $JAVA_DIR
# build with gandiva profile
diff --git a/ci/travis_script_manylinux.sh b/ci/travis_script_manylinux.sh
index 8e8086aa32..fa02c82e1b 100755
--- a/ci/travis_script_manylinux.sh
+++ b/ci/travis_script_manylinux.sh
@@ -20,23 +20,58 @@
set -ex
-pushd python/manylinux1
-docker run --shm-size=2g --rm -e PYARROW_PARALLEL=3 -v $PWD:/io -v $PWD/../../:/arrow quay.io/xhochy/arrow_manylinux1_x86_64_base:llvm-7-manylinux1 /io/build_arrow.sh
-
# Testing for https://issues.apache.org/jira/browse/ARROW-2657
# These tests cannot be run inside of the docker container, since TensorFlow
# does not run on manylinux1
source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
-
source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh
-PYTHON_VERSION=3.6
-CONDA_ENV_DIR=$TRAVIS_BUILD_DIR/pyarrow-test-$PYTHON_VERSION
+pushd python/manylinux1
+
+cat << EOF > check_imports.py
+import sys
+import pyarrow
+import pyarrow.orc
+import pyarrow.parquet
+import pyarrow.plasma
+import tensorflow
+
+if sys.version_info.major > 2:
+ import pyarrow.gandiva
+EOF
+
+for PYTHON_TUPLE in ${PYTHON_VERSIONS}; do
+ IFS="," read PYTHON_VERSION UNICODE_WIDTH <<< $PYTHON_TUPLE
+
+ # cleanup the artifact directory, docker writes it as root
+ sudo rm -rf dist
+
+ # build the wheels
+ docker run --shm-size=2g --rm \
+ -e PYARROW_PARALLEL=3 \
+ -e PYTHON_VERSION=$PYTHON_VERSION \
+ -e UNICODE_WIDTH=$UNICODE_WIDTH \
+ -v $PWD:/io \
+ -v $PWD/../../:/arrow \
+ quay.io/xhochy/arrow_manylinux1_x86_64_base:latest \
+ /io/build_arrow.sh
+
+ # create a testing conda environment
+ CONDA_ENV_DIR=$TRAVIS_BUILD_DIR/pyarrow-test-$PYTHON_VERSION
+ conda create -y -q -p $CONDA_ENV_DIR python=$PYTHON_VERSION
+ conda activate $CONDA_ENV_DIR
+
+ # install the produced wheels
+ pip install tensorflow
+ pip install dist/*.whl
+
+ # Test optional dependencies and the presence of tensorflow
+ python check_imports.py
-conda create -y -q -p $CONDA_ENV_DIR python=$PYTHON_VERSION
-conda activate $CONDA_ENV_DIR
+ # Install test dependencies and run pyarrow tests
+ pip install -r ../requirements-test.txt
+ pytest --pyargs pyarrow
+done
-pip install -q tensorflow
-pip install "dist/`ls dist/ | grep cp36`"
-python -c "import pyarrow; import tensorflow"
+popd
diff --git a/dev/tasks/python-wheels/linux-test.sh b/dev/tasks/python-wheels/linux-test.sh
index 45efdb0c91..dcd77eb56f 100755
--- a/dev/tasks/python-wheels/linux-test.sh
+++ b/dev/tasks/python-wheels/linux-test.sh
@@ -24,17 +24,17 @@ pip install /arrow/python/manylinux1/dist/*.whl
python --version
# Test optional dependencies
-command="
+python -c "
import sys
import pyarrow
import pyarrow.orc
import pyarrow.parquet
import pyarrow.plasma
+import tensorflow
if sys.version_info.major > 2:
import pyarrow.gandiva
"
-python -c "$command"
# Run pyarrow tests
pip install -r /arrow/python/requirements-test.txt
diff --git a/dev/tasks/python-wheels/travis.linux.yml b/dev/tasks/python-wheels/travis.linux.yml
index b5cbc65bc7..240c523e1c 100644
--- a/dev/tasks/python-wheels/travis.linux.yml
+++ b/dev/tasks/python-wheels/travis.linux.yml
@@ -41,10 +41,12 @@ script:
- pushd arrow/python/manylinux1
- docker run --shm-size=2g
-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }}
- -e PYTHON_VERSIONS="{{ python_version }},{{ unicode_width }}"
+ -e PYTHON_VERSION="{{ python_version }}"
+ -e UNICODE_WIDTH="{{ unicode_width }}"
-v $PWD:/io
-v $PWD/../../:/arrow
- quay.io/xhochy/arrow_manylinux1_x86_64_base:latest /io/build_arrow.sh
+ quay.io/xhochy/arrow_manylinux1_x86_64_base:llvm-7-manylinux1
+ /io/build_arrow.sh
- popd
# test on multiple distributions