emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

Use GitHub Actions for CI #126

Closed vbrandl closed 2 years ago

vbrandl commented 3 years ago

Since Docker Hub limited the free CI hours, this image could not be built and published anymore.

This PR tries to use GitHub Actions to build and publish the image.

Building itself works, but I commented the actual push and the login to Docker Hub for my tests. In general it seems to work. Maybe this helps making newer versions of the image available again.

Closes https://github.com/emk/rust-musl-builder/issues/123 https://github.com/emk/rust-musl-builder/issues/122 and https://github.com/emk/rust-musl-builder/issues/121

JMLX42 commented 3 years ago

@vbrandl Great! IMHO the debug commits should be squashed to keep the history clean.

dkowis commented 3 years ago

+1 for this, poking to bubble it up again.

vbrandl commented 2 years ago

Any news on this? Would you be OK with building the image using GitHub Actions and publishing to Docker Hub?

emk commented 2 years ago

Thank you for the suggestion, and my apologies for the slow response!

There are a few things going on right now:

So I'm definitely interesting in building and test using GitHub CI actions, and I need to look at this PR. My apologies for not getting to this sooner.

I would also be willing to spin this image out into its own GitHub project, and look into promoting active contributors into maintainers.

WesleyAC commented 2 years ago

@emk Do you know how much using the current infrastructure would cost? If it's not too much, I might be willing to pay for it for a while, since not having these images is blocking some work I'd like to do.

vbrandl commented 2 years ago

How much work did you put into this, after you set everything up? I think it's mostly a versionbump every 6 weeks? I might be interested in helping you maintain the repo.

emk commented 2 years ago

@WesleyAC Thank you for the offer! That's a great idea. We probably only need the Pro plan at $5/month.

It wasn't so much the money as the principle: I was already paying out of pocket to keep a bunch of community projects and forums running, and they ranged from $5–60 each. Together, it adds up! And I've been cutting back, and Docker's decision to charge open source maintainers ran straight into my revised budget. It's the usual one person in Nebraska issue on a smaller scale.

If you're interested, I could look into setting up GitHub Sponsors. This would make it easier for other people to chip in $5/month to keep this and other projects running. Let me get back to you on that, and thank you for the offer!

@vbrandl Maintenance was largely simple. Every six weeks I would:

  1. Bump the versions of stable and unstable Rust according to the policy here. The only tricky part was figuring out which unstable Rust to trust.
  2. Check for updates or security fixes to any of the C libraries and tools included in the image, and edit the Dockerfile accordingly.

It's pretty easy. If we move to GitHub, I'll have to adapt this to use a build matrix, so I can just edit a few lines and recommit.

emk commented 2 years ago

I have a fix in progress at #133. Please move any further discussion there. Thank you!

emk commented 2 years ago

OK, I have moved everything to GitHub! And I've set up weekly builds of stable and beta every Thursday. This should be timed in such a way as to pick up most new stable releases later the same day.

Many thanks to everyone provided advice or sample PRs!

adzialocha commented 2 years ago

Fantastic! Thank you @emk !

emk commented 2 years ago

And the first automatic weekly build of stable and beta worked perfectly, as scheduled!

So this should mostly stay up to date, at least on a basic level, without too much ongoing attention.

Feel free to submit an issue if you need a specific tagged release. I can't promise I'll get to them quickly, but it will at least remind me to check in on the weekly builds.

I first built this image for Rust 1.11 5 years ago, and I've been manually making those 6 week releases almost the entire time, at least until Docker Hub broke them. So getting this even more automated feels good. :sparkles: