-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: Set parallelization level #130
Conversation
@@ -26,6 +28,12 @@ export async function main(): Promise<void> { | |||
const testPresetAdditionalArgs = actionLib.getInput(cmakeglobals.testPresetAdditionalArgs, false); | |||
const packagePresetAdditionalArgs = actionLib.getInput(cmakeglobals.packagePresetAdditionalArgs, false); | |||
const runVcpkgEnvFormatString = actionLib.getInput(vcpkgglobals.runVcpkgEnvFormatStringInput, false); | |||
|
|||
// Set parallelization level | |||
const nproc = os.availableParallelism(); |
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.
From what I've read os.availableParallelism
should take into account the virtualization and get the actual available processors, i.e. nproc
vs nproc --all
@LecrisUT thank you for contributing to this project! Here my thinkings:
Regarding the PR itself:
|
The issue is with supporting multiple os. Then it is not straightforward how to set it up, while in the JavaScript part, there is an abstraction layer to take care of that.
Fair, it is on the todo list above. It needs discussion on what interface to provide. But at some point, shouldn't we also provide a useful default to always build and test in parallel in order to minimize the user's input? The other more general issue regarding the presets I will comment in the issue |
@LecrisUT here a summary of my thinking about this feature:
Let me know if my thinking is correct. I am really interested in seeing a scenario where the user have to set an explicit parallelism value in order to get a meaningful build time improvement. |
Closing stale PR. |
I couldn't execute
npm install
so I have to rely on the CI to produce the dist-gitQuestion is, do you want it in here or in
@lukka/run-cmake-lib
? The only thing that is unclear is that the GH-Action variables would be in this repo, so how do you want to interface with the library to set it?TODO:
ProcessorCount
to check what CMake detects it has, and then compare with the verbose call, to see what-J
variable was set