From 07de3da0b94d9d306a9ef6ecf3fa85d25907f6ff Mon Sep 17 00:00:00 2001 From: Angelos Katharopoulos Date: Thu, 8 Jan 2026 14:01:53 -0800 Subject: [PATCH] Use uv --- .github/actions/build-macos/action.yml | 4 +--- .github/actions/setup-macos/action.yml | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/actions/build-macos/action.yml b/.github/actions/build-macos/action.yml index 067fb8d5..26dada92 100644 --- a/.github/actions/build-macos/action.yml +++ b/.github/actions/build-macos/action.yml @@ -4,14 +4,12 @@ description: 'Build and test MLX on macOS' runs: using: "composite" steps: - - name: Install dependencies + - name: Build env: DEBUG: 1 CMAKE_ARGS: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON" shell: bash -l {0} run: | - pip install --upgrade pip - pip install cmake setuptools typing_extensions pip install -e . -v - name: Install tests dependencies diff --git a/.github/actions/setup-macos/action.yml b/.github/actions/setup-macos/action.yml index 1e3e05d5..7ccc8b7e 100644 --- a/.github/actions/setup-macos/action.yml +++ b/.github/actions/setup-macos/action.yml @@ -18,6 +18,18 @@ runs: shell: bash run: xcodebuild -showComponent MetalToolchain - - uses: actions/setup-python@v6 - with: - python-version: ${{ inputs.python-version }} + - name: Install Python + shell: sh + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + $HOME/.local/bin/uv venv --python ${{ inputs.python-version }} + source .venv/bin/activate + echo PATH=$PATH >> $GITHUB_ENV + # Search python packages in .venv + echo PYTHONPATH=`python -c 'import sys; print(sys.path[-1])'` >> $GITHUB_ENV + + - name: Install build dependencies + shell: sh + run: | + pip install --upgrade pip + pip install cmake setuptools typing_extensions