Skip to content

ci: reusable sublibrary-project-tests.yml (change detection + full test_groups matrix) - #54

Merged
ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:sublibrary-project-tests
Jun 5, 2026
Merged

ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:sublibrary-project-tests

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

One inherited workflow for all monorepo sublibrary CI — dependency-graph change detection and the full per-sublibrary test_groups.toml matrix, so it serves everything from the small monorepos up to OrdinaryDiffEq.

Caller stays a thin uses: (+ optional knobs for repos like ODE):

jobs:
  sublibraries:
    uses: SciML/.github/.github/workflows/sublibrary-project-tests.yml@v1
    # with:                                   # OrdinaryDiffEq
    #   group-env-name: ODEDIFFEQ_TEST_GROUP
    #   check-bounds: auto
    secrets: inherit

Detection (compute_affected_sublibraries.jl --projects-matrix): the changed sublibraries + their transitive reverse-deps, expanded into {project, group, version, runner, timeout, num_threads} per test group. Reuses test_groups.toml (multi-version, custom/GPU runners, timeout, num_threads, local_only), the downstream→v1 rule, and EXCLUDES. No test_groups.toml → default Core[lts,1.11,1,pre] + QA[1]. test-all: true forces the full matrix.

Execution is the project model: tests.yml@v1 with project: lib/X, the group passed via group-env-name (default GROUP; ODE uses ODEDIFFEQ_TEST_GROUP). This is behaviorally equivalent to ODE's root-runtests.jl dispatcher (Pkg.activate(lib/X) + transitive [sources] develop + withenv(ODEDIFFEQ_TEST_GROUP) Pkg.test).

tests.yml gains (all defaults preserve existing callers): runner (JSON labels, e.g. self-hosted GPU), timeout-minutes, check-bounds, allow-reresolve, group-env-name.

Verified locally with --projects-matrix against OrdinaryDiffEq: GPU groups land on [self-hosted,Linux,X64,gpu] with timeout:60; Core spans lts/1.11/1 (pre dropped by EXCLUDES for BDF); reverse-deps come in as downstream on 1; no-toml sublibs get Core[lts,1.11,1,pre]+QA[1]. Existing group-matrix and --projects outputs unchanged.

Callers (need this merged + v1 retag): BoundaryValueDiffEq#499, NonlinearSolve#954, Corleone#77, DataDrivenDiffEq#611, RecursiveArrayTools#605, LinearSolve#1006, NeuralLyapunov#187, DiffEqProblemLibrary#192, Optimization#1216 (+ OrdinaryDiffEq, pending).

Ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

Factor the per-repo SublibraryCI "list lib/* -> matrix -> tests.yml" logic
into one reusable workflow so each monorepo's caller is just its branch
triggers + concurrency + a single `uses:`. Lists every lib/<name> with a
Project.toml and runs each via tests.yml with project=lib/<name>, coverage
directories pointed at the sublibrary. Complements sublibrary-tests.yml (the
GROUP-dispatch / change-detection variant for very large monorepos).

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add a detect job that runs only the lib/<name> sublibraries affected by the
diff, reusing the same dependency-graph reachability as sublibrary-tests.yml.
compute_affected_sublibraries.jl gains a --projects mode that emits the
affected "lib/<pkg>" paths (union of directly-changed and transitively-
affected) instead of the GROUP/version matrix; the existing matrix output is
unchanged. A test-all input forces every sublibrary for scheduled/manual full
runs. This lets the project-model workflow scale to large monorepos without
running every sublibrary on every PR.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title ci: add reusable sublibrary-project-tests.yml (project-model sublib CI) ci: reusable sublibrary-project-tests.yml with dependency-graph change detection Jun 5, 2026
… GPU, timeouts)

Give the project-model sublibrary workflow the same per-sublibrary matrix as
the GROUP-dispatch sublibrary-tests.yml, so it can serve every monorepo
(including OrdinaryDiffEq) from one inherited workflow:

- compute_affected_sublibraries.jl gains --projects-matrix, emitting one entry
  per affected sublibrary x test group x version with {project, group, version,
  runner, timeout, num_threads} -- reusing test_groups.toml (versions, custom/
  GPU runners, timeout, num_threads, local_only), the downstream-only-on-v1
  rule, and EXCLUDES. No test_groups.toml -> default Core[lts,1.11,1,pre]+QA[1].
- tests.yml gains runner (JSON labels, e.g. self-hosted GPU), timeout-minutes,
  check-bounds, allow-reresolve, and group-env-name (set the group under a
  configurable env var, e.g. ODEDIFFEQ_TEST_GROUP). All defaults preserve
  existing caller behavior.
- sublibrary-project-tests.yml consumes the matrix and forwards each entry to
  tests.yml (project=lib/X + group via group-env-name). test-all runs the full
  matrix for every sublibrary.

Verified --projects-matrix locally against OrdinaryDiffEq: GPU groups land on
the self-hosted GPU runner with timeout 60, Core spans lts/1.11/1(/pre minus
EXCLUDES), reverse-deps come in as downstream on v1, no-toml sublibs get the
default Core+QA. Existing group-matrix and --projects outputs unchanged.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the title ci: reusable sublibrary-project-tests.yml with dependency-graph change detection ci: reusable sublibrary-project-tests.yml (change detection + full test_groups matrix) Jun 5, 2026
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review June 5, 2026 08:33
@ChrisRackauckas
ChrisRackauckas merged commit 30004d8 into SciML:master Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants