bazel-contrib / SIG-rules-authors

Governance and admin for the rules authors Special Interest Group
https://bazel-contrib.github.io/SIG-rules-authors/
Apache License 2.0
28 stars 12 forks source link

Host musl-toolchain #84

Closed illicitonion closed 9 months ago

illicitonion commented 10 months ago

As discussed in previous meetings, we have scripted the creation of a cc_toolchain which uses musl to produce statically-linked binaries, and which can be built cross-platform (e.g. Linux binaries can be built from macOS).

From the criteria:

  1. Must use an open-source license, preferably Apache-2.0.

Happy to Apache-2.0.

  1. Must have wide applicability in the community.

Yes - this applies to anyone who wants a C++ toolchain with Bazel, similar to https://github.com/aspect-build/gcc-toolchain.

  1. Must have a clear point of contact who answers questions from the SIG.

Yes - @illicitonion

  1. Must be “production quality”:

Yes - my company has been using this and releasing binaries to production based on it for several years. There's no reason this wouldn't reasonably apply to any other user too.

  1. Clear README or other documentation outlining the goal of these rules, how to use them etc.
    • generated API documentation
    • include examples of use
    • tests that are running continuously

Yes - We have CI that verifies binaries built on each of {linux x86-64, macOS x86-64, macOS arm64} successfully run on a linux x86-64 worker, and a README explaining how to use. We don't have API documentation similar to https://github.com/aspect-build/gcc-toolchain the API is just: register the toolchain.

  1. Must reply to issues/PRs in 2-3 weeks (exact service level agreement TBD)

Yes.

  1. Must have more than one person who is committed to review/approve PRs

@illicitonion and @gibfahn have signed up as initial maintainers, my company can provide more if needed.

  1. Must publish semver releases.

Sure.

  1. Must work with LTS Bazel version

CI currently tests 6.3.2. Happy to target future LTSes as they're released.

illicitonion commented 10 months ago

Initial code-drop: https://github.com/bazel-contrib/musl-toolchain/pull/1

illicitonion commented 10 months ago

Screenshot of what the generated GitHub actions end up like:

Screenshot 2023-10-24 at 13 37 13

Screenshot of what a generated release looks like:

Screenshot 2023-10-24 at 13 37 38

Something worth calling out: The ARM macOS build requires billing to be enabled for the org, and the "build musl" actions are sloooow, so the other platforms will reasonably quickly churn through the free actions quota.

cgrindel commented 9 months ago

Approved at the Bazel Rules SIG meeting on 2023-10-31 without the arm MacOS CI runners.

cgrindel commented 9 months ago

@illicitonion When the CI MacOS arm stuff is disabled, let us know and we can get someone to approve the PR.

illicitonion commented 9 months ago

I just pushed https://github.com/bazel-contrib/musl-toolchain/pull/1/commits/af7cfa292cb4392861f3a60218d30ebfbd26dfd4 removing the macOS ARM support :) Thanks @cgrindel!

alexeagle commented 9 months ago

Is there more to do on this issue, or can it be closed?