feat: logging overhaul, tokenhub, Python SDK, docs update #14
Workflow file for this run
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: Build and Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| env: | |
| MLX_SWIFT_REF: "main" | |
| MLX_SWIFT_LM_REF: "main" | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.config.name }}) | |
| runs-on: ${{ matrix.config.runner }} | |
| strategy: | |
| matrix: | |
| config: | |
| - name: "Apple Silicon" | |
| runner: macos-15 | |
| suffix: "arm64" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Clone vendor dependencies | |
| run: | | |
| # mlx-swift — Apple's MLX Swift bindings (has mlx C++ submodule) | |
| git clone --depth 1 --branch "${MLX_SWIFT_REF}" --recurse-submodules --shallow-submodules \ | |
| https://github.com/ml-explore/mlx-swift.git vendors/mlx-swift | |
| # mlx-swift-lm — LM/VLM layer on top of mlx-swift | |
| git clone --depth 1 --branch "${MLX_SWIFT_LM_REF}" \ | |
| https://github.com/ml-explore/mlx-swift-lm.git mlx-swift-lm | |
| - name: Patch upstream StrictConcurrency issues | |
| run: | | |
| # mlx-swift-lm MediaProcessing.swift: CIContext is non-Sendable | |
| sed -i '' 's/^private let context = CIContext()/private nonisolated(unsafe) let context = CIContext()/' \ | |
| mlx-swift-lm/Libraries/MLXVLM/MediaProcessing.swift | |
| - name: Build | |
| run: | | |
| chmod +x build.sh | |
| ./build.sh -c release | |
| - name: Run tests | |
| run: swift test | |
| continue-on-error: true | |
| - name: Package | |
| run: | | |
| chmod +x Scripts/package.sh | |
| ./Scripts/package.sh "${GITHUB_REF_NAME#v}" | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: NovaMLX-${{ matrix.config.suffix }} | |
| path: dist/ | |
| release: | |
| name: Create GitHub Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: macos-15 | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/NovaMLX-*.tar.gz | |
| dist/NovaMLX-*.dmg | |
| generate_release_notes: true |