Skip to content

Commit

Permalink
GH-44831: [CI] Build Java for integration tests from arrow-java
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Dec 5, 2024
1 parent 6972ecd commit 3b6f2b0
Show file tree
Hide file tree
Showing 1,349 changed files with 15 additions and 256,858 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ jobs:
with:
repository: apache/arrow-go
path: go
- name: Checkout Arrow Java
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: apache/arrow-java
path: java
- name: Free up disk space
run: |
ci/scripts/util_free_space.sh
Expand All @@ -115,6 +120,7 @@ jobs:
archery docker run \
-e ARCHERY_DEFAULT_BRANCH=${{ github.event.repository.default_branch }} \
-e ARCHERY_INTEGRATION_WITH_GO=1 \
-e ARCHERY_INTEGRATION_WITH_JAVA=1 \
-e ARCHERY_INTEGRATION_WITH_NANOARROW=1 \
-e ARCHERY_INTEGRATION_WITH_RUST=1 \
conda-integration
Expand Down
6 changes: 2 additions & 4 deletions ci/scripts/integration_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ gold_dir=$arrow_dir/testing/data/arrow-ipc-stream/integration

: ${ARROW_INTEGRATION_CPP:=ON}
: ${ARROW_INTEGRATION_CSHARP:=ON}
: ${ARROW_INTEGRATION_JAVA:=ON}
: ${ARROW_INTEGRATION_JS:=ON}

: ${ARCHERY_INTEGRATION_TARGET_IMPLEMENTATIONS:=cpp,csharp,java,js}
: ${ARCHERY_INTEGRATION_TARGET_IMPLEMENTATIONS:=cpp,csharp,js}
export ARCHERY_INTEGRATION_TARGET_IMPLEMENTATIONS

. ${arrow_dir}/ci/scripts/util_log.sh
Expand All @@ -43,7 +42,7 @@ github_actions_group_begin "Integration: Prepare: Dependencies"
if [ "${ARROW_INTEGRATION_CSHARP}" == "ON" ]; then
pip install pythonnet
fi
if [ "${ARROW_INTEGRATION_JAVA}" == "ON" ]; then
if [ "${ARCHERY_INTEGRATION_WITH_JAVA}" -gt "0" ]; then
pip install jpype1
fi
github_actions_group_end
Expand All @@ -66,7 +65,6 @@ time archery integration \
--run-flight \
--with-cpp=$([ "$ARROW_INTEGRATION_CPP" == "ON" ] && echo "1" || echo "0") \
--with-csharp=$([ "$ARROW_INTEGRATION_CSHARP" == "ON" ] && echo "1" || echo "0") \
--with-java=$([ "$ARROW_INTEGRATION_JAVA" == "ON" ] && echo "1" || echo "0") \
--with-js=$([ "$ARROW_INTEGRATION_JS" == "ON" ] && echo "1" || echo "0") \
--gold-dirs=$gold_dir/0.14.1 \
--gold-dirs=$gold_dir/0.17.1 \
Expand Down
7 changes: 3 additions & 4 deletions ci/scripts/integration_arrow_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ build_dir=${2}

: ${ARROW_INTEGRATION_CPP:=ON}
: ${ARROW_INTEGRATION_CSHARP:=ON}
: ${ARROW_INTEGRATION_JAVA:=ON}
: ${ARROW_INTEGRATION_JS:=ON}

. ${arrow_dir}/ci/scripts/util_log.sh
Expand Down Expand Up @@ -56,12 +55,12 @@ fi
github_actions_group_end

github_actions_group_begin "Integration: Build: Java"
if [ "${ARROW_INTEGRATION_JAVA}" == "ON" ]; then
if [ "${ARCHERY_INTEGRATION_WITH_JAVA}" -gt "0" ]; then
export ARROW_JAVA_CDATA="ON"
export JAVA_JNI_CMAKE_ARGS="-DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF -DARROW_JAVA_JNI_ENABLE_C=ON"

${arrow_dir}/ci/scripts/java_jni_build.sh ${arrow_dir} ${ARROW_HOME} ${build_dir} /tmp/dist/java
${arrow_dir}/ci/scripts/java_build.sh ${arrow_dir} ${build_dir} /tmp/dist/java
${arrow_dir}/java/ci/scripts/java_jni_build.sh "${arrow_dir}/java" "${ARROW_HOME}" "${build_dir}/java/" /tmp/dist/java
${arrow_dir}/java/ci/scripts/java_build.sh "${arrow_dir}/java" "${build_dir}/java" /tmp/dist/java
fi
github_actions_group_end

Expand Down
3 changes: 2 additions & 1 deletion dev/archery/archery/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,8 @@ def _set_default(opt, default):
@click.option('--with-csharp', type=bool, default=False,
help='Include C# in integration tests')
@click.option('--with-java', type=bool, default=False,
help='Include Java in integration tests')
help='Include Java in integration tests',
envvar="ARCHERY_INTEGRATION_WITH_JAVA")
@click.option('--with-js', type=bool, default=False,
help='Include JavaScript in integration tests')
@click.option('--with-go', type=bool, default=False,
Expand Down
3 changes: 2 additions & 1 deletion dev/archery/archery/integration/tester_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from . import cdata
from .tester import Tester, CDataExporter, CDataImporter
from .util import run_cmd, log
from ..utils.source import ARROW_ROOT_DEFAULT


ARROW_BUILD_ROOT = os.environ.get(
Expand All @@ -34,7 +35,7 @@

def load_version_from_pom():
import xml.etree.ElementTree as ET
tree = ET.parse(os.path.join(ARROW_BUILD_ROOT, 'java', 'pom.xml'))
tree = ET.parse(os.path.join(ARROW_ROOT_DEFAULT, 'java', 'pom.xml'))
tag_pattern = '{http://maven.apache.org/POM/4.0.0}version'
version_tag = list(tree.getroot().findall(tag_pattern))[0]
return version_tag.text
Expand Down
3 changes: 0 additions & 3 deletions java/.gitattributes

This file was deleted.

23 changes: 0 additions & 23 deletions java/.gitignore

This file was deleted.

45 changes: 0 additions & 45 deletions java/.mvn/develocity.xml

This file was deleted.

33 changes: 0 additions & 33 deletions java/.mvn/extensions.xml

This file was deleted.

19 changes: 0 additions & 19 deletions java/Brewfile

This file was deleted.

105 changes: 0 additions & 105 deletions java/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 3b6f2b0

Please sign in to comment.