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.

Informações da origem

Repositório
NVIDIA/cudf
Última atividade na origem
17 de agosto de 2026 às 19:29
Idioma detectado do SKILL.md
inglês
Estrelas
9.776
Forks
1.130

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Explorador de arquivos
3 arquivos

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
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 ```
Ver no GitHub