Add release workflow that builds and attaches XCFramework assets#351
Add release workflow that builds and attaches XCFramework assets#351davidkoski merged 1 commit intoml-explore:mainfrom
Conversation
| - name: Upload XCFrameworks to release | ||
| if: github.event.release.tag_name || inputs.tag | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Hopefully this part works -- the repo doesn't have such a secret but maybe this is automatic? I am not sure how to test the run of the action until it is merged. No worries, this is new so can't break anything existing :-)
There was a problem hiding this comment.
So it goes with GitHub Actions #yolo 🥲
There was a problem hiding this comment.
Thrilled to see that the first run succeeded in building the framework! Looks like it stopped just shy of attaching it to a release. Excited to see what happens when it triggers on the next release.
There was a problem hiding this comment.
Yeah, I did the dry run variant -- otherwise it looked like it would build main and attach to the current release (which is a few commits back). Hopefully today.
davidkoski
left a comment
There was a problem hiding this comment.
Looks great, thank you!
Based on this I think the next steps will be to set up the .xcodeproj in mlx-swift-lm (likely people will want to consume that) and figure out how to get something similar in place there.
|
OK, here we go for real: https://github.com/ml-explore/mlx-swift/actions/runs/21877309682 |
🤨 Edit: Oh, it's a self-hosted runner! That explains it. @davidkoski Can you please |
Proposed changes
This PR adds a GitHub Actions workflow to automatically build and attach XCFramework artifacts to releases.
This enables API consumers to download prebuilt binaries directly from GitHub releases, significantly reducing build times (as noted in mattt/AnyLanguageModel#9, MLX-related builds can take 75% of total build time).
The workflow:
tools/create-xcframework.shscript (added by add xcodeproj as a build method #289)Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes