Build Test Cudf Java build-test-cudf-java

Build and test cudf Java bindings (cudf-java) inside a cudf devcontainer.

Use it when the user asks to build, compile, or test Java code in the cudf repository.

Works in Claude, ChatGPT, Codex and more
Our test
—
not tested yet
GitHub stars
9.8k
rapidsai/cudf
Added by
0
members
Updated
Dec 6
commit 88be93c
Content
3 files
no scripts · 9 KB
License
Apache 2.0
free to use

What our test found

Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.

View on GitHub ↗
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:

java -version && mvn --version

If either is missing, install JDK 17+ and Maven with the platform's package manager.

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:

  • , then continue at .

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:

  • , then continue at .

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
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:

find src/test/java -name "*Test.java" | head -20
Specific test class
mvn surefire:test@main-tests $MVN_COMMON_OPTS \
  -Dtest="<ClassName>"
Specific test method
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:

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