diff --git a/ci/check-cuda-dependencies.sh b/ci/check-cuda-dependencies.sh new file mode 100644 index 0000000000..3fe91ebbb4 --- /dev/null +++ b/ci/check-cuda-dependencies.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. +# +# Licensed 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. +# + +# common script to help check if libcudf.so has dynamical link to cuda libs + +set -exo pipefail + +jar_path=$1 +tmp_path=/tmp/"jni-$(date "+%Y%m%d%H%M%S")" +unzip -j "${jar_path}" "*64/Linux/libcudf.so" -d "${tmp_path}" + +if objdump -p "${tmp_path}/libcudf.so" | grep NEEDED | grep -q cuda; then + echo "dynamical link to CUDA lib found in libcudf.so..." + ldd "${tmp_path}/libcudf.so" + exit 1 +else + echo "no dynamical link to CUDA lib found in libcudf.so" +fi diff --git a/ci/nightly-build.sh b/ci/nightly-build.sh index 8a3c2dbacf..66b3e450aa 100755 --- a/ci/nightly-build.sh +++ b/ci/nightly-build.sh @@ -29,6 +29,7 @@ USE_GDS=${USE_GDS:-ON} USE_SANITIZER=${USE_SANITIZER:-ON} BUILD_FAULTINJ=${BUILD_FAULTINJ:-ON} ARM64=${ARM64:-false} +artifact_suffix="${CUDA_VER}" profiles="source-javadoc" if [ "${ARM64}" == "true" ]; then @@ -36,6 +37,7 @@ if [ "${ARM64}" == "true" ]; then USE_GDS="OFF" USE_SANITIZER="ON" BUILD_FAULTINJ="OFF" + artifact_suffix="${artifact_suffix}-arm64" fi ${MVN} clean package ${MVN_MIRROR} \ @@ -45,3 +47,6 @@ ${MVN} clean package ${MVN_MIRROR} \ -DUSE_GDS=${USE_GDS} -Dtest=*,!CuFileTest,!CudaFatalTest,!ColumnViewNonEmptyNullsTest \ -DBUILD_TESTS=ON -DBUILD_FAULTINJ=${BUILD_FAULTINJ} -Dcuda.version=$CUDA_VER \ -DUSE_SANITIZER=${USE_SANITIZER} + +build_name=$($MVN help:evaluate -Dexpression=project.build.finalName -q -DforceStdout) +. ci/check-cuda-dependencies.sh "target/${build_name}-${artifact_suffix}.jar" diff --git a/ci/premerge-build.sh b/ci/premerge-build.sh index e3adc10b3e..7a760dafee 100755 --- a/ci/premerge-build.sh +++ b/ci/premerge-build.sh @@ -28,3 +28,6 @@ ${MVN} verify ${MVN_MIRROR} \ -Dlibcudf.build.configure=true \ -DUSE_GDS=ON -Dtest=*,!CuFileTest,!CudaFatalTest,!ColumnViewNonEmptyNullsTest \ -DBUILD_TESTS=ON + +build_name=$($MVN help:evaluate -Dexpression=project.build.finalName -q -DforceStdout) +. ci/check-cuda-dependencies.sh "target/${build_name}-cuda11.jar" diff --git a/ci/submodule-sync.sh b/ci/submodule-sync.sh index 9794d40a0f..a5ff64ed2a 100755 --- a/ci/submodule-sync.sh +++ b/ci/submodule-sync.sh @@ -88,6 +88,9 @@ else echo "Test failed, will update the result" fi +build_name=$($MVN help:evaluate -Dexpression=project.build.finalName -q -DforceStdout) +. ci/check-cuda-dependencies.sh "target/${build_name}-cuda11.jar" + LIBCUDF_BUILD_PATH=$(${MVN} help:evaluate -Dexpression=libcudf.build.path -q -DforceStdout) # Extract the rapids-cmake sha1 that we need to pin too rapids_cmake_sha=$(git -C ${LIBCUDF_BUILD_PATH}/_deps/rapids-cmake-src/ rev-parse HEAD)