fix release builds (#2746)

This commit is contained in:
Awni Hannun
2025-11-11 07:44:30 -08:00
committed by GitHub
parent eba6a9d163
commit 60d80a3728
9 changed files with 84 additions and 114 deletions

View File

@@ -1,20 +1,6 @@
name: 'Build and Test on macOS'
description: 'Build and test MLX on macOS'
inputs:
build-type:
description: 'Build type (debug, release)'
required: false
default: 'debug'
type: choice
options:
- debug
- release
run-tests:
description: 'Whether to run tests'
required: false
default: 'true'
runs:
using: "composite"
steps:
@@ -22,7 +8,7 @@ runs:
shell: sh
env:
DEBUG: 1
DEV_RELEASE: 1
CMAKE_ARGS: "-DCMAKE_COMPILE_WARNING_AS_ERROR=ON"
run: |
uv pip install --upgrade pip
uv pip install cmake setuptools nanobind==2.4.0
@@ -35,13 +21,11 @@ runs:
uv run --no-project setup.py generate_stubs
- name: Install tests dependencies
if: inputs.run-tests == 'true'
shell: sh
run: |
uv pip install numpy torch tensorflow unittest-xml-reporting
- name: Run Python tests
if: inputs.run-tests == 'true'
shell: bash
env:
LOW_MEMORY: 1
@@ -53,7 +37,6 @@ runs:
if $(grep "\[WARN\]" stderr.log); then echo "Distributed ring test failed"; exit 1; fi
- name: Build example extension
if: inputs.run-tests == 'true'
shell: bash
run: |
cd examples/extensions
@@ -62,7 +45,6 @@ runs:
uv run --no-project test.py
- name: Build CPP only
if: inputs.run-tests == 'true'
shell: bash
run: |
mkdir -p build
@@ -71,7 +53,6 @@ runs:
make -j $(sysctl -n hw.ncpu)
- name: Run CPP tests
if: inputs.run-tests == 'true'
shell: bash
env:
DEVICE: gpu
@@ -80,7 +61,6 @@ runs:
run: ./build/tests/tests
- name: Build small binary with JIT
if: inputs.run-tests == 'true'
shell: bash
run: |
mkdir -p build
@@ -94,7 +74,6 @@ runs:
make -j $(sysctl -n hw.ncpu)
- name: Run Python tests with JIT
if: inputs.run-tests == 'true'
shell: bash
env:
LOW_MEMORY: 1
@@ -107,14 +86,3 @@ runs:
uv run -m xmlrunner discover \
-v python/tests \
-o test-results/gpu_jit
- name: Build macOS 14 package
if: inputs.build-type == 'release'
uses: ./.github/actions/build-macos-release
with:
macos-target: 14.0
- name: Build macOS 15 package
if: inputs.build-type == 'release'
uses: ./.github/actions/build-macos-release
with:
macos-target: 15.0