Test macOS

This commit is contained in:
doctorpangloss 2025-07-16 15:48:22 -07:00
parent 8fcccad6a2
commit 3ee969f778
2 changed files with 34 additions and 1 deletions

View File

@ -46,3 +46,24 @@ jobs:
run: |
pylint --rcfile=.pylintrc comfy/
pylint --rcfile=.pylintrc comfy_extras/
build_and_execute_macos:
environment: "Testing"
name: Unit Tests for macOS
runs-on: macos-14
steps:
- uses: actions/checkout@v4
name: Checkout git repo
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install system dependencies
run: brew install ffmpeg
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install ComfyUI
run: uv pip install '.[mps,dev]' --inexact
- name: Run tests
run: |
export OTEL_METRICS_EXPORTER=none
pytest -v tests/unit

View File

@ -160,6 +160,11 @@ rocm = [
"pytorch-triton-rocm"
]
mps = [
"torch",
"torchvision",
]
attention = [
"sageattention",
"flash_attn ; sys_platform == 'Linux'",
@ -188,7 +193,7 @@ Repository = "https://github.com/comfyanonymous/ComfyUI"
[tool.uv]
conflicts = [
[{ extra = "cpu" }, { extra = "cu126" }, { extra = "cu128" }, { extra = "rocm" }],
[{ extra = "cpu" }, { extra = "cu126" }, { extra = "cu128" }, { extra = "rocm" }, { extra = "mps" }],
]
no-build-isolation-package = [
"sageattention",
@ -216,18 +221,25 @@ name = "pytorch-rocm"
url = "https://download.pytorch.org/whl/rocm6.3"
explicit = true
[[tool.uv.index]]
name = "pytorch-nightly-cpu"
url = "https://download.pytorch.org/whl/nightly/cpu"
explicit = true
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu126", extra = "cu126", marker = "sys_platform == 'Linux' or sys_platform == 'win32'" },
{ index = "pytorch-cu128", extra = "cu128", marker = "sys_platform == 'Linux' or sys_platform == 'win32'" },
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'Linux'" },
{ index = "pytorch-nightly-cpu", extra = "mps", marker = "sys_platform == 'darwin'" },
]
torchvision = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu126", extra = "cu126", marker = "sys_platform == 'Linux' or sys_platform == 'win32'" },
{ index = "pytorch-cu128", extra = "cu128", marker = "sys_platform == 'Linux' or sys_platform == 'win32'" },
{ index = "pytorch-rocm", extra = "rocm", marker = "sys_platform == 'Linux'" },
{ index = "pytorch-nightly-cpu", extra = "mps", marker = "sys_platform == 'darwin'" },
]
torchaudio = [
{ index = "pytorch-cpu", extra = "cpu" },