bupstash icon indicating copy to clipboard operation
bupstash copied to clipboard

Added x86_64-unknown-linux-musl builds on release

Open runfalk opened this issue 3 years ago • 13 comments

I added a basic CI job to make x86_64-unknown-linux-musl builds.

It's based on ripgrep's CI (https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml). I've marked it as a draft since it doesn't trigger on releases yet and doesn't upload the artifact to the correct location. I mostly want to gather feedback on the approach for now.

This partially solves #175 and #152.

runfalk avatar Jun 08 '21 19:06 runfalk

nice, why do we need to build our own libsodium btw? Oh, Its on ubuntu, I understand now.

andrewchambers avatar Jun 08 '21 23:06 andrewchambers

Technically libsodium already exists inside the container, but since we're making a statically linked binary we need the archive file (that I think doesn't exist) and we need that archive file to be built with musl as well.

If you're happy with the methodology I'll add the bits that makes trigger on releases rather than push. I think it can be extended later on to include other architectures.

runfalk avatar Jun 09 '21 08:06 runfalk

I'm happy, its better than what there is currently by far haha. The only thing i wonder about is running the CLI test on the release binaries.

andrewchambers avatar Jun 09 '21 23:06 andrewchambers

I'll see what I can do, but it'll probably involve duplicating parts of the existing CI.

runfalk avatar Jun 10 '21 09:06 runfalk

Don't worry too much about that btw, it's not a blocker.

andrewchambers avatar Jun 14 '21 12:06 andrewchambers

Just checking in to say this is something I am still thinking about, it is definitely not forgotten.

andrewchambers avatar Jul 27 '21 07:07 andrewchambers

Things are on my end, though I appreciate that you got back here :smile:. I'll mark it as ready when I've added the trigger on release thing.

runfalk avatar Jul 27 '21 18:07 runfalk

So, it has been a while. I've finally gotten around to fix it up.

  • It should run for any tag that matches v*.*.* (which all current versions seems to do).
  • Binaries are automatically added to the tag.
  • It builds musl binaries for x64_64 and aarch64 (adding more should be simple)
  • Binaries are named after the version and architecture. I'm a bit torn on this one since you can't just point it at the latest release and download it then (https://github.com/bupstash/bupstash/releases/latest/download/bupstash-v1.2.3-linux-aarch64) but I kept it that way since that what current releases seems to do (though they are zipped).

On an unrelated note it seems like CI is broken on master due to a clippy update?

runfalk avatar Jan 02 '22 16:01 runfalk

I'm currently on holiday so won't be able to merge anything for a few days.

The clippy lints breaking things is entirely out of our control so isn't the best - but it is useful to know about it when it happens.

andrewchambers avatar Jan 04 '22 00:01 andrewchambers

No rush! I've let it marinate for 6 months so what's a few more days :laughing:

runfalk avatar Jan 04 '22 20:01 runfalk

Just rebased it on top of latest master so the CI issue is fixed.

EDIT: macOS is broken (but not because of this PR)

runfalk avatar Jan 27 '22 11:01 runfalk

It's unfortunate but we keep hitting the time limits haha.

andrewchambers avatar Mar 16 '22 02:03 andrewchambers

@runfalk I am looking at doing a 1.0 release soon so merging this is now a high priority, I will take a look and hopefully add more platforms.

andrewchambers avatar Mar 16 '22 02:03 andrewchambers

This can be easily achieved using the setup-alpine action, see example.

jirutka avatar Apr 14 '23 20:04 jirutka