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

Parallelize macOS build in CI #12422

Closed
cameel opened this issue Dec 16, 2021 · 5 comments · Fixed by #12536
Closed

Parallelize macOS build in CI #12422

cameel opened this issue Dec 16, 2021 · 5 comments · Fixed by #12536

Comments

@cameel
Copy link
Member

cameel commented Dec 16, 2021

In #11670 (comment) I discovered that our macOS build job in CI takes ~20 min regardless of how many cores the machine has. Apparently the -j flag we put in MAKEFLAGS variable is getting ignored. I think that the build config generated by CMake on macOS is still make-based so I'm not sure why this is the case.

This needs to be investigated. Once we know how to parallelize it, we should adjust the number of threads/processes and machine resource class in CI for the best cost/benefit ratio.

@willianpaixao
Copy link

Hi @cameel, very interesting issue.

For over a decade I only saw the -j flag being used without a space as separator, eg, -j4, which raised my eyebrows. Maybe Ubuntu can understand that but MacOS can't. So I would remove the space and fire a pipeline to check.

That said, assuming this was not the problem, maybe we should try a different flag, here are the cmake equialent:

Unfortunately I don't own a Mac that I can try it myself.

@cameel
Copy link
Member Author

cameel commented Jan 14, 2022

That's a great point. Being used to the GNU tools it didn't even cross my mind but it could really be just that.

Honestly, I don't own a Mac either, I'm only ever using it in CI :) If you would like to try, it's as simple as tweaking our config.yml. If you create a PR it will run with your changed config.

If you do that you should log into CircleCI though and follow the project if you can because otherwise there are some limits on external PRs. Sometimes mac/windows jobs do not run at all. If that happens, usually a branch created by one of the project members also helps to trigger it so let me know.

@willianpaixao
Copy link

Well, I tried but apparently CircleCI wants some schmoney:

Apologies! Your build didn’t run because you haven’t selected a plan that includes macOS yet. Please change to a Performance Plan. If you have any questions please feel free to contact support.

@cameel
Copy link
Member Author

cameel commented Jan 14, 2022

OK, that's what was afraid would happen. Well, let me try it then.

@cameel
Copy link
Member Author

cameel commented Jan 14, 2022

Here's a PR: #12536. Let's see if your theory is true :) Feel free to review.

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

Successfully merging a pull request may close this issue.

2 participants