mdavidsaver / pvxs

PVA protocol client/server library and utilities.
https://mdavidsaver.github.io/pvxs/
Other
19 stars 25 forks source link

update yaml to include aarch64 in build #48

Closed jacomago closed 8 months ago

jacomago commented 1 year ago

Also remove osx 2.7 intel as it is no longer supported by github.

AppVeyorBot commented 1 year ago

:x: Build pvxs 1.0.910 failed (commit https://github.com/mdavidsaver/pvxs/commit/9bb3f3b8bd by @jacomago)

mdavidsaver commented 1 year ago

Investigating docker/setup-qemu-action has been on my TODO list for awhile. This PR was as good a reason as any...

This action pulls in tonistiigi/binfmt, which provides statically linked QEMU user mode executables. As the name hints, it also adds configuration to the Linux kernel binfmt-misc facility for running executables which are not host ELF or #! scripts. This last part is what requires privileged access.

On Debian derivatives, the equivalent is done by apt-get install qemu-user-static. Similarly on fedora (dnf install qemu-user-static). I couldn't find anything with RHEL.

From some searching, I'm unsure how tonistiigi/binfmt relates to the seemingly equivalent multiarch/qemu-user-static, which is more often referenced in the search results I looked through.

wrt. docker --platform ... I am disappointed to find that the equivalent podman --platform ... doesn't seem to work. The arguments --platform or --os and --arch are accepted then apparently ignored. For me, the host arch (amd64) was always used. Tested with podman 3.0 (Deb 10) and 4.3 (Deb 11). As with seemingly everyone else, I was confused by the "sticky" behavior of --platform...

mdavidsaver commented 1 year ago

wrt. this PR. I'm impressed that a build takes only 40 minutes. Most of this being to compile epicscorelibs, which happens less frequently. I'm already accustomed to long CI runs for epics-base, so I think these times are acceptable to me.

To move forward, equivalent PRs for epicscorelibs and P4P are needed.

I will be interested to see what happens with the P4P unit tests. The last time I tried, I found that qemu-user didn't implement some ~obscure ioctl() calls used in CA and PVA code, which caused those tests to fail. I probably would not treat this as a blocker to publishing aarch64 wheels though.

mdavidsaver commented 1 year ago

I was able to persuade podman to run manylinux2014_aarch64, and built P4P. This also took ~40 minutes even with -j8. The tests do still fail with QEMU 7.2. It looks like there are unimplemented setsockopt() translations.

...
2023-06-22T19:40:22.775732673 WARN pvxs.loop Unable to clear IP_MULTICAST_ALL (err=0).  This may cause problems on multi-homed hosts.
2023-06-22T19:40:22.778996712 WARN pvxs.loop Unable to clear IP_MULTICAST_ALL (err=0).  This may cause problems on multi-homed hosts.
2023-06-22T19:40:22.779299432 WARN pvxs.util Unable to set SO_RXQ_OVFL: 0
2023-06-22T19:40:22.781855101 WARN pvxs.loop Unable to clear IP_MULTICAST_ALL (err=0).  This may cause problems on multi-homed hosts.
2023-06-22T19:40:22.784926212 WARN pvxs.loop Unable to clear IP_MULTICAST_ALL (err=0).  This may cause problems on multi-homed hosts.
2023-06-22T19:40:22.811737087 WARN pvxs.loop Unable to clear IP_MULTICAST_ALL (err=0).  This may cause problems on multi-homed hosts.
2023-06-22T19:40:22.812453334 WARN pvxs.loop Unable to clear IP_MULTICAST_ALL (err=0).  This may cause problems on multi-homed hosts.
2023-06-22T19:40:22.812999771 WARN pvxs.util Unable to set SO_RXQ_OVFL: 0
2023-06-22T19:40:22.813091259 WARN pvxs.util Unable to set SO_RXQ_OVFL: 0
2023-06-22T19:40:22.841061024 ERR pvxs.loop Unable to set mcast IF : Success
2023-06-22T19:40:23.818435551 ERR pvxs.loop Unable to set mcast IF : Success
...

Indeed IP_MULTICAST_ALL, SO_RXQ_OVFL, IP_MULTICAST_IF, and IPV6_MULTICAST_IF are not translated as of qemu/qemu@b455ce4c2f300c8ba47cba7232dd03261368a4cb.

https://github.com/qemu/qemu/blob/b455ce4c2f300c8ba47cba7232dd03261368a4cb/linux-user/syscall.c#L2101-L2561

PVXS doesn't treat any of these as fatal errors. SO_RXQ_OVFL is optional. The various IP_MULTICAST_* are needed to make the local multicast "hack" work, as well as general mcast search.

jacomago commented 1 year ago

I will work on epicscorelib, I guess that should make pvxs build faster as well.

Alternative to using qemu is to use a third party runner from https://buildjet.com/for-github-actions or https://actuated.dev/ which I guess would fix the p4p test failures.

Mostly it would be nice if https://github.com/actions/runner-images/issues/5631 could be closed...

jacomago commented 8 months ago

Closing in favour of https://github.blog/changelog/2023-10-30-accelerate-your-ci-cd-with-arm-based-hosted-runners-in-github-actions/ in the future.