Skip to content

Commit bbd3163

Browse files
committed
Force Apple Silicon MATLAB arch in CI parity workflows
1 parent 36f3ff5 commit bbd3163

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/matlab-parity-gate.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
AGENT_TOOLSDIRECTORY: /Users/iahncajigas/actions-runner/_work/_tool
2323
RUNNER_TEMP: /Users/iahncajigas/actions-runner/_work/_temp
2424
TMPDIR: /Users/iahncajigas/actions-runner/_work/_temp
25+
NSTAT_MATLAB_EXTRA_ARGS: -maca64
2526
steps:
2627
- name: Prepare runner directories
2728
run: |
@@ -33,7 +34,7 @@ jobs:
3334
lfs: true
3435

3536
- name: MATLAB smoke preflight
36-
run: /Applications/MATLAB_R2025b.app/bin/matlab -batch "disp(version); exit"
37+
run: /Applications/MATLAB_R2025b.app/bin/matlab -maca64 -batch "disp(version); exit"
3738

3839
- name: Pull LFS Objects
3940
run: git lfs pull

.github/workflows/matlab-smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
runs-on: [self-hosted, macOS]
1313
steps:
1414
- name: Print MATLAB version
15-
run: /Applications/MATLAB_R2025b.app/bin/matlab -batch "disp(version); exit"
15+
run: /Applications/MATLAB_R2025b.app/bin/matlab -maca64 -batch "disp(version); exit"

python/tools/verify_python_vs_matlab_similarity.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import importlib
55
import json
66
import math
7+
import os
78
import re
89
import shutil
910
import subprocess
@@ -18,6 +19,7 @@
1819
REPO_ROOT = Path(__file__).resolve().parents[2]
1920
REPORT_DIR = REPO_ROOT / "python" / "reports"
2021
MATLAB_BIN = Path("/Applications/MATLAB_R2025b.app/bin/matlab")
22+
MATLAB_EXTRA_ARGS = [arg for arg in os.environ.get("NSTAT_MATLAB_EXTRA_ARGS", "").split() if arg]
2123
TOC_PATH = REPO_ROOT / "helpfiles" / "helptoc.xml"
2224
PY_ROOT = REPO_ROOT / "python"
2325
if str(PY_ROOT) not in sys.path:
@@ -64,6 +66,10 @@
6466
}
6567

6668

69+
def _matlab_batch_command(batch_cmd: str) -> list[str]:
70+
return [str(MATLAB_BIN), *MATLAB_EXTRA_ARGS, "-batch", batch_cmd]
71+
72+
6773
def _normalize_key(s: str) -> str:
6874
return re.sub(r"[^a-z0-9]", "", s.lower())
6975

@@ -181,7 +187,7 @@ def _matlab_class_checks(timeout_s: int = 180) -> dict[str, Any]:
181187

182188
try:
183189
cp = subprocess.run(
184-
[str(MATLAB_BIN), "-batch", cmd],
190+
_matlab_batch_command(cmd),
185191
cwd=str(REPO_ROOT),
186192
capture_output=True,
187193
text=True,
@@ -329,7 +335,7 @@ def run_script_path(path: Path, timeout: int, source_label: str | None = None) -
329335
t0 = time.time()
330336
try:
331337
cp = subprocess.run(
332-
[str(MATLAB_BIN), "-batch", cmd],
338+
_matlab_batch_command(cmd),
333339
cwd=str(REPO_ROOT),
334340
capture_output=True,
335341
text=True,

0 commit comments

Comments
 (0)