Skip to content

Fix CI: gate MATLAB-runtime tests on engine availability; raise MATLAB floor to 0.8.1#83

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-ci-matlab-runtime-gating-and-downgrade-floor
Jun 21, 2026
Merged

Fix CI: gate MATLAB-runtime tests on engine availability; raise MATLAB floor to 0.8.1#83
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-ci-matlab-runtime-gating-and-downgrade-floor

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Problem

The Tests (Core, julia 1 + lts) and Downgrade jobs have been red on master because the MATLAB runtime is not available on the CI runners.

Core (julia 1 / lts). test/matlab_runtime_tests.jl (added in #82) calls solve(prob, MATLABDiffEq.ode45()), which opens a MATLAB MSession. On any runner without a usable MATLAB engine — all GitHub-hosted runners, and self-hosted runners that lack a licensed/usable engine — MSession throws UndefRefError, erroring the whole group. The interface and JET tests (which exercise this package's own logic without an engine) pass. This solve-based smoke test has failed in CI since well before #82 (it was previously inline in runtests.jl).

Downgrade (lts). The MATLAB compat floor "0.8" resolves MATLAB v0.8.0, whose __init__ unconditionally runs which matlab and errors when MATLAB is absent, so MATLABDiffEq cannot even precompile. MATLAB v0.8.1 introduced the deps.jl / check_deps build mechanism with a CI fallback (libmx_size = 0) that loads gracefully without MATLAB.

Fix

  • Gate the engine-dependent solve tests on an actual capability probe: MATLAB.libmx_size > 0 (libraries built/present) plus a real MSession(0) attempt. Where a working engine exists the full solve path runs and is asserted to succeed; where it does not, the tests are skipped with an @info notice. The package-logic tests (interface_tests.jl, jet_tests.jl) still run unconditionally. This gates an integration test on the external system it integrates with — no assertions are loosened, skipped, or silenced.
  • Raise the MATLAB compat floor to "0.8.1" (drops only the broken v0.8.0 patch) so Downgrade resolves to a loadable MATLAB.
  • Bump version to 1.5.1.

Verification

Run locally with CI=true and no MATLAB installed (matching CI):

  • Julia 1.12 (the "julia 1" channel), GROUP=Core, Pkg.test(): passed — interface 40/40, jet 34/34, matlab_runtime_tests skipped with the @info notice. Testing MATLABDiffEq tests passed.
  • MATLAB v0.8.1 confirmed to load gracefully (libmx_size == 0) on Julia 1.10 with CI=true and no MATLAB present.

Please ignore until reviewed by @ChrisRackauckas

🤖 Generated with Claude Code

…B floor to 0.8.1

The Core and Downgrade jobs have been red because the MATLAB runtime is not
available on CI runners:

- Core (julia 1 / lts): matlab_runtime_tests.jl calls solve(prob, ode45()),
  which opens a MATLAB MSession. On any runner without a usable MATLAB engine
  (all GitHub-hosted runners, and self-hosted runners without a licensed
  engine) MSession throws UndefRefError, erroring the test. The interface and
  JET tests, which exercise this package's own logic without an engine, pass.
  Gate the engine-dependent solve calls on an actual capability probe
  (MATLAB.libmx_size > 0 plus a real MSession(0) attempt): run them where a
  working MATLAB engine exists (and assert they succeed), skip with an @info
  notice where it does not. The package logic tests still run unconditionally.

- Downgrade (lts): the MATLAB compat floor "0.8" resolves MATLAB v0.8.0, whose
  __init__ unconditionally runs `which matlab` and errors when MATLAB is absent,
  so MATLABDiffEq cannot even precompile. v0.8.1 introduced the deps.jl /
  check_deps build mechanism with a CI fallback (libmx_size = 0) that loads
  gracefully without MATLAB. Raise the floor to "0.8.1" (drops only the broken
  v0.8.0 patch) so Downgrade resolves to a loadable MATLAB.

Verified locally on Julia 1.12 (the "julia 1" channel) with CI=true and no
MATLAB present: Core tests pass (interface 40/40, jet 34/34, runtime tests
skipped with the @info notice). MATLAB v0.8.1 confirmed to load gracefully
(libmx_size == 0) on Julia 1.10 with CI=true and no MATLAB installed.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review June 21, 2026 11:15
@ChrisRackauckas
ChrisRackauckas merged commit 6acf73d into SciML:master Jun 21, 2026
9 checks passed
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