Skip to content
Merged
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
36 changes: 10 additions & 26 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -568,36 +568,20 @@ jobs:
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.java-build-matrix.outputs.matrix) }}
runs-on: linux-${{ matrix.ARCH }}-gpu-l4-latest-1
container:
image: rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }} # zizmor: ignore[unpinned-images]
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Download java-build artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: cudf_java_${{ matrix.ARCH }}_cu${{ matrix.CUDA_MAJOR }}
path: java_pkg
- name: Run Java tests
env:
LIBCUDF_LARGE_STRINGS_ENABLED: "0"
run: |
. java/ci/java_classifier.sh
JAVA_JAR="$(cudf_java_resolve_artifact_jar java_pkg)"
export JAVA_JAR
ci/test_packaged_java.sh
with:
build_type: pull-request
arch: ${{ matrix.ARCH }}
node_type: "gpu-l4-latest-1"
container_image: "rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_packaged_java.sh"
conda-notebook-tests:
needs: [conda-python-build, conda-python-build-noarch, changed-files]
permissions:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,37 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:26.10-latest"
script: "ci/test_java.sh"
# Test the packaged cuDF Java JAR built by build.yaml java-build for every Maven classifier.
java-build-matrix:
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
with:
build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
matrix_filter: 'map(. + {CUDA_MAJOR: (.CUDA_VER | split(".") | .[0])})'
java-tests:
needs: [java-build-matrix]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.java-build-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
arch: ${{ matrix.ARCH }}
node_type: "gpu-l4-latest-1"
container_image: "rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_packaged_java.sh"
conda-notebook-tests:
permissions:
actions: read
Expand Down
40 changes: 35 additions & 5 deletions ci/test_packaged_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,50 @@
# Run the Java tests against an already-packaged classifier JAR.
#
# Activates -Ppackaged-jar-tests so the surefire classpath uses the JAR at
# JAVA_JAR instead of a locally compiled target/classes tree. Caller places
# the JAR (e.g. via actions/download-artifact) before invoking this script.
# JAVA_JAR instead of a locally compiled target/classes tree.
#
# When JAVA_JAR is unset, download the java-build artifact via
# rapids-download-from-github (pr.yaml for PRs, build.yaml otherwise).
#
# Inputs (environment variables):
# JAVA_JAR Absolute path to the classifier JAR (required).
# JAVA_JAR Optional. Absolute path to the classifier JAR.
# If unset, the JAR is downloaded from the
# matching java-build artifact.
# LIBCUDF_LARGE_STRINGS_ENABLED Optional; defaults to 0 (same as ci/test_java.sh).

set -euo pipefail

REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${REPO_ROOT}"

if [[ -z ${JAVA_JAR:-} || ! -f ${JAVA_JAR} ]]; then
echo "Error: JAVA_JAR must point to an existing classifier JAR" >&2
# shellcheck disable=SC1091
. "${REPO_ROOT}/java/ci/java_classifier.sh"

if [[ -z ${JAVA_JAR:-} ]]; then
if [[ -z ${RAPIDS_CUDA_VERSION:-} ]]; then
echo "Error: RAPIDS_CUDA_VERSION must be set when JAVA_JAR is unset" >&2
exit 1
fi
cuda_major="${RAPIDS_CUDA_VERSION%%.*}"

# matrix.ARCH values are amd64/arm64; $(arch) / uname -m return x86_64/aarch64.
case "$(uname -m)" in
x86_64) java_arch=amd64 ;;
aarch64|arm64) java_arch=arm64 ;;
*)
echo "Error: unsupported host arch '$(uname -m)'" >&2
exit 1
;;
esac

rapids-logger "Downloading cudf_java_${java_arch}_cu${cuda_major}"
JAVA_PKG="$(rapids-download-from-github "cudf_java_${java_arch}_cu${cuda_major}")"
JAVA_JAR="$(cudf_java_resolve_artifact_jar "${JAVA_PKG}")"
export JAVA_JAR
fi

if [[ ! -f ${JAVA_JAR} ]]; then
echo "Error: JAVA_JAR='${JAVA_JAR}' does not point to an existing file" >&2
exit 1
fi

Expand Down
Loading