nextest-rs / nextest

A next-generation test runner for Rust.
https://nexte.st
Apache License 2.0
2.11k stars 92 forks source link

Add support for OpenBSD #1176

Open lcheylus opened 8 months ago

lcheylus commented 8 months ago

For a Rust project, I need to add a GitHub workflow for tests on OpenBSD OS (using this GH action vmactions/openbsd-vm).

In this workflow, I'm using nextest to run tests via cargo nextest.

Currently, nextest build fails on OpenBSD because of an error with waitid C function not included in libc crate (included in shared_child crate) => see my PR https://github.com/rust-lang/libc/pull/3490 to fix this issue.

With this patch, build on OpenBSD is OK. I created an initial OpenBSD port for nextest v0.9.66 , see https://github.com/jasperla/openbsd-wip/tree/master/devel/cargo-nextest

I would like to have a specific nextest release for OpenBSD official version to download directly the resulting binary => https://get.nexte.st/latest/openbsd

That would be the simplest solution to download/install nextest in my GH workflow for OpenBSD.

sunshowers commented 8 months ago

Sure, happy to do an OpenBSD release. But it would seem like we'd need to wait for a libc release with your patch -- is that correct?

lcheylus commented 8 months ago

But it would seem like we'd need to wait for a libc release with your patch -- is that correct?

Yes, my PR to add waitid function in libc crate is merged => needs a new release to build nextest on OpenBSD

lcheylus commented 8 months ago

Update for this request

In the future OpenBSD stable version (7.5, scheduled for April/May 2024), cargo-nextest will be available in ports and could be installed as package.

As a temporary solution, I created a GitHub workflow to build cargo-nextest binary for OpenBSD-stable (current version = 7.4) and publish it as a release sync with nextest release.

See me repository https://github.com/lcheylus/cargo-nextest-openbsd

build.sh: shell script to build cargo-nextest on OpenBSD

"Build and publish" GH workflow :

Build and GH workflow are OK. I publish with it a release for OpenBSD of cargo-nextest version 0.9.66 (latest release) => https://github.com/lcheylus/cargo-nextest-openbsd/releases/tag/0.9.66