summaryrefslogtreecommitdiffstats
path: root/src/arrow/dev/tasks/java-jars
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/arrow/dev/tasks/java-jars
parentInitial commit. (diff)
downloadceph-upstream/18.2.2.tar.xz
ceph-upstream/18.2.2.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/arrow/dev/tasks/java-jars')
-rw-r--r--src/arrow/dev/tasks/java-jars/README.md29
-rw-r--r--src/arrow/dev/tasks/java-jars/github.yml115
2 files changed, 144 insertions, 0 deletions
diff --git a/src/arrow/dev/tasks/java-jars/README.md b/src/arrow/dev/tasks/java-jars/README.md
new file mode 100644
index 000000000..1d61662d4
--- /dev/null
+++ b/src/arrow/dev/tasks/java-jars/README.md
@@ -0,0 +1,29 @@
+<!--
+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.
+-->
+
+# Jars.
+
+This directory is responsible to generate the jar files for the Arrow components that depend on C++ shared libraries to execute.
+
+The Arrow C++ libraries are compiled both on MacOS and Linux distributions, with their dependencies linked statically, and they are added
+in the jars at the end, so the file can be used on both systems.
+
+## Linux Docker Image
+To compile the C++ libraries in Linux, a docker image is used.
+It is created used the **ci/docker/java-bundled-jars.dockerfile** file.
+If it is necessary to add any new dependency, you need to change that file. \ No newline at end of file
diff --git a/src/arrow/dev/tasks/java-jars/github.yml b/src/arrow/dev/tasks/java-jars/github.yml
new file mode 100644
index 000000000..81d31dd4c
--- /dev/null
+++ b/src/arrow/dev/tasks/java-jars/github.yml
@@ -0,0 +1,115 @@
+# 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.
+
+{% import 'macros.jinja' as macros with context %}
+
+{{ macros.github_header() }}
+
+jobs:
+
+ build-cpp-ubuntu:
+ name: Build C++ Libs Ubuntu
+ runs-on: ubuntu-18.04
+ steps:
+ {{ macros.github_checkout_arrow()|indent }}
+ {{ macros.github_install_archery()|indent }}
+ - name: Build C++ Libs
+ run: archery docker run java-jni-manylinux-2014
+ - name: Compress into single artifact
+ run: tar -cvzf arrow-shared-libs-linux.tar.gz arrow/java-dist/
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: ubuntu-shared-lib
+ path: arrow-shared-libs-linux.tar.gz
+ {% if arrow.branch == 'master' %}
+ {{ macros.github_login_dockerhub()|indent }}
+ - name: Push Docker Image
+ shell: bash
+ run: archery docker push java-jni-manylinux-2014
+ {% endif %}
+
+ build-cpp-macos:
+ name: Build C++ Libs MacOS
+ runs-on: macos-latest
+ env:
+ MACOSX_DEPLOYMENT_TARGET: "10.11"
+ steps:
+ {{ macros.github_checkout_arrow()|indent }}
+ {{ macros.github_install_archery()|indent }}
+ - name: Install Dependencies
+ run: brew bundle --file=arrow/cpp/Brewfile
+ - name: Build C Data Interface lib
+ run: |
+ set -e
+ arrow/ci/scripts/java_cdata_build.sh \
+ $GITHUB_WORKSPACE/arrow \
+ $GITHUB_WORKSPACE/arrow/java-native-build \
+ $GITHUB_WORKSPACE/arrow/java-dist
+ - name: Build C++ Libs
+ run: |
+ set -e
+ arrow/ci/scripts/java_jni_macos_build.sh \
+ $GITHUB_WORKSPACE/arrow \
+ $GITHUB_WORKSPACE/arrow/cpp-build \
+ $GITHUB_WORKSPACE/arrow/java-dist
+ - name: Compress into single artifact
+ run: tar -cvzf arrow-shared-libs-macos.tar.gz arrow/java-dist/
+ - name: Upload Artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: macos-shared-lib
+ path: arrow-shared-libs-macos.tar.gz
+
+ package-jars:
+ name: Build Jar Files
+ runs-on: macos-latest
+ needs: [build-cpp-macos, build-cpp-ubuntu]
+ steps:
+ {{ macros.github_checkout_arrow()|indent }}
+ - name: Download Linux C++ Libraries
+ uses: actions/download-artifact@v2
+ with:
+ name: ubuntu-shared-lib
+ - name: Download MacOS C++ Library
+ uses: actions/download-artifact@v2
+ with:
+ name: macos-shared-lib
+ - name: Descompress artifacts
+ run: |
+ tar -xvzf arrow-shared-libs-macos.tar.gz
+ tar -xvzf arrow-shared-libs-linux.tar.gz
+ - name: Test that Shared Libraries Exist
+ run: |
+ test -f arrow/java-dist/libarrow_cdata_jni.dylib
+ test -f arrow/java-dist/libarrow_dataset_jni.dylib
+ test -f arrow/java-dist/libgandiva_jni.dylib
+ test -f arrow/java-dist/libarrow_orc_jni.dylib
+ test -f arrow/java-dist/libarrow_cdata_jni.so
+ test -f arrow/java-dist/libarrow_dataset_jni.so
+ test -f arrow/java-dist/libarrow_orc_jni.so
+ test -f arrow/java-dist/libgandiva_jni.so
+ - name: Build Bundled Jar
+ run: |
+ set -e
+ pushd arrow/java
+ mvn versions:set -DnewVersion={{ arrow.no_rc_version }}
+ popd
+ arrow/ci/scripts/java_full_build.sh \
+ $GITHUB_WORKSPACE/arrow \
+ $GITHUB_WORKSPACE/arrow/java-dist
+ {{ macros.github_upload_releases(["arrow/java-dist/*.jar", "arrow/java-dist/*.pom"])|indent }}