-
Notifications
You must be signed in to change notification settings - Fork 59
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: unify the way to set parallel build #1090
base: master
Are you sure you want to change the base?
Conversation
It doesn't seem to be faster on AppVeyor, maybe there is only 1 core? |
e92b887
to
61d5708
Compare
Appveyor allocates only 2 cores:
|
1b3d2a8
to
aa204b0
Compare
It doesn't seem to be faster on AppVeyor. On macOS I had to set the variable with |
03098ee
to
9ac667a
Compare
All I save with Appveyor/MSVC is 30s… 😐️ |
9ac667a
to
81ecf06
Compare
81ecf06
to
ea18aea
Compare
I moved out of the appveyor script the commenst, to avoid those errors:
Both the standard |
The idea of overloading a bit the CPU cores is that it usually allows to save some time because both the compiler and the build system (CMake, make, etc.) may not use 100% of the CPU when doing something. This usually works with 1 or 2 more jobs than cpu cores (overloading too much may put the memory and the scheduler on pressure and start being counter-productive). |
If the CMake parallelism turns out to do anything, it would be nicer to use the We already insert |
NMake apparently doesn't have a |
Ah right, that's why I see so fee differences.
It looks like it helps at doing cmake things in parallel like generating the |
I don't think so, AFAIK CMake is strictly single-threaded. The way this is expected to work is that the generated build system (Make/VS/etc.) shells out to CMake script mode each time it generates one of those files. So the generated build system controls the parallelism. |
ea18aea
to
7783044
Compare
Whatever what is parallelized, I got this here:
|
7783044
to
5161deb
Compare
I was wrong to say the generator is NMake. Nmake is used for the NaCl secondary build when part of a Visual Studio build, but we don't test that on CI. So the generator is Visual Studio, the same as for the IDE project. What I said about /MP is still true though, so I doubt there are any improvements to be had. |
Let's see if it works for AppVeyor/MSVC, and if the same builder-agnostic method also works on other systems.