File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 DEVELOPER_DIR : /Applications/Xcode-latest.app
2222 MACOSX_DEPLOYMENT_TARGET : ${{ inputs.macos-target }}
2323 run : |
24- pip install build
24+ uv pip install build
2525 python setup.py clean --all
2626 MLX_BUILD_STAGE=1 python -m build -w
2727
Original file line number Diff line number Diff line change @@ -4,20 +4,18 @@ 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"
1111 shell : bash -l {0}
1212 run : |
13- pip install --upgrade pip
14- pip install cmake setuptools typing_extensions
15- pip install -e ".[dev]" -v
13+ uv pip install -e ".[dev]" -v
1614
1715 - name : Install tests dependencies
1816 shell : bash -l {0}
1917 run : |
20- pip install tensorflow
18+ uv pip install tensorflow
2119
2220 - name : Run Python tests
2321 shell : bash -l {0}
3432 shell : bash -l {0}
3533 run : |
3634 cd examples/extensions
37- pip install -r requirements.txt
35+ uv pip install -r requirements.txt
3836 python setup.py build_ext --inplace
3937 python test.py
4038
7876 METAL_DEBUG_ERROR_MODE : 0
7977 run : |
8078 CMAKE_ARGS="-DMLX_METAL_JIT=ON" \
81- pip install -e . -v
79+ uv pip install -e . -v
8280 python -m unittest discover -v python/tests
Original file line number Diff line number Diff line change @@ -13,12 +13,21 @@ runs:
1313 - name : Install Homebrew packages
1414 shell : sh
1515 run : /opt/homebrew/bin/brew install openmpi
16-
16+
1717 - name : Verify MetalToolchain installed
1818 shell : bash
1919 run : xcodebuild -showComponent MetalToolchain
2020
21- - uses : conda-incubator/setup-miniconda@v3
22- with :
23- miniconda-version : " latest"
24- python-version : ${{ inputs.python-version }}
21+ - uses : astral-sh/setup-uv@v7
22+
23+ - name : Setup Python venv
24+ shell : cmd
25+ run : |
26+ echo "::group::Setup Python venv"
27+ export PATH="$HOME/.local/bin:$PATH"
28+ uv venv --python ${{ inputs.python-version }}
29+ source .venv/bin/activate
30+ echo PATH=$PATH >> $GITHUB_ENV
31+ # Search python packages in .venv
32+ echo PYTHONPATH=`python -c 'import sys; print(sys.path[-1])'` >> $GITHUB_ENV
33+ echo "::endgroup::"
You can’t perform that action at this time.
0 commit comments