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
5 changes: 5 additions & 0 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
run: |
docker compose build --pull vcpkg-jni
- name: Cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>33</version>
<version>35</version>
<relativePath></relativePath>
</parent>

Expand Down
21 changes: 17 additions & 4 deletions ci/docker/vcpkg-jni.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@
ARG base
FROM ${base}

# Install the libraries required by Gandiva to run
# Use enable llvm[enable-rtti] in the vcpkg.json to avoid link problems in Gandiva
RUN vcpkg install \
# For --mount=type=secret: The GITHUB_TOKEN is the only real secret
# but we use --mount=type=secret for GITHUB_REPOSITORY_OWNER and
# VCPKG_BINARY_SOURCES too because we don't want to store them into
# the built image in order to easily reuse the built image cache.
#
# Install the libraries required by Gandiva to run. Use enable
# llvm[enable-rtti] in the vcpkg.json to avoid link problems in
# Gandiva.
RUN --mount=type=secret,id=github_repository_owner \
--mount=type=secret,id=github_token \
--mount=type=secret,id=vcpkg_binary_sources \
export GITHUB_REPOSITORY_OWNER=$(cat /run/secrets/github_repository_owner); \
export GITHUB_TOKEN=$(cat /run/secrets/github_token); \
export VCPKG_BINARY_SOURCES=$(cat /run/secrets/vcpkg_binary_sources); \
vcpkg install \
--clean-after-build \
--x-install-root=${VCPKG_ROOT}/installed \
--x-manifest-root=/arrow/ci/vcpkg \
Expand All @@ -30,7 +42,8 @@ RUN vcpkg install \
--x-feature=json \
--x-feature=parquet \
--x-feature=gandiva \
--x-feature=s3
--x-feature=s3 && \
rm -rf ~/.config/NuGet/

# Install Java
# We need Java for JNI headers, but we don't invoke Maven in this build.
Expand Down
18 changes: 13 additions & 5 deletions ci/scripts/jni_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,16 @@ if [ "${ARROW_USE_CCACHE}" == "ON" ]; then
fi

github_actions_group_begin "Building Arrow C++ libraries"
devtoolset_version="$(rpm -qa "devtoolset-*-gcc" --queryformat '%{VERSION}' | grep -o "^[0-9]*")"
devtoolset_include_cpp="/opt/rh/devtoolset-${devtoolset_version}/root/usr/include/c++/${devtoolset_version}"
case "$(arch)" in
x86_64)
vcpkg_arch=amd64
;;
aarch64)
vcpkg_arch=arm64
;;
esac
gcc_toolset_version="$(rpm -qa "gcc-toolset-*-runtime" --queryformat '%{VERSION}' | grep -o "^[0-9]*")"
gcc_toolset_include_cpp="/opt/rh/gcc-toolset-${gcc_toolset_version}/root/usr/include/c++/${gcc_toolset_version}"
: "${ARROW_ACERO:=ON}"
export ARROW_ACERO
: "${ARROW_BUILD_TESTS:=OFF}"
Expand All @@ -75,8 +83,8 @@ export ARROW_ORC
: "${CMAKE_UNITY_BUILD:=ON}"
: "${VCPKG_ROOT:=/opt/vcpkg}"
: "${VCPKG_FEATURE_FLAGS:=-manifests}"
: "${VCPKG_TARGET_TRIPLET:=${VCPKG_DEFAULT_TRIPLET:-x64-linux-static-${CMAKE_BUILD_TYPE}}}"
: "${GANDIVA_CXX_FLAGS:=-isystem;${devtoolset_include_cpp};-isystem;${devtoolset_include_cpp}/x86_64-redhat-linux;-lpthread}"
: "${VCPKG_TARGET_TRIPLET:=${VCPKG_DEFAULT_TRIPLET:-${vcpkg_arch}-linux-static-${CMAKE_BUILD_TYPE}}}"
: "${GANDIVA_CXX_FLAGS:=-isystem;${gcc_toolset_include_cpp};-isystem;${gcc_toolset_include_cpp}/$(arch)-redhat-linux;-lpthread}"

export ARROW_TEST_DATA="${arrow_dir}/testing/data"
export PARQUET_TEST_DATA="${arrow_dir}/cpp/submodules/parquet-testing/data"
Expand Down Expand Up @@ -111,12 +119,12 @@ cmake \
-DCMAKE_UNITY_BUILD="${CMAKE_UNITY_BUILD}" \
-DGTest_SOURCE=BUNDLED \
-DORC_SOURCE=BUNDLED \
-DORC_PROTOBUF_EXECUTABLE="${VCPKG_ROOT}/installed/${VCPKG_TARGET_TRIPLET}/tools/protobuf/protoc" \
-DPARQUET_BUILD_EXAMPLES=OFF \
-DPARQUET_BUILD_EXECUTABLES=OFF \
-DPARQUET_REQUIRE_ENCRYPTION=OFF \
-DVCPKG_MANIFEST_MODE=OFF \
-DVCPKG_TARGET_TRIPLET="${VCPKG_TARGET_TRIPLET}" \
-Dxsimd_SOURCE=BUNDLED \
-GNinja
cmake --build "${build_dir}/cpp"
cmake --install "${build_dir}/cpp"
Expand Down
14 changes: 13 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ services:
cache_from:
- ${REPO}:${ARCH}-vcpkg-jni-${VCPKG}
args:
base: ${ARROW_REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2014-vcpkg-${VCPKG}
base: ${ARROW_REPO}:${ARCH}-python-${PYTHON}-wheel-manylinux-2-28-vcpkg-${VCPKG}
secrets:
- github_repository_owner
- github_token
- vcpkg_binary_sources
volumes:
- .:/arrow-java:delegated
- ${ARROW_REPO_ROOT}:/arrow:delegated
Expand All @@ -111,3 +115,11 @@ services:
command:
["git config --global --add safe.directory /arrow-java && \
/arrow-java/ci/scripts/jni_manylinux_build.sh /arrow-java /arrow /build/java /arrow-java/jni"]

secrets:
github_repository_owner:
environment: GITHUB_REPOSITORY_OWNER
github_token:
environment: GITHUB_TOKEN
vcpkg_binary_sources:
environment: VCPKG_BINARY_SOURCES
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>34</version>
<version>35</version>
</parent>

<groupId>org.apache.arrow</groupId>
Expand Down
Loading