diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index 72456fa556..0cb887efc9 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -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:
diff --git a/bom/pom.xml b/bom/pom.xml
index 61b452b9c1..93ce38f652 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -23,7 +23,7 @@ under the License.
org.apache
apache
- 33
+ 35
diff --git a/ci/docker/vcpkg-jni.dockerfile b/ci/docker/vcpkg-jni.dockerfile
index 55fa35e0d1..895bf92c1e 100644
--- a/ci/docker/vcpkg-jni.dockerfile
+++ b/ci/docker/vcpkg-jni.dockerfile
@@ -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 \
@@ -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.
diff --git a/ci/scripts/jni_manylinux_build.sh b/ci/scripts/jni_manylinux_build.sh
index a34ec0f420..082a406560 100755
--- a/ci/scripts/jni_manylinux_build.sh
+++ b/ci/scripts/jni_manylinux_build.sh
@@ -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}"
@@ -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"
@@ -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"
diff --git a/compose.yaml b/compose.yaml
index b125c3c983..4241778781 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -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
@@ -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
diff --git a/pom.xml b/pom.xml
index 49e0c47c60..1d05c2a997 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@ under the License.
org.apache
apache
- 34
+ 35
org.apache.arrow