Skip to content

Apache DataFusion SQL Query Engine

ARROW-11015: [CI][Gandiva] Move gandiva nightly build from travis to github action

Projjal Chanda03719af9d46c
diff --git a/dev/tasks/gandiva-jars/build-cpp-linux.sh b/dev/tasks/gandiva-jars/build-cpp-linux.sh
index 20f9d32682..54138360ff 100755
--- a/dev/tasks/gandiva-jars/build-cpp-linux.sh
+++ b/dev/tasks/gandiva-jars/build-cpp-linux.sh
@@ -69,4 +69,4 @@ popd
# copy the library to distribution
-cp -L /arrow-dist/lib/libgandiva_jni.so /io/dist
+cp -L /arrow-dist/lib/libgandiva_jni.so /arrow/dist
diff --git a/dev/tasks/gandiva-jars/build-cpp-osx.sh b/dev/tasks/gandiva-jars/build-cpp-osx.sh
index 870a14a013..01f766f5ee 100755
--- a/dev/tasks/gandiva-jars/build-cpp-osx.sh
+++ b/dev/tasks/gandiva-jars/build-cpp-osx.sh
@@ -36,16 +36,13 @@ pushd cpp
-DARROW_FILESYSTEM=OFF \
-DARROW_DATASET=OFF \
-DARROW_BOOST_USE_SHARED=OFF \
- -DARROW_PROTOBUF_USE_SHARED=OFF"
-
- if [ $TRAVIS_OS_NAME == "osx" ]; then
- CMAKE_FLAGS="$CMAKE_FLAGS -DARROW_GFLAGS_USE_SHARED=OFF"
- fi
+ -DARROW_PROTOBUF_USE_SHARED=OFF \
+ -DARROW_GFLAGS_USE_SHARED=OFF"
cmake $CMAKE_FLAGS ..
make -j4
ctest
- cp -L release/libgandiva_jni.dylib $TRAVIS_BUILD_DIR/dist
+ cp -L release/libgandiva_jni.dylib $GITHUB_WORKSPACE/arrow/dist
popd
popd
diff --git a/dev/tasks/gandiva-jars/build-java.sh b/dev/tasks/gandiva-jars/build-java.sh
index bba7adfd8e..7dec07115a 100755
--- a/dev/tasks/gandiva-jars/build-java.sh
+++ b/dev/tasks/gandiva-jars/build-java.sh
@@ -19,10 +19,10 @@
set -e
-CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/dist/
+CPP_BUILD_DIR=$GITHUB_WORKSPACE/arrow/dist/
pushd java
- if [ $TRAVIS_OS_NAME == "linux" ]; then
+ if [[ $OS_NAME == "linux" ]]; then
SO_DEP=ldd
GANDIVA_LIB="$CPP_BUILD_DIR"libgandiva_jni.so
WHITELIST=(linux-vdso libz librt libdl libpthread libstdc++ libm libgcc_s libc ld-linux-x86-64)
diff --git a/dev/tasks/gandiva-jars/github.linux.yml b/dev/tasks/gandiva-jars/github.linux.yml
new file mode 100644
index 0000000000..b0ccaf712e
--- /dev/null
+++ b/dev/tasks/gandiva-jars/github.linux.yml
@@ -0,0 +1,73 @@
+# 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.
+
+# NOTE: must set "Crossbow" as name to have the badge links working in the
+# github comment reports!
+name: Crossbow
+
+on:
+ push:
+ branches:
+ - "*-github-*"
+
+jobs:
+ package:
+ name: Package Gandiva
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Arrow
+ run: |
+ git clone --no-checkout {{ arrow.remote }} arrow
+ git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
+ if [ $CROSSBOW_USE_COMMIT_ID = true ]; then git -C arrow checkout {{ arrow.head }}; else git -C arrow checkout FETCH_HEAD; fi
+ git -C arrow submodule update --init --recursive
+ - name: Build Gandiva
+ run: |
+ python3 -VV
+ cd arrow
+ mkdir -p dist
+ export CC="gcc-4.9" CXX="g++-4.9"
+ ulimit -c unlimited -S
+ set -e
+ docker run -v $PWD:/arrow quay.io/projjal/arrow:gandivadocker /arrow/dev/tasks/gandiva-jars/build-cpp-linux.sh
+ dev/tasks/gandiva-jars/build-java.sh
+ env:
+ OS_NAME: "linux"
+ CHECK_SHARED_DEPENDENCIES: true
+ - name: Set up Crossbow
+ run: |
+ sudo apt-get install -y libgit2-dev
+ pip3 install \
+ click \
+ github3.py \
+ jinja2 \
+ jira \
+ pygit2==1.0.3 \
+ ruamel.yaml \
+ setuptools_scm \
+ toolz
+ - name: Upload artifacts
+ run: |
+ python3 arrow/dev/tasks/crossbow.py \
+ --queue-path arrow \
+ --queue-remote {{ queue_remote_url }} \
+ upload-artifacts \
+ --sha {{ task.branch }} \
+ --tag {{ task.tag }} \
+ --pattern "arrow/dist/*.jar"
+ env:
+ CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }}
\ No newline at end of file
diff --git a/dev/tasks/gandiva-jars/github.osx.yml b/dev/tasks/gandiva-jars/github.osx.yml
new file mode 100644
index 0000000000..158c22dc86
--- /dev/null
+++ b/dev/tasks/gandiva-jars/github.osx.yml
@@ -0,0 +1,72 @@
+# 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.
+
+# NOTE: must set "Crossbow" as name to have the badge links working in the
+# github comment reports!
+name: Crossbow
+
+on:
+ push:
+ branches:
+ - "*-github-*"
+
+jobs:
+ package:
+ name: Package Gandiva
+ runs-on: macos-latest
+ steps:
+ - name: Checkout Arrow
+ run: |
+ git clone --no-checkout {{ arrow.remote }} arrow
+ git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
+ if [ $CROSSBOW_USE_COMMIT_ID = true ]; then git -C arrow checkout {{ arrow.head }}; else git -C arrow checkout FETCH_HEAD; fi
+ git -C arrow submodule update --init --recursive
+ - name: Build Gandiva
+ run: |
+ cd arrow
+ mkdir -p dist
+ export ARROW_TEST_DATA=$PWD/testing/data
+ set -e
+ dev/tasks/gandiva-jars/build-cpp-osx.sh
+ dev/tasks/gandiva-jars/build-java.sh
+ env:
+ OS_NAME: "osx"
+ CHECK_SHARED_DEPENDENCIES: true
+ MACOSX_DEPLOYMENT_TARGET: "10.11"
+ - name: Set up Crossbow
+ run: |
+ brew install libgit2
+ pip3 install \
+ click \
+ github3.py \
+ jinja2 \
+ jira \
+ pygit2 \
+ ruamel.yaml \
+ setuptools_scm \
+ toolz
+ - name: Upload artifacts
+ run: |
+ python3 arrow/dev/tasks/crossbow.py \
+ --queue-path arrow \
+ --queue-remote {{ queue_remote_url }} \
+ upload-artifacts \
+ --sha {{ task.branch }} \
+ --tag {{ task.tag }} \
+ --pattern "arrow/dist/*.jar"
+ env:
+ CROSSBOW_GITHUB_TOKEN: {{ '${{ secrets.CROSSBOW_GITHUB_TOKEN }}' }}
\ No newline at end of file
diff --git a/dev/tasks/gandiva-jars/travis.linux.yml b/dev/tasks/gandiva-jars/travis.linux.yml
deleted file mode 100644
index 2083c9d047..0000000000
--- a/dev/tasks/gandiva-jars/travis.linux.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-# 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: xenial
-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:
- - sudo apt-get install -y libgit2-dev
- - python3 -VV
- - echo "Setting python version 3.6.7 in pyenv"
- - pyenv shell 3.6.7
- - pip3 install click github3.py jinja2 jira pygit2==1.0.3 ruamel.yaml setuptools_scm toolz
- # gcc 4.9 is required for the static linking of libstdc++
- - 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 --no-checkout {{ arrow.remote }} arrow
- - git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- - if [ $CROSSBOW_USE_COMMIT_ID = true ]; then git -C arrow checkout {{ arrow.head }}; else git -C arrow checkout FETCH_HEAD; fi
- - git -C arrow submodule update --init --recursive
- - export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR/arrow
- - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- - export PATH="$JAVA_HOME/bin:$PATH"
- - echo $JAVA_HOME
- - which java
-script:
- - cd $TRAVIS_BUILD_DIR
- - mkdir -p dist
- # please refer to README for steps to update this image
- - docker run -v $PWD:/io -v $PWD:/arrow quay.io/prudhvi/arrow:buildGandivaDocker /io/dev/tasks/gandiva-jars/build-cpp-linux.sh || travis_terminate 1
- - dev/tasks/gandiva-jars/build-java.sh || travis_terminate 1
- # deploy using crossbow
- - >
- python3 dev/tasks/crossbow.py
- --queue-path $TRAVIS_BUILD_DIR
- --queue-remote {{ queue_remote_url }}
- upload-artifacts
- --sha {{ task.branch }}
- --tag {{ task.tag }}
- --pattern "dist/*.jar"
diff --git a/dev/tasks/gandiva-jars/travis.osx.yml b/dev/tasks/gandiva-jars/travis.osx.yml
deleted file mode 100644
index 8a0576dcd6..0000000000
--- a/dev/tasks/gandiva-jars/travis.osx.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-# 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: xcode9.4
-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:
- - pwd
- - git clone --no-checkout {{ arrow.remote }} arrow
- - git -C arrow fetch -t {{ arrow.remote }} {{ arrow.branch }}
- - if [ $CROSSBOW_USE_COMMIT_ID = true ]; then git -C arrow checkout {{ arrow.head }}; else git -C arrow checkout FETCH_HEAD; fi
- - export TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR/arrow
- - git -C arrow submodule update --init --recursive
- - brew update
- - brew install bison flex llvm
- - brew tap adoptopenjdk/openjdk
- - brew cask install adoptopenjdk8
- - export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
- - export PATH="$JAVA_HOME/bin:$PATH"
- - export ARROW_TEST_DATA=$TRAVIS_BUILD_DIR/testing/data
- - echo $JAVA_HOME
- - which java
-
-script:
- - cd arrow
- - mkdir -p dist
- - dev/tasks/gandiva-jars/build-cpp-osx.sh || travis_terminate 1
- - dev/tasks/gandiva-jars/build-java.sh || travis_terminate 1
- # deploy using crossbow
- # pip install pygit2 fails if MACOS_DEPLOYMENT_TARGET is set to an earlier version. Since the
- # gandiva libraries are already built we can reset MACOS_DEPLOYMENT_TARGET to current osx version
- - if [[ $MACOSX_DEPLOYMENT_TARGET ]] ; then export MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d '.' -f 1,2) ; fi
- - brew install libgit2
- - pip3 install pygit2
- - pip3 install click github3.py jinja2 jira ruamel.yaml setuptools_scm toolz
- - >
- python3 dev/tasks/crossbow.py
- --queue-path $TRAVIS_BUILD_DIR
- --queue-remote {{ queue_remote_url }}
- upload-artifacts
- --sha {{ task.branch }}
- --tag {{ task.tag }}
- --pattern "dist/*.jar"
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index f28edafc92..f2b6094edd 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -1328,15 +1328,15 @@ tasks:
############################## Gandiva Tasks ################################
- gandiva-jar-xenial:
- ci: travis
- template: gandiva-jars/travis.linux.yml
+ gandiva-jar-ubuntu:
+ ci: github
+ template: gandiva-jars/github.linux.yml
artifacts:
- arrow-gandiva-{no_rc_version}-SNAPSHOT.jar
gandiva-jar-osx:
- ci: travis
- template: gandiva-jars/travis.osx.yml
+ ci: github
+ template: gandiva-jars/github.osx.yml
artifacts:
- arrow-gandiva-{no_rc_version}-SNAPSHOT.jar