-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More CI builds #6
Comments
I got the first phase done I think, which builds windows, linux & mac amd64 targets. I still need to figure out some things to make cross-builds work, but this is a start.
Here is what's working:
I have a Mac M1, so I could build for mac arm64 and linux amd64/arm64 (using docker) manually and attach it to the release, but really I'd prefer to automate all the builds, so I will keep playing with it. If nothing else, I could probly cross-build in docker on github-actions or something. So next phase is maybe to create release for these or to get the cross-building stuff working. |
Ok, I have basic CI native build & release working Files look like this:
This is similar to what we do at node-raylib but I did some cross-building in docker there, which I think I can do here, once I get the other stuff building right. I tested the Mac x86_64 build on an M1, and it actually seems to run (via built-in x86-64 emulation) but I get this which I think means I need some other way (not
So, we get some automated releases (windows, mac amd64, linux amd64) and we might be close to mac arm64. Also, looks like we can bundle SDL2 on mac, like this. We could maybe also bind to framework and tell mac users to install that, but I am not sure how to automate installing the framework in CI. I wish there was a simpler way to get SDL2 on all these targets with only |
It would be handy to have a few Github action automatic release-builds for linux/arm (for use on pi and anbernic devices) and mac/win. It has so few system-deps (sdl2 is the only one one) it would make it very easy to install on just about everything (maybe just tell users to install SDL2.)
I'd be happy to PR for it. Generally, I set this up to happen on tag (I like semver, like
v*.*.*
) so to make a release you just tag & push. Alternately, non-tag/releases work too, if you set the "asset output" for the build, but it's a bit less convenient, since you have to dig through the builds to find the release.I don't have a great deal of experience with rust cross-building, but I have a few C-based projects that do this kid of thing, and can try to figure it out. It seems much simpler with rust.
What targets should I set it up for? I am thinking these would be most useful:
For mac, normally I would suggest a "universal build" since it has good built-in support for "fat binaries", but I will need to research how to do it, a bit. Using cmake with C, I can do this on github action with a few env-vars, but I think it is different in rust. I found this which might be helpful. Basically, it seems like you build the 2 binaries separately, then use
lipo
to merge them into a fat-binary. Maybe a first step could be the basic targets that can be built with justcargo
, then I can work on trying to get a universal binary.The text was updated successfully, but these errors were encountered: