mamedev / mame

MAME
https://www.mamedev.org/
Other
7.76k stars 1.95k forks source link

CI: use more CPUs for building #12442

Closed SpecLad closed 2 days ago

SpecLad commented 4 weeks ago

The standard GitHub runners have 3 to 4 CPUs, depending on the OS: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories. Increase the number of Make jobs to utilize those CPUs better.

rb6502 commented 3 weeks ago

The change itself is reasonable, but my understanding is that there are GitHub-imposed resource limits that we potentially could run into and that's why the settings are low right now.

SpecLad commented 3 weeks ago

I'm not aware of any additional limits. You get the runner that you get, and it's up to you how to use it.

and that's why the settings are low right now.

I assumed that they are low because they were configured before GitHub started using 4-core runners (which is this year: https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/).

rb6502 commented 3 weeks ago

https://docs.mamedev.org/contributing/index.html says we've had contributors banned from GitHub for using "too much" CPU and GitHub would not define what "too much" is. I don't remember the specific details (@cuavas might) but apparently it's a thing.

plaes commented 6 days ago

Proper way to do that would be make -j$(nproc).

cuavas commented 6 days ago

I’d be somewhat concerned about that with limited memory. A -j5 build on a fairly minimal Linux system with 6GB RAM hits swap pretty hard at two points whether you use GCC or clang. The macOS runners only have 7GB RAM, so I wouldn’t want to sail too close to the wind.

cuavas commented 6 days ago

https://docs.mamedev.org/contributing/index.html says we've had contributors banned from GitHub for using "too much" CPU and GitHub would not define what "too much" is. I don't remember the specific details (@cuavas might) but apparently it's a thing.

Correct, @0kmg was banned from GitHub actions.