Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,32 +199,14 @@ matrix:
- if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then docker-compose pull python-manylinux1; fi
script:
- if [ $ARROW_CI_PYTHON_AFFECTED == "1" ]; then $TRAVIS_BUILD_DIR/ci/travis_script_manylinux.sh; fi
- name: "Java w/ OpenJDK 8"
language: java
os: linux
jdk: openjdk8
before_script:
- if [ $ARROW_CI_JAVA_AFFECTED != "1" ]; then exit; fi
- $TRAVIS_BUILD_DIR/ci/travis_install_linux.sh
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
- $TRAVIS_BUILD_DIR/ci/travis_script_javadoc.sh
- name: "Java w/ OpenJDK 9"
language: java
os: linux
jdk: openjdk9
before_script:
- if [ $ARROW_CI_JAVA_AFFECTED != "1" ]; then exit; fi
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
- name: "Java w/ OpenJDK 11"
language: java
- name: "Java OpenJDK8 and OpenJDK11"
language: cpp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should language be Java?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one doesn't matter b/c it's Java

os: linux
jdk: openjdk11
before_script:
- if [ $ARROW_CI_JAVA_AFFECTED != "1" ]; then exit; fi
- docker-compose pull java-all-jdks
script:
- $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
- docker-compose run java-all-jdks
- name: "Integration w/ OpenJDK 8, conda-forge toolchain"
language: java
os: linux
Expand Down
17 changes: 15 additions & 2 deletions ci/docker_build_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,23 @@ mkdir -p /build/java

arrow_src=/build/java/arrow

# Remove any pre-existing artifacts
rm -rf $arrow_src

pushd /arrow
rsync -a header java format integration $arrow_src
rsync -a header java format integration $arrow_src
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding --delete rsync option or removing ${arrow_src} before rsync?
If there are some built files with OpenJDK 8, OpenJDK 11 build may be conflicted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will do

popd

JAVA_ARGS=
if [ "$ARROW_JAVA_RUN_TESTS" != "1" ]; then
JAVA_ARGS=-DskipTests
fi

pushd $arrow_src/java
mvn -B -DskipTests -Drat.skip=true install
mvn -B $JAVA_ARGS -Drat.skip=true install

if [ "$ARROW_JAVADOC" == "1" ]; then
export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
mvn -B site
fi
popd
16 changes: 9 additions & 7 deletions ci/travis_script_javadoc.sh → ci/docker_java_test_all.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/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
Expand All @@ -19,13 +18,16 @@

set -e

source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

JAVA_DIR=${TRAVIS_BUILD_DIR}/java
export ARROW_TEST_DATA=/arrow/testing/data

pushd $JAVA_DIR
export ARROW_JAVA_RUN_TESTS=1

export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
$TRAVIS_MVN -B site
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export ARROW_JAVADOC=1
bash $SOURCE_DIR/docker_build_java.sh

popd
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
export ARROW_JAVADOC=0
bash $SOURCE_DIR/docker_build_java.sh
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,18 @@ services:
- .:/arrow:ro # ensures that docker won't contaminate the host directory
- maven-cache:/root/.m2:delegated

java-all-jdks:
# Usage:
# docker-compose build java-all-jdks
# docker-compose run java-all-jdks
image: ursalab/arrow-ci-java-all-jdks:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use ursalabs (the last s is missing) for organization name on Docker Hub?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this name is already taken on Docker Hub. I don't know who owns it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I got it.

build:
context: .
dockerfile: java/Dockerfile.all-jdks
volumes:
- .:/arrow:ro # ensures that docker won't contaminate the host directory
- maven-cache:/root/.m2:delegated

js:
image: arrow:js
build:
Expand Down
35 changes: 35 additions & 0 deletions java/Dockerfile.all-jdks
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 ubuntu:18.04

# install build essentials
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update -y -q && \
apt-get install -y -q --no-install-recommends \
wget \
software-properties-common \
ca-certificates \
maven \
rsync \
tzdata \
openjdk-8-jdk \
openjdk-11-jdk && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Test all supported JDKs
CMD ["arrow/ci/docker_java_test_all.sh"]