Add release automation and standalone weights preparation script#1
Closed
olilarkin wants to merge 2 commits into
Closed
Add release automation and standalone weights preparation script#1olilarkin wants to merge 2 commits into
olilarkin wants to merge 2 commits into
Conversation
The release workflow runs on macos-14 when a v* tag is pushed (or on manual workflow_dispatch, which produces a draft release for dry runs). It builds the multi-platform XCFramework via Scripts/build-xcframework.sh with MLXSWIFT_USE_REMOTE=1, builds StableAudioCLI in release config with a colocated mlx.metallib, and publishes both archives plus a standalone PEP 723 version of prepare_weights.py. Release notes cover the Gatekeeper quarantine workaround for the unsigned binary and the uv-based weights prep flow. A separate CI workflow on pull_request / push to main verifies that swift build and a macOS xcframework slice still succeed.
The olilarkin/mlx-swift fork declares swift-tools-version 5.12, which Xcode 15.4 (Swift 5.10) cannot parse. Pick the newest installed Xcode instead, and download the Metal toolchain on demand since Xcode 16.3+ ships it as a separate component.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds GitHub Actions workflows for CI/release automation and introduces a standalone Python script for weight preparation that can be distributed independently to users.
Key Changes
.github/workflows/ci.yml): Automated builds on pull requests and pushes to main, including XCFramework compilation smoke tests and Swift package builds.github/workflows/release.yml): Automated release pipeline triggered on version tags or manual dispatch that:Scripts/prepare_weights_standalone.py): A self-contained, single-file Python script with PEP 723 inline dependencies that:Scripts/prepare_weights.pyuv runwithout cloning the repositoryImplementation Details
The standalone script uses PEP 723 inline script metadata to declare dependencies (mlx, numpy, huggingface_hub, typer), allowing it to be executed as a self-contained release asset without requiring users to clone the repository or manage dependencies manually.
The release workflow builds artifacts for both the XCFramework (for iOS/macOS development) and a CLI binary (for command-line usage), with the weights preparation script included as a third asset to complete the user experience.
https://claude.ai/code/session_019vj6CEPh2oVt1aDUtR2XVh