unsloth/.github/workflows
Daniel Han 53ee9ce2ec ci(mlx): consolidate to single Mac M1 job with robust no-mlx spoof
Previously the workflow ran the dispatch tests on two matrix legs
(linux-cpu-spoof + macos-m1-real), which duplicated the spoofed
hardware matrix (it works identically on any host) while only the
Mac leg covered Apple-specific real-mlx checks. Drop the Linux leg,
rename the workflow to "MLX CI on Mac M1", and rely on the Mac
runner alone -- it now runs the SAME spoofed matrix PLUS the three
real-Apple-Silicon checks (real `_IS_MLX = True`, real mlx wheel
smoke imports, no spoof collisions with the live environment).

Also fix the `apple_silicon_no_mlx` profile so the spoof works on a
real Mac with mlx genuinely installed. Studio's `_has_mlx()` does
literal `import mlx.core` and catches `ImportError`, which the
previous spoof (delete `sys.modules["mlx"]` + patch `find_spec`)
could not block when mlx was on disk -- Python would re-find and
import the real package. The fix installs a `MetaPathFinder` for
the duration of the spoof that raises `ImportError` for `mlx` /
`mlx.*`, faithfully simulating "mlx not installed" regardless of
whether the host has the wheel. No change to the dispatch logic in
unsloth or studio; the Mac runner now exercises every profile end
to end with the real wheels installed.

Validated locally on .macsim_venv3 with a stand-in `mlx` package
on disk at .fakemlx_pkg/ to mimic the macos-14 runner: 35 passed +
1 skipped.
2026-05-07 03:30:45 +00:00
..
lint-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
mlx-ci.yml ci(mlx): consolidate to single Mac M1 job with robust no-mlx spoof 2026-05-07 03:30:45 +00:00
release-desktop.yml Fix Studio desktop tray installer and titlebar and bux fixes (#5179) 2026-04-30 08:40:39 -07:00
security-audit.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
stale.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-backend-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-frontend-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-inference-smoke.yml CI: rename + comprehensive Chat UI Tests (verified locally) 2026-05-07 01:51:01 +00:00
studio-tauri-smoke.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-ui-smoke.yml CI(security): random-generated passwords in every workflow (no hardcoded creds) 2026-05-07 03:27:54 +00:00
studio-update-smoke.yml CI: rename + comprehensive Chat UI Tests (verified locally) 2026-05-07 01:51:01 +00:00
wheel-smoke.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00