@@ -4,61 +4,72 @@ description: 'Build and test MLX on macOS'
44runs :
55 using : " composite"
66 steps :
7- - name : Install dependencies
7+ - name : Install Python package
88 env :
99 DEBUG : 1
1010 CMAKE_ARGS : " -DCMAKE_COMPILE_WARNING_AS_ERROR=ON"
11- shell : bash -l {0}
11+ shell : bash
1212 run : |
13- pip install --upgrade pip
14- pip install cmake setuptools typing_extensions
15- pip install -e ".[dev]" -v
13+ echo "::group::Install Python package"
14+ uv pip install -e ".[dev]" -v
15+ echo "::endgroup::"
1616
1717 - name : Install tests dependencies
18- shell : bash -l {0}
18+ shell : bash
1919 run : |
20- pip install tensorflow
20+ echo "::group::Install tests dependencies"
21+ uv pip install tensorflow
22+ echo "::endgroup::"
2123
2224 - name : Run Python tests
23- shell : bash -l {0}
25+ shell : bash
2426 env :
2527 LOW_MEMORY : 1
2628 run : |
29+ echo "::group::Run Python tests"
2730 DEVICE=cpu python -m unittest discover -v python/tests
2831 DEVICE=gpu METAL_DEVICE_WRAPPER_TYPE=1 METAL_DEBUG_ERROR_MODE=0 python -m unittest discover -v python/tests
2932 mpirun --bind-to none -host localhost:8 -np 8 -x DYLD_LIBRARY_PATH=/opt/homebrew/lib/ python python/tests/mpi_test_distributed.py
3033 mlx.launch --verbose -n 8 python/tests/ring_test_distributed.py -v 2> >(tee -a stderr.log >&2)
3134 if $(grep "\[WARN\]" stderr.log); then echo "Distributed ring test failed"; exit 1; fi
32-
35+ echo "::endgroup::"
36+
3337 - name : Build example extension
34- shell : bash -l {0}
38+ shell : bash
3539 run : |
40+ echo "::group::Build example extension"
3641 cd examples/extensions
37- pip install -r requirements.txt
38- python setup.py build_ext --inplace
39- python test.py
40-
42+ uv pip install -r requirements.txt
43+ uv run --no-project setup.py build_ext --inplace
44+ uv run --no-project test.py
45+ echo "::endgroup::"
46+
4147 - name : Build CPP only
42- shell : bash -l {0}
48+ shell : bash
4349 run : |
50+ echo "::group::Build CPP only"
4451 mkdir -p build
4552 cd build
4653 cmake ..
4754 make -j $(sysctl -n hw.ncpu)
55+ echo "::endgroup::"
4856
4957 - name : Run CPP tests
50- shell : bash -l {0}
58+ shell : bash
5159 env :
5260 DEVICE : gpu
5361 METAL_DEVICE_WRAPPER_TYPE : 1
5462 METAL_DEBUG_ERROR_MODE : 0
5563 run : |
64+ echo "::group::Run CPP tests"
5665 ./build/tests/tests
5766 ./build/tests/test_teardown
67+ echo "::endgroup::"
5868
5969 - name : Build small binary with JIT
60- shell : bash -l {0}
70+ shell : bash
6171 run : |
72+ echo "::group::Build small binary with JIT"
6273 mkdir -p build
6374 cd build
6475 cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel \
@@ -68,15 +79,18 @@ runs:
6879 -DMLX_BUILD_GGUF=OFF \
6980 -DMLX_METAL_JIT=ON
7081 make -j $(sysctl -n hw.ncpu)
71-
82+ echo "::endgroup::"
83+
7284 - name : Run Python tests with JIT
73- shell : bash -l {0}
85+ shell : bash
7486 env :
7587 LOW_MEMORY : 1
7688 DEVICE : gpu
7789 METAL_DEVICE_WRAPPER_TYPE : 1
7890 METAL_DEBUG_ERROR_MODE : 0
7991 run : |
92+ echo "::group::Run Python tests with JIT"
8093 CMAKE_ARGS="-DMLX_METAL_JIT=ON" \
81- pip install -e . -v
94+ uv pip install -e . -v
8295 python -m unittest discover -v python/tests
96+ echo "::endgroup::"
0 commit comments