rmohr / bazeldnf

Build multi-arch base containers based on RPM with bazel.
Apache License 2.0
30 stars 18 forks source link

Request: Pre-built binaries #40

Closed riptl closed 1 year ago

riptl commented 1 year ago

Feature Request

Please provide pre-built static binaries in GitHub releases (ideally built on tag with Bazel via a GitHub Actions pipeline).

Happy to work on the CI pipelines for this if the maintainer agrees with this approach.

Motivation

When using a non-Go Bazel project with bazeldnf, bazeldnf currently forces the project to import a Go toolchain in its WORKSPACE. This is ~300MB additional toolchain footprint. It'd be great to be able to opt-in to fetch static binaries instead (maybe for targets Linux x86_64-v2, Linux aarch64, Linux ppc64le)

Also, thank you for working on bazeldnf.

rmohr commented 1 year ago

Yes, I would love to have this! I think it is the right way to go, just did not find the time to work on this. Even for go bazel projects it is difficult to match go dependencies in the current way. That may become simpler with bazel packages, but having binaries would be the easiest.

riptl commented 1 year ago

@rmohr Great! I'll work on this on a fork and ping you when I have proof of a working Bazel+GHA build workflow on tag. Once that is done, we should probably adjust the WORKSPACE to alias exported targets to internal binary/from-source targets depending on what the user selects (should binary or from source be the default?)

rmohr commented 1 year ago

we should probably adjust the WORKSPACE to alias exported targets to internal binary/from-source targets depending on what the user selects (should binary or from source be the default?)

I think binaries make the integration so much easier that they should definitely be the default.

rmohr commented 1 year ago

Fixed in #51

rmohr commented 1 year ago

@terorie maybe you can give it a try?

rmohr commented 1 year ago

First release-candidate: https://github.com/rmohr/bazeldnf/releases/tag/v0.5.6-rc0

rmohr commented 1 year ago

Had to do a few more fixes. The new release candidate seems to work fine with kubevirt now.

https://github.com/rmohr/bazeldnf/releases/tag/v0.5.6-rc1

rmohr commented 1 year ago

Had to do a few more fixes. The new release candidate seems to work fine with kubevirt now.

https://github.com/rmohr/bazeldnf/releases/tag/v0.5.6-rc1

@malt3 in case you are also interested in the progress

malt3 commented 1 year ago

@malt3 in case you are also interested in the progress

Thanks for keeping me updated! Will give it a test tomorrow. If there are more things that need work feel free to give me a ping too.

EDIT: testing works on our code base as well!

rmohr commented 1 year ago

EDIT: testing works on our code base as well!

Awesome! Thanks. Closing then. Feel free to reopen if you see any issues.