codecov / codecov-cli

Codecov's Command Line Interface. Used for uploading to Codecov in your CI, Test Labelling, Local Upload, and more
Apache License 2.0
54 stars 38 forks source link

Provide prebuilt binaries for FreeBSD #438

Open ararslan opened 4 months ago

ararslan commented 4 months ago

This issue is basically https://github.com/codecov/uploader/issues/849 for the modern era. 😄 The move from the Node.js-based uploader to the Python-based CLI means that coverage can now be submitted from FreeBSD, e.g. on Cirrus CI and Travis, which is awesome! However, since prebuilt binaries are not available for FreeBSD like they are for other platforms, FreeBSD CI builds need to install from PyPI via pip. That in itself is not a problem—however, there is no Python wheel platform tag for FreeBSD, so installation requires a full source build of the package and all of its dependencies. This takes about 7 minutes of CI time on Cirrus for every run. In contrast, downloading and using the official prebuilt binaries from https://cli.codecov.io takes just a few seconds. It would be great to be able to avoid using all of that extra compute time.

Just as some of the binaries here are built using QEMU on GitHub Actions, FreeBSD binaries could be built using https://github.com/vmactions/freebsd-vm. (Alternatively, binaries for AArch64 Linux, both glibc and musl, could be built natively on Cirrus, which also natively supports FreeBSD, but I imagine y'all don't want to maintain a separate CI setup alongside GitHub Actions.)

Admittedly I don't know much about Python packaging but I'm more than happy to help however I can! cc also @lwhsu, who also offered to support for the previous issue.

thomasrockhu-codecov commented 4 months ago

@trent-codecov, would love your input here on whether or not we can support this asset

ararslan commented 4 months ago

Thanks, @thomasrockhu-codecov! @trent-codecov, let me know if there's any information I can provide that would be useful. #440 shows how the asset can be built (and tested, though that isn't implemented in that PR) on CI.

ararslan commented 4 months ago

Any thoughts here, @trent-codecov?

ararslan commented 1 month ago

🦗 🦗 🦗

rohan-at-sentry commented 1 month ago

@ararslan apologies for the radio silence here. I'll circle the wagons internally here to see what we can do with this

ararslan commented 1 month ago

Thanks @rohan-at-sentry! Let me know if there's anything I can do to help or support. See also #440, which builds the release asset.

trent-codecov commented 2 weeks ago

@thomasrockhu-codecov this looks like a good contribution. We can add this to the CLI release site easy enough. Have you tested this in any capacity? I don't have enough expertise here to ensure correctness.

ararslan commented 2 weeks ago

The local build on Cirrus CI that I described in the top-level post is the same as what's implemented in #440, and it works as expected running on Cirrus. You can also add FreeBSD to your CI testing matrix using https://github.com/vmactions/freebsd-vm, just like what's used for building the release asset in #440. The downside of doing so would be the added overhead of the VM operations (setup, teardown, copying things back and forth, etc.) plus the lack of FreeBSD-specific Python wheels that leads to additional compilation.