So I am about to do a deep dive on GitHub Actions market place for this but TL;DR: I want to share a repo of mine with a group of people and do releases and have GitHub Actions produce binaries for:
aarch64 Mac
x86_64 Mac
aarch64 Linux
x86_64 Linux
...and link them on the releases page.
Does anyone have a complete YAML file handy? I'll find my way through eventually but hey, why not ask for a shortcut if somebody is willing to link to it.
(Everything else failing, I can also produce a Docker Compose recipe that spins up 4 containers that build the binaries, and then upload those to the GitHub releases page (not sure if that's possible but will check) and stop there.)
I'm just starting researching something similar - my requirements are a bit soft but essentially: run tests, build binaries, & create a github release. I think it would ideally use Cross as that gives it a chance of being easy to keep up to date. Would quite like to also generate release notes (ideally from issues closed since last release).
A quick search here was my first action so I mean "just starting" very literally. I don't have anything to contribute yet. But if you find much out there that's already useful, I'd be grateful if you could report back here.
I tried to tackle local cross-compilation and mostly succeeded but couldn't manage to produce x86_64 Linux binaries (musl, so statically linked) no matter what I tried. I know about trust and cross but figured my first priority should be to have the Actions in place that create a new release and produce cross-compiled binaries, and not try and emulate part of that on my machine. For now at least.
I notice the build script therein has an option to minify binaries, which uses strip and upx. I don't think I want to trust anything messing with the compiler outputs (at least not without a really serious need), but just out of interest, does anyone know what the implications of these tools might be for Rust binaries?
I've used strip and upx just fine, zero issues. Also cargo will do strip for you if you configure it so so you don't even need to call it manually.
For local development I often use GitHub - casey/just: 🤖 Just a command runner with a few handy small recipes like e.g. invoke clippy or package up a final release binary (with upx compressing it at the end) when I want to do some performance testing. Pretty cool and easy stuff.
Not like the half-arsed "programming language" shoved in YAML that we have to learn in order to do basic activities in GitHub. sighs
Yes from just an initial couple of hours with gh actions yesterday, I'm already in despair and will never complain about Rust build times again. The push-trigger-browse cycle is to edit-compile-run as the latter is to a decent REPL. I was hopeful when I came across GitHub - nektos/act: Run your GitHub Actions locally 🚀, but found the docker images to be missing too much compared to the live github runners to be useful for my purposes.