Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry: Advantage of macOS vs Linux runners? #70

Closed
beamerblvd opened this issue Nov 2, 2023 · 6 comments
Closed

Inquiry: Advantage of macOS vs Linux runners? #70

beamerblvd opened this issue Nov 2, 2023 · 6 comments

Comments

@beamerblvd
Copy link

Other than mentioning various features that the macOS and/or Linux runners do or do not support, the documentation doesn't mention any particular benefits of one over the other, or of xhyve vs qemu (which might inform a macOS vs Linux decision).

Assuming I have a fairly simple freebsd and netbsd matrix and I don't have any particular version or architecture requirements, is there a reason that I should choose macOS over Linux or Linux over macOS? Trying to figure out if I can expect better performance (faster builds) from a particular runner config.

Thanks in advance for bringing some clarity to my decision making.

@beamerblvd
Copy link
Author

One of the reasons I'm asking is that about half of my runs are failing with this:

  hdiutil: couldn't eject "disk2" - Resource busy
  
  /Users/runner/work/_actions/cross-platform-actions/action/v0.21.0/webpack:/cross-platform-action/node_modules/@actions/exec/lib/toolrunner.js:574

And I'm wondering if switching runners to Ubuntu would fix this (which I'm about to try), but there may be other reasons why macOS is generally better that would negate that decision.

@jacob-carlborg
Copy link
Contributor

macOS runners are preferred because they supported hardware accelerated nested virtualization. This was mentioned in the readme in the "Under the Hood" section. But I made it more clear and explicit now and added it to the "Runners" section: https://github.com/cross-platform-actions/action#runners.

@beamerblvd
Copy link
Author

That is kinda the conclusion that I came to, too. When I switched to Ubuntu as the runner, things really slowed down. However, when I switched to Ubuntu as the runner, things became much more reliable. I have a matrix of six builds using this action. When using Ubuntu as the runner, they never fail (unless I've broken my own code). When using macOS as the runner, at least one build (usually two) in the matrix always fails every single run, with the disk ejection problem mentioned in another issue. So I'll stick with Ubuntu for now due to the reliability.

@jacob-carlborg
Copy link
Contributor

with the disk ejection problem mentioned in another issue

I fixed that two days ago (hopefully) in https://github.com/cross-platform-actions/action/releases/tag/v0.21.1. You can also try using QEMU as the hypervisor on macOS for better stability.

@beamerblvd
Copy link
Author

That did, indeed, seem to fix the disk ejection issue on macOS runners. I'll also try QEMU on macOS to see if it works any better or faster for my specific use case.

Out of curiosity, why can xhyve be used only for OpenBSD and FreeBSD, but not NetBSD, on macOS?

@jacob-carlborg
Copy link
Contributor

Out of curiosity, why can xhyve be used only for OpenBSD and FreeBSD, but not NetBSD, on macOS?

OpenBSD and FreeBSD are the only operating systems I've managed to boot in xhyve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants