Skip to main content

build-test-cudf-java

Build and test cudf Java bindings (cudf-java) inside a cudf devcontainer. Use when the user asks to build, compile, or test Java code in the cudf repository.

소스 정보

저장소
NVIDIA/cudf
최근 소스 활동
2026년 8월 17일 19:29
감지된 SKILL.md 언어
영어
스타
9,776
포크
1,130

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
build-test-cudf-java
description
Build and test cudf Java bindings (cudf-java) inside a cudf devcontainer. Use when the user asks to build, compile, or test Java code in the cudf repository.
# Build and Test cudf-java ## Prerequisites ### JDK and Maven Ensure JDK (17+) and Maven are installed: ```bash java -version && mvn --version ``` If either is missing, detect the OS and install using the appropriate package manager. Hints: - **Debian/Ubuntu** (`apt`): `sudo apt-get update -qq && sudo apt-get install -y -qq default-jdk maven` - **Fedora/RHEL** (`dnf`): `sudo dnf install -y java-17-openjdk-devel maven` - **Arch** (`pacman`): `sudo pacman -S --noconfirm jdk17-openjdk maven` - **macOS** (`brew`): `brew install openjdk@17 maven` Detect the OS by checking which package manager is available (e.g. `command -v apt-get`, `command -v dnf`, etc.) and use the matching command. Run all Maven commands below from the `java/` directory. ## Choose a libcudf provider Prefer the installed nightly package when the changes are limited to Java or JNI and the user has not requested a libcudf source rebuild: - [Build JNI against an installed nightly libcudf](references/nightly-libcudf.md), then continue at [Running Java tests](#running-java-tests). Use a local libcudf source build when the changes affect libcudf, require unreleased libcudf headers or symbols, no compatible nightly exists, or the user explicitly requests a source build: - [Build JNI against a local libcudf build](references/local-libcudf.md), then continue at [Running Java tests](#running-java-tests). ## Running Java tests **Always run `mvn install $MVN_COMMON_OPTS -DskipTests` first** before running tests. The `mvn test` goal re-triggers the cmake/native build step. If `target/cmake-build` already contains fully built artifacts from a prior `mvn install`, this is an incremental no-op. But if the cmake-build directory was cleaned or is missing, `mvn test` may hit a race condition where the linker tries to link `libcudfjni.so` before `libarrow.a` is fully built, causing a `cannot find libarrow.a` error. If this happens, re-run `mvn install $MVN_COMMON_OPTS -DskipTests` to rebuild the native code cleanly, then retry `mvn test`. ### All tests ```bash mvn test $MVN_COMMON_OPTS ``` The POM routes tests that need special assertion or fork behavior to dedicated Surefire executions. ### Discovering tests Java test sources are at `src/test/java/ai/rapids/cudf/`. Use `find` or `glob` to discover test classes: ```bash find src/test/java -name "*Test.java" | head -20 ``` ### Specific test class ```bash mvn surefire:test@main-tests $MVN_COMMON_OPTS \ -Dtest="<ClassName>" ``` ### Specific test method ```bash mvn surefire:test@main-tests $MVN_COMMON_OPTS \ -Dtest="<ClassName>#<testName>" ``` Use the named `main-tests` execution for specific ordinary tests so `-Dtest` does not affect the separately configured executions. ### Tests with special configuration Invoke tests that require special configuration through their dedicated executions: ```bash mvn surefire:test@non-empty-null-test $MVN_COMMON_OPTS mvn surefire:test@fatal-cuda-test $MVN_COMMON_OPTS mvn surefire:test@native-deps-loader-test $MVN_COMMON_OPTS ```
GitHub에서 보기