feat: add version flag and release packaging workflow#4
Merged
Conversation
Add a `version: "0.1.0"` to CommandConfiguration so `mlx-server --version` reports a version, and a release workflow that cuts a GitHub release on every v* tag. The release artifact is the xcodebuild Release product: the executable plus its colocated resource bundles (mlx-swift_Cmlx.bundle carries the Metal default.metallib). A lone binary fails at runtime with "Failed to load the default metallib", so the tarball keeps the bundles next to the executable. This is the artifact a Homebrew formula installs. Signed-off-by: Christopher Maher <chris@mahercode.io>
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.
What
version: "0.1.0"toCommandConfiguration, somlx-server --versionreports a version..github/workflows/release.yml, a release workflow triggered onv*tags.Why
mlx-server has no GitHub releases and no install path beyond building from source with
xcodebuild. This is the first half of giving it a real distribution story: a tagged release produces a downloadable artifact that a Homebrew formula can install.The artifact is not a single binary. The runnable product is the
xcodebuildRelease output: themlx-serverexecutable plus its colocated resource bundles (mlx-swift_Cmlx.bundlecarries the Metaldefault.metallib). A lone binary fails at runtime withFailed to load the default metallib, so the release tarball keeps the bundles next to the executable.How
On a
v*tag push the workflow:xcodebuild -configuration Release -skipMacroValidation(compiles the Metal shaders and copies the resource bundles).mlx-serverplus every*.bundleintomlx-server-<version>-macos-arm64.tar.gz..sha256companion.The version string in
CommandConfigurationis the assertion target for the upcoming Homebrew formula'stestblock.Notes:
macos-15runner; the SwiftPM and Xcode caches speed up later runs.xcodebuild's ad-hoc signature. That is sufficient for a Homebrew formula (formula downloads are not quarantined). Developer ID signing and notarization are a later item.A follow-up adds the
mlx-serverformula todefilantech/homebrew-tap, using the release tarball this workflow produces.