You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CI: Detect changed paths and gate cuda.bindings tests (#1908)
* ci: detect changed paths and gate cuda.bindings tests
Add a detect-changes job to ci.yml that classifies which top-level
modules were touched by a PR (cuda_bindings, cuda_core, cuda_pathfinder,
cuda_python, cuda_python_test_helpers, shared infra) using
dorny/paths-filter. The job emits composed gating outputs that account
for the dependency graph (pathfinder -> bindings -> core).
Thread a new skip-bindings-test input through the reusable test-wheel
workflows so cuda.bindings tests (and their Cython counterparts) are
skipped when the detect-changes output for test_bindings is false. For
PRs that only touch cuda_core this skips the expensive bindings suite
while still running cuda.core and cuda.pathfinder tests against the
wheel built in the current CI run.
Split the existing SKIP_CUDA_BINDINGS_TEST env var in ci/tools/env-vars
into two orthogonal flags: USE_BACKPORT_BINDINGS drives the backport
branch download path (CTK major mismatch), while SKIP_CUDA_BINDINGS_TEST
remains the test-time gate. This lets path-filter-based skips reuse the
existing SKIP_CUDA_BINDINGS_TEST plumbing without triggering a
cross-branch artifact fetch.
Non-PR events (push to main, tag, schedule, workflow_dispatch) still
exercise the full pipeline.
Refs #299
* fix: set explicit dorny base and decouple cython-test skip
Two fixes from code review:
1. Set `base: main` on dorny/paths-filter so backport PRs targeting
non-default branches still diff against main for path detection.
2. Decouple SKIP_CYTHON_TEST from SKIP_BINDINGS_TEST_OVERRIDE. The
path-filter override only skips bindings tests; cuda.core Cython
tests should still run on core-only PRs. Cython skip is now driven
solely by CTK minor-version mismatch.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: remove explicit dorny base, rely on v3 default
dorny/paths-filter v3 already diffs against the repo default branch
for non-default-branch pushes. Explicit base: main was redundant and
would produce wrong baselines for backport PRs targeting release
branches (all files seen as changed vs main).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: replace dorny/paths-filter with native git diff
Remove third-party dorny/paths-filter action dependency. Use
git merge-base + git diff --name-only + grep instead. Same
behavior, zero supply-chain risk, full control over base ref
resolution.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* style: use herestring instead of echo pipe in has_match
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* ci: resolve PR base branch at runtime for detect-changes diff
copy-pr-bot mirrors every PR to a pull-request/<N> branch regardless
of whether the upstream PR targets main or a backport branch such as
12.9.x. Diffing against origin/main unconditionally therefore
misclassifies changed paths on backport PRs and silently suppresses
the cuda.bindings test matrix.
Look up the real base ref via nv-gha-runners/get-pr-info (already used
elsewhere in this repo) and pass it to git merge-base so the changed-
paths classification matches the PR's actual target.
* ci: require detect-changes success in final checks aggregation
The checks job used if:always() plus shell-level result inspection of
doc and the three test jobs, treating skipped as non-fatal to preserve
intentional [doc-only] skips. detect-changes is a needs prerequisite
of every test job but was absent from checks.needs, so a failure in
the gating step silently cascaded into test-job skips and a green
final status.
Add detect-changes to checks.needs and require its result to be
success. The legitimate doc-only skip path is unaffected because that
leaves detect-changes itself successful.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments