Fix header formatting in README.md #320
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: macOS Compatibility Tests | |
| on: | |
| push: | |
| branches: [ main, develop, copilot/** ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-macos: | |
| name: Test on macOS | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Display Python version | |
| run: python --version | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements_ace_macos.txt | |
| - name: Install audio-separator (no deps) | |
| run: | | |
| pip install "audio-separator==0.40.0" --no-deps | |
| - name: Install py3langid (no deps) | |
| run: | | |
| pip install "py3langid==0.3.0" --no-deps | |
| - name: Install ACE-Step (no deps) | |
| run: | | |
| pip install "git+https://github.com/ace-step/ACE-Step.git" --no-deps | |
| - name: Verify PyTorch MPS support | |
| run: | | |
| python -c "import torch; print(f'PyTorch version: {torch.__version__}'); print(f'MPS available: {torch.backends.mps.is_available()}'); print(f'MPS built: {torch.backends.mps.is_built()}')" | |
| - name: Test imports | |
| run: | | |
| python -c "import torch" | |
| python -c "import diffusers" | |
| python -c "import transformers" | |
| python -c "import flask" | |
| python -c "import torchaudio" | |
| python -c "import tqdm" | |
| python -c "import waitress" | |
| - name: Syntax check Python files | |
| run: | | |
| python -m py_compile music_forge_ui.py | |
| python -m py_compile cdmf_pipeline_ace_step.py | |
| python -m py_compile cdmf_trainer.py | |
| python -m py_compile generate_ace.py | |
| - name: Test module imports (detect missing dependencies) | |
| run: | | |
| # This will fail if any critical dependencies are missing at import time | |
| python -c " | |
| import sys | |
| import importlib.util | |
| # Test that music_forge_ui can be imported (catches missing deps early) | |
| spec = importlib.util.spec_from_file_location('music_forge_ui', 'music_forge_ui.py') | |
| if spec and spec.loader: | |
| module = importlib.util.module_from_spec(spec) | |
| sys.modules['music_forge_ui'] = module | |
| try: | |
| spec.loader.exec_module(module) | |
| print('✓ music_forge_ui module imports successfully') | |
| except ModuleNotFoundError as e: | |
| print(f'✗ Missing dependency: {e}') | |
| raise | |
| " | |
| - name: Test device selection logic | |
| run: | | |
| python -c " | |
| import torch | |
| import os | |
| # Test device selection | |
| device = ( | |
| torch.device('cuda:0') | |
| if torch.cuda.is_available() | |
| else torch.device('cpu') | |
| ) | |
| if device.type == 'cpu' and torch.backends.mps.is_available(): | |
| device = torch.device('mps') | |
| print(f'Selected device: {device}') | |
| print(f'Device type: {device.type}') | |
| # Verify expected device on macOS | |
| if torch.backends.mps.is_available(): | |
| assert device.type == 'mps', f'Expected MPS device, got {device.type}' | |
| print('✓ MPS device correctly selected') | |
| else: | |
| assert device.type == 'cpu', f'Expected CPU device, got {device.type}' | |
| print('✓ CPU device correctly selected (MPS not available)') | |
| " |