-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
CI: Move non-coverage FreeBSD Cirrus CI jobs to GitHub Actions #15618
Conversation
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#15618" |
a04e218
to
d61933c
Compare
This primarily shows
|
Okay, the performance on Mac runners is much better - the |
This appeared 7x - once for each deinitialize member function. dmd/compiler/test/unit/deinitialization.d Line 152 in 5b8e829
Does FreeBSD even have objc support in dmd? |
Right interesting, I didn't realize it's complaining about a single assertion. I find it bizarre that this unittest is apparently invoked multiple times, makes absolutely no sense ( So my gut feeling is that we only see follow-up errors, maybe a missing @beforeEach initializeFrontend()
{
import dmd.frontend : initDMD;
initDMD();
}
@afterEach deinitializeFrontend()
{
import dmd.frontend : deinitializeDMD;
deinitializeDMD();
} for these tests. |
Only just got round to running these in my own FBSD VMs, all unit tests pass. Rebase and re-run? |
Well IIRC, the tests were just fine in the Cirrus FreeBSD VMs before too. So I very much doubt a rebase changes anything, but I'll try. Edit: Ah okay, you did, but no changes apparently. |
Shame, I've ran the github steps as a script directly on my VM, and it doesn't trigger. |
f2ff760
to
b2af2a0
Compare
@kinke looks like all I can do is fudge the However, it looks like the |
Oh well, thanks a lot for trying though! 👍 - I've just seen that the Action has been updated to v0.21.0 very recently; bumping it here (currently using v0.19.0) might be worth a shot: https://github.com/cross-platform-actions/action/releases |
By running them in a qemu VM on Linux runners.
Unless most of the changes in the VMs available are made behind the scenes, I doubt it. Having a look at the alternative vmactions/freebsd-vm - it looks like since 2 weeks that VM doesn't boot anymore. |
Updated to v0.21.0 - looks like both have hung again. The logs aren't rendering for me atm, but appears to be this time in different places to before. So maybe the VMs themselves are unstable to be used for 15 minutes at a time? GItHub says its hosted OSX runners have 1 CPU, and 14G memory. The cross-platform action says it gives its FreeBSD VMs 6GB memory by default. I'm not convinced hitting some resource limit is occurring, but I have seen hanging before because of lack of memory. |
The hosted Mac runners have 3 cores (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources). And cross-platform uses these 3 by default, and 13G of memory (https://github.com/cross-platform-actions/action#inputs). Maybe the 1GB for the host is a tad too low? We surely don't need 13G in the VM, 8G should be more than enough. |
Spoken to Jacob, and freezing is probably related to cross-platform-actions/action#29 and/or cross-platform-actions/action#61. Going to try MacOS+QEMU combination. Last test results: FBSD13 passed, FBSD12 hung. |
@kinke looks like both succeed with qemu hypervisor? Just going to undo some of the other stuff to see if that trend continues... https://github.com/dlang/dmd/actions/runs/6671677680/job/18134093839?pr=15618 |
Oh wow - and the performance seems to at least match the default other hypervisor's, way better than on the Linux host! I must admit I didn't even consider giving the Mac+qemu combo a try after the first results. I guess the 'unit' tests still fail - it did with qemu on Linux for the first experiments. |
With |
Looks like there's room to shave off an additional ~1m20s (from https://github.com/dlang/dmd/actions/runs/6672331301/job/18136041945?pr=15618):
We don't need any syncing, we don't produce any artifacts etc. Edit: Should be |
Using the default memory (13G) and it's back up to 27-30 minutes again. I guess still within reasonable times given it's a VM on a shared runner. Reducing memory back down to 8G anyway. https://github.com/dlang/dmd/actions/runs/6672331301/job/18136041945?pr=15618 I also noticed it takes about a minute and half to tear down the VM, looks to be consumed by rsync'ing the files in the VM back to the runner. Trying |
Ah! I see we're talking over each other. I already had the change primed, was just waiting for the run to finish to count just how long it takes. :-) |
Oh, if that's consistent, we should probably tell Jacob to change the default value, at least on macOS, giving the host more room to breathe. |
LVGTM. |
version (FreeBSD) { /* ??? unittest runner fails for no good reason on GHA. */ } | ||
else | ||
newTargets ~= createUnitTestTarget(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I say this is for no good reason - however when commenting out deinitialization.d:152 explicitly the same module then just failed at deinitialization.d:131.
This could suggest that al globals have an initial value other than null. Which begs the question: Why?, but actually also Why not? - afterall as a security feature, you can tell a compiler to default initialize all variables with a bit mask value (as opposed to zeros or garbage). Though I am struggling to justify this for global data. But equally surely you're testing it wrong if you're checking the value before it's been initialized. 🤷
Need to really get all pipelines green again, and this is progress in getting there. |
@kinke FYI, the Linux runners don't support hardware accelerated nested virtualization (KVM) while the macOS runners do (Hypervisor framework). That's why the big difference in performance. |
It depends on what the steps do. I try to do as little as possible inside the VM. Because of performance and to be able to use the GitHub action steps. That's also why files are synced in both directions. For example, you can do a checkout before the VM step and then use a step to create GitHub release after the VM step. |
I fully understand that it'd be total overkill to be able to run arbitrary actions in the VM, with all that node.js crap etc. I was just comparing this to the Cirrus CI approach, where the VM setup is done as built-in job properties (e.g., https://github.com/ldc-developers/ldc/blob/9928895c548af3789c7fcc7947d5e9b3ac152ae9/.cirrus.yml#L307-L314), and the steps are basically limited to bash steps AFAIK, so the native and VM steps can be trivially shared via YAML anchors (https://github.com/ldc-developers/ldc/blob/9928895c548af3789c7fcc7947d5e9b3ac152ae9/.cirrus.yml#L376 - another feature that GHA doesn't support). Considering the GHA limitations/flexibility, I can't think of anything your action could do better to improve our use case here. :) Thanks a lot for your hard work! |
By running them in a qemu VM on Linux runners.