Repository navigation
fix(*bsd): add missing source files for BSD OS - #14
Conversation
Problem: FreeBSD, NetBSD and OpenBSD were missing some source files which upstream adds on all BSDs. Solution: Add them to *bsd source lists, matching upstream CMakeLists.txt.
|
Should I also add CI jobs for BSD OS? Maybe FreeBSD and OpenBSD? |
|
If it's straightforward to set up BSD (using a VM, I guess?) in CI, that would be good in order to keep these targets from drifting. If you're willing to that, it would be a nice contribution. I'll leave this PR open for now so you can add that to it, but if you'd prefer to do it in a separate PR just let me know. |
a64b124 to
a78ea87
Compare
a78ea87 to
7f3fa69
Compare
| - os: freebsd | ||
| packages: pkg install -y curl | ||
| - os: openbsd | ||
| packages: pkg_add -I curl xz # OpenBSD tar cannot decompress .tar.xz |
There was a problem hiding this comment.
NOTE:
It turns out that tar in OpenBSD has no -J option and cannot extract .tar.xz files.
Unlike OpenBSD (base tar is pax), FreeBSD (base tar is bsdtar) can extract .tar.xz well.
Ref:
https://github.com/openbsd/src/blob/dfaf7899c030e92af72bff3730d9aa52f6059072/bin/pax/Makefile#L9
https://github.com/openbsd/src/blob/dfaf7899c030e92af72bff3730d9aa52f6059072/bin/pax/options.c#L1790-L1798
https://www.mail-archive.com/tech@openbsd.org/msg08996.html
There was a problem hiding this comment.
This is unsurprising. I think using xzcat so the two BSD targets have the same job definition is fine.
| prepare: | | ||
| ${{ matrix.packages }} | ||
| mkdir -p /usr/local/zig | ||
| curl -fsSL https://ziglang.org/download/${{ matrix.zig-version }}/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}.tar.xz -o /usr/local/zig/zig.tar.xz |
There was a problem hiding this comment.
I think I'll see if I can upstream a feature to override the mlugg/setup-zig auto host machine detection since I'd rather not have a CI job directly pulling from ziglang.org if we can avoid it. That's not a blocker for merging this, though.
|
Thanks for fixing these targets and adding the CI coverage! |
Problem:
FreeBSD, NetBSD and OpenBSD were missing some source files which upstream adds on all BSDs.
Solution:
Add them to *bsd source lists, matching upstream CMakeLists.txt.
Ref: https://github.com/libuv/libuv/blob/49b1c064714b412d7f7a2f5e7146c977554e57f9/CMakeLists.txt#L288-L306