Skip to content

Group clib, Java, Lucene, Rust, and Go CI jobs as matrix sub-jobs and split Java/Lucene build and test - #2761

Merged
rapids-bot[bot] merged 12 commits into
NVIDIA:mainfrom
bdice:ci/restructure-clib-java-lucene-matrices
Oct 7, 2026
Merged

rapids-bot[bot] merged 12 commits into
NVIDIA:mainfrom
bdice:ci/restructure-clib-java-lucene-matrices

Conversation

@bdice

@bdice bdice commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Restructures the clib, Java, Lucene, Rust, and Go CI jobs in pr.yaml, build.yaml, and test.yaml so each is a single job whose matrix entries appear as sub-jobs, following NVIDIA/cudf#24327. Previously each of these was a separate *-matrix job plus a caller job that defined the matrix, so every matrix entry showed up as its own top-level check.

Reusable workflows

  • .github/workflows/clib-build.yaml: the standalone C tarball build, previously written out inline in both pr.yaml and build.yaml. It runs on the host runner, so it keeps its own steps.
  • .github/workflows/matrix-job.yaml: computes the conda-cpp-build matrix and calls rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main once per entry, so the job steps stay in shared-workflows instead of being copied here. Inside the wrapper, custom-job inputs use ${{ matrix.* }} directly:
    • Runner: GPU jobs default to rtxpro6000 on amd64 and l4 otherwise, with the latest driver. CPU jobs pass node_type, e.g. the Java/Lucene builds use cpu8.
    • Image: <container-image-repository>:26.12-cuda<CUDA_VER>-<LINUX_VER>-py<PY_VER>, with the repository defaulting to rapidsai/ci-conda. ci/release/update-version.sh still bumps the tag.
    • Artifact: <artifact-name-prefix>-cuda<CUDA_VER> when a prefix is given.

custom-job reads secrets only through optional inputs we don't set, so callers no longer use secrets: inherit.

Java and Lucene: separate build and test

Previously ci/test_java.sh/ci/test_lucene.sh rebuilt and tested on amd64, and *-other-arch jobs tested the amd64-built artifacts on arm64 (ci/test_*_prebuilt.sh). Now (closes the TODOs referencing #868):

  • conda-java-build/conda-lucene-build (PR) and java-build/lucene-build (build.yaml) build once on amd64 CPU runners, which build.yaml already used.
  • conda-java-tests/conda-lucene-tests test those artifacts without recompiling, on every architecture, amd64 included. The published jar is the amd64 build, so this checks that its jextract-generated Panama bindings work everywhere.
  • In test.yaml, the nightly test jobs no longer build. rapids-download-from-github fetches the artifacts from the build.yaml run for the same commit, as the old other-arch jobs already did.
  • ci/test_java_prebuilt.sh and ci/test_lucene_prebuilt.sh are renamed to ci/test_java.sh and ci/test_lucene.sh, replacing the old build-and-test scripts. This also makes the existing !ci/test_java.sh/!ci/test_lucene.sh changed-files exclusions apply to the scripts that run.
  • ci/build_java.sh/ci/build_lucene.sh drop --run-java-tests handling. The build.sh --run-java-tests flag for local development is unchanged.
  • The *-other-arch jobs' release/26.10 pins and 26.10 container images are gone. All jobs use @main and 26.12 images.

Scripts no longer take matrix arguments

ci/test_java.sh, ci/test_lucene.sh, ci/build_lucene.sh, and ci/test_standalone_c.sh derive artifact names from RAPIDS_CUDA_VERSION (and $(arch) for the clib tarball's amd64/arm64 suffix). Artifact names are unchanged.

Other cleanups

  • rocky8-clib-tests no longer passes date: ${{ inputs.date }}_c and sha: ${{ inputs.sha }}. pr.yaml has no such inputs.
  • build.yaml's Rust matrix was computed with build_type: pull-request. It now uses the run's build type. The matrices are identical today.
  • nv-gha-runners/* actions (get-pr-info in pr.yaml) are used at @main, as in shared-workflows. .github/zizmor.yml now allows refs for nv-gha-runners/*, as it already did for rapidsai/shared-workflows and rapidsai/shared-actions.

PR check names

Before After
rocky8-clib-standalone-build (amd64, 3.11, 12.9.2, rockylinux8) rocky8-clib-standalone-build / 12.9.2, 3.11, amd64, rockylinux8
rocky8-clib-tests (amd64, 3.11, 12.9.2, rockylinux8) rocky8-clib-tests / 12.9.2, 3.11, amd64, rockylinux8, rtxpro6000, latest-driver / build
conda-java-build-and-tests (amd64, 3.11, 12.9.2, rockylinux8) conda-java-build / 12.9.2, 3.11, amd64, rockylinux8 / build
conda-java-tests / 12.9.2, 3.11, amd64, rockylinux8, rtxpro6000, latest-driver / build
conda-java-tests-other-arch (arm64, 3.11, 12.9.2, rockylinux8) conda-java-tests / 12.9.2, 3.11, arm64, rockylinux8, l4, latest-driver / build
conda-lucene-build-and-tests (amd64, 3.11, 12.9.2, rockylinux8) conda-lucene-build / 12.9.2, 3.11, amd64, rockylinux8 / build
conda-lucene-tests / 12.9.2, 3.11, amd64, rockylinux8, rtxpro6000, latest-driver / build
conda-lucene-tests-other-arch (arm64, 3.11, 12.9.2, rockylinux8) conda-lucene-tests / 12.9.2, 3.11, arm64, rockylinux8, l4, latest-driver / build
rust-build (amd64, 3.11, 12.9.2, rockylinux8) rust-build / 12.9.2, 3.11, amd64, rockylinux8, rtxpro6000, latest-driver / build
go-build (amd64, 3.11, 12.9.2, rockylinux8) go-build / 12.9.2, 3.11, amd64, rockylinux8, rtxpro6000, latest-driver / build

Rows show CUDA 12.9.2; each job also has a CUDA 13.3.0 entry. The clib jobs also have arm64 entries, as before. The *-matrix jobs are gone from pr-builder.

Runners

The Java and Lucene PR builds move from RTX PRO 6000 to cpu8 runners, matching build.yaml. All other jobs keep their previous runners: clib build cpu16; clib, Java, and Lucene tests on RTX PRO 6000 (amd64) or L4 (arm64); Rust and Go on RTX PRO 6000. Rust and Go stay single GPU jobs: each takes ~4–7 minutes, mostly conda environment setup, so splitting build and test would repeat that setup without saving GPU time.

@copy-pr-bot

copy-pr-bot Bot commented Oct 6, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@bdice
bdice force-pushed the ci/restructure-clib-java-lucene-matrices branch from 946d5ee to 40ad88c Compare October 7, 2026 02:31
@bdice

bdice commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 40ad88c

@bdice

bdice commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test aa7c319

@bdice
bdice marked this pull request as ready for review October 7, 2026 14:19
@bdice
bdice requested a review from a team as a code owner October 7, 2026 14:19
@bdice
bdice requested a review from jameslamb October 7, 2026 14:19
@bdice bdice added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Oct 7, 2026
@bdice bdice self-assigned this Oct 7, 2026
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/cuvs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 7cd12fba-a81e-49f2-ae68-3c15164985aa
📥 Commits

Reviewing files that changed from the base of the PR and between f7a1c83 and 1fe5bc7.

📒 Files selected for processing (2)
  • .github/workflows/pr.yaml
  • .github/workflows/test.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Summary

Summary by CodeRabbit

  • CI Improvements
    • Consolidated automated build and test workflows for the C library, Rust, Go, Java, and Lucene.
    • Separated Java and Lucene builds from their tests; test runs now use prebuilt artifacts.
    • Standardized artifact selection for standalone C tests and Java/Lucene test runs.
    • Java and Lucene builds and tests now run on amd64, replacing test coverage on other architectures.

Walkthrough

The pull request adds reusable workflows for C builds and matrix jobs, then routes build and test workflows through them. Java and Lucene tests now use downloaded build artifacts. Build scripts update artifact naming and arguments, and standalone C tests derive artifact names from the CUDA version and host architecture.

Changes

CI Workflow and Artifact Changes

Layer / File(s) Summary
Reusable build and matrix-job workflows
.github/workflows/clib-build.yaml, .github/workflows/matrix-job.yaml
The new reusable workflows define build inputs and permissions, compute build matrices, run jobs, and upload artifacts.
Build and test job wiring
.github/workflows/build.yaml, .github/workflows/pr.yaml, .github/workflows/test.yaml, .github/zizmor.yml
Build, pull-request, and test workflows use the reusable workflows with job dependencies, matrix filters, artifact paths, and test scripts. Rust and Go retain their change-group conditions and amd64 filters. The unpinned-action policy permits nv-gha-runners references.
Build arguments and artifact-based tests
ci/build_java.sh, ci/build_lucene.sh, ci/test_java.sh, ci/test_lucene.sh, ci/test_standalone_c.sh, ci/test_java_prebuilt.sh, ci/test_lucene_prebuilt.sh
Java and Lucene build scripts use fixed example-build arguments. Their test scripts download artifacts, restore build outputs, and run Maven without compilation. The prebuilt test scripts are removed. The standalone C test script derives the artifact name from CUDA version and architecture.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 1fe5b

This change reorganizes CI so that Java and Lucene are built once on amd64 and tested on every architecture, and it groups the other jobs as matrix sub-jobs. No concrete defects were identified, so it appears ready to merge once its CI checks pass.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: grouping clib, Java, Lucene, Rust, and Go CI jobs as matrix sub-jobs and separating Java/Lucene build and test jobs.
Description check ✅ Passed The description directly explains the CI workflow restructuring, reusable workflows, Java/Lucene build and test split, script changes, artifact handling, and runner changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@bdice bdice changed the title Group clib, Java, and Lucene PR CI jobs as matrix sub-jobs Group clib, Java, Lucene, Rust, and Go CI jobs as matrix sub-jobs and split Java/Lucene build and test Oct 7, 2026
with:
build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
build:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the standalone C tarball build that used to be written out inline in both pr.yaml and build.yaml. The steps are unchanged. It runs directly on the host runner (./build.sh tarball on cpu16), not in a CI container, so it can't use custom-job.yaml like the other jobs. The workflow computes its own conda-cpp-build matrix, so each caller is a single job, and the matrix entries appear as sub-jobs under it. The branch/date/sha inputs and the rapids-github-info step come from the build.yaml copy; they're empty on PR runs.

with:
build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
matrix_filter: 'map(. + {GPU: (if .ARCH == "amd64" then "rtxpro6000" else "l4" end), DRIVER: "latest"}) | ${{ inputs.matrix_filter }}'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default runner for each entry is rtxpro6000 on amd64 and l4 otherwise, with the latest driver. These are the GPUs the old jobs used, so most callers don't set a matrix_filter. Callers that need only amd64 (Rust, Go, the Java/Lucene builds) filter with map(select(.ARCH == "amd64")).

build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
matrix_filter: 'map(. + {GPU: (if .ARCH == "amd64" then "rtxpro6000" else "l4" end), DRIVER: "latest"}) | ${{ inputs.matrix_filter }}'
run:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name gives readable check names, e.g. conda-java-tests / 12.9.2, 3.11, arm64, rockylinux8, l4, latest-driver / build. The trailing / build is custom-job's job ID. CPU jobs (node_type set) leave out the GPU and driver.

strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.compute-matrix.outputs.matrix) }}
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each matrix entry calls the shared custom-job.yaml instead of a copy of its steps, so changes in shared-workflows (action pins, proxy cache, telemetry and so on) reach these jobs automatically. Because the matrix lives in this wrapper, the inputs below can use ${{ matrix.* }} directly. custom-job reads secrets only through optional inputs (alternative-gh-token-secret-name, sccache-dist-token-secret-name) that we don't set, so callers don't need secrets: inherit.

date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
arch: ${{ matrix.ARCH }}
node_type: ${{ inputs.node_type || format('gpu-{0}-{1}-1', matrix.GPU, matrix.DRIVER) }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPU jobs get gpu-<GPU>-<DRIVER>-1 from the matrix entry. The Java/Lucene builds pass node_type: cpu8 instead. Without --run-java-tests, the Maven build passes -DskipTests, so it never needs a GPU; build.yaml already ran these builds on cpu8.

Comment thread ci/test_java.sh
# amd64; this verifies that the resulting jextract-generated Panama bindings also work
# correctly against a native libcuvs_c.so on this host's architecture.

CUVS_JAVA_ARTIFACT="cuvs-java-cuda${RAPIDS_CUDA_VERSION}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the former ci/test_java_prebuilt.sh, renamed to fit the build_*.sh / test_*.sh convention. It tests a prebuilt artifact, like test_python.sh and test_cpp.sh. The old build-and-test test_java.sh is removed. The script now takes no arguments: the artifact name comes from RAPIDS_CUDA_VERSION, which the CI images set, and the dependency matrix uses $(arch), as build_java.sh does. The rename also means the existing !ci/test_java.sh changed-files exclusions in pr.yaml now cover the script that actually runs.

Comment thread ci/test_lucene.sh
# this doubles as a cross-arch check that the jextract-generated Panama bindings baked
# into the amd64 jar work unmodified against a native libcuvs_c.so on that architecture.

CUVS_JAVA_ARTIFACT="cuvs-java-cuda${RAPIDS_CUDA_VERSION}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as test_java.sh: the former test_lucene_prebuilt.sh, with no arguments.

Comment thread ci/build_java.sh
# TODO: Remove this argument-handling when build and test workflows are separated,
# and test_java.sh no longer calls build_java.sh
# ref: https://github.com/nvidia/cuvs/issues/868
EXTRA_BUILD_ARGS=("--build-java-examples")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes the --run-java-tests handling, as the TODO here asked (#868), because CI no longer builds and tests in one job. The build.sh --run-java-tests flag for local development is unchanged.

Comment thread ci/build_lucene.sh
echo "Error: name of the cuvs-java artifact is missing" >&2
exit 1
fi
CUVS_JAVA_ARTIFACT="cuvs-java-cuda${RAPIDS_CUDA_VERSION}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With --run-java-tests gone, the script takes no arguments. The cuvs-java artifact name comes from RAPIDS_CUDA_VERSION, matching what matrix-job.yaml uploads.

Comment thread ci/test_standalone_c.sh
fi

payload_name="$1"
case "$(arch)" in

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clib tarball artifact is named libcuvs_c_<CUDA_VER>_<ARCH>.tar.gz, with amd64/arm64 from the matrix. None of the images has an environment variable with those spellings, so this maps $(arch) to them. That keeps the artifact name unchanged.

@imotov imotov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! Thanks!

@bdice

bdice commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 8543701 into NVIDIA:main Oct 7, 2026
229 of 232 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants