Fix CI: gate MATLAB-runtime tests on engine availability; raise MATLAB floor to 0.8.1#83
Merged
ChrisRackauckas merged 1 commit intoJun 21, 2026
Conversation
…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
marked this pull request as ready for review
June 21, 2026 11:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Tests(Core, julia 1 + lts) andDowngradejobs have been red onmasterbecause the MATLAB runtime is not available on the CI runners.Core (julia 1 / lts).
test/matlab_runtime_tests.jl(added in #82) callssolve(prob, MATLABDiffEq.ode45()), which opens a MATLABMSession. On any runner without a usable MATLAB engine — all GitHub-hosted runners, and self-hosted runners that lack a licensed/usable engine —MSessionthrowsUndefRefError, erroring the whole group. The interface and JET tests (which exercise this package's own logic without an engine) pass. Thissolve-based smoke test has failed in CI since well before #82 (it was previously inline inruntests.jl).Downgrade (lts). The
MATLABcompat floor"0.8"resolvesMATLAB v0.8.0, whose__init__unconditionally runswhich matlaband errors when MATLAB is absent, soMATLABDiffEqcannot even precompile.MATLAB v0.8.1introduced thedeps.jl/check_depsbuild mechanism with a CI fallback (libmx_size = 0) that loads gracefully without MATLAB.Fix
MATLAB.libmx_size > 0(libraries built/present) plus a realMSession(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@infonotice. 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.MATLABcompat floor to"0.8.1"(drops only the brokenv0.8.0patch) so Downgrade resolves to a loadable MATLAB.1.5.1.Verification
Run locally with
CI=trueand no MATLAB installed (matching CI):GROUP=Core,Pkg.test(): passed — interface 40/40, jet 34/34,matlab_runtime_testsskipped with the@infonotice.Testing MATLABDiffEq tests passed.MATLAB v0.8.1confirmed to load gracefully (libmx_size == 0) on Julia 1.10 withCI=trueand no MATLAB present.Please ignore until reviewed by @ChrisRackauckas
🤖 Generated with Claude Code