ci: install mlx extra so the Test workflow can import mlx #65
Workflow file for this run
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
| name: Test | |
| # Spine contract tests (unit + parity). Separate from the release-only | |
| # workflow.yml: this workflow has NO id-token permission, so OIDC trusted | |
| # publishing stays isolated to the publisher (ARCHITECTURE.md §12). | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Unit + spine contracts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install package + test deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| # mlx-cpu provides the Linux libmlx.so backend; the bare `mlx` wheel is a | |
| # thin wrapper. The [mlx] extra stays bare `mlx` so macOS gets the Metal build. | |
| python -m pip install -e ".[test]" "mlx[cpu]" | |
| - name: Run tests | |
| # mlx-cpu JIT-compiles fused CPU kernels with the system g++, which fails on | |
| # ubuntu's toolchain (redeclaration of _Float128). Disabling the JIT fusion | |
| # routes ops through the interpreted CPU path — same results, just unfused. | |
| env: | |
| MLX_DISABLE_COMPILE: "1" | |
| run: python -m pytest -q |