-
Notifications
You must be signed in to change notification settings - Fork 446
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] Make build environment parallel (Windows) #2080
[CI] Make build environment parallel (Windows) #2080
Conversation
134f5e3
to
d63808d
Compare
ci/do_ci.ps1
Outdated
@@ -40,7 +40,7 @@ switch ($action) { | |||
if ($exit -ne 0) { | |||
exit $exit | |||
} | |||
cmake --build . | |||
cmake --build . -j |
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.
Just curious, Will CMake automatically use Ninja as build system, or we need to configure it explicitly?
The build time is reduced from 14 min to 10 min for Windows, so there seems to be some level of parallelism.
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 think we should add -G Ninja to use ninja to build.
In my understanding, -j
also works for Visual Studio Generator.
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.
AFAIK, not automatically. Ninja generator (one of the CMake generators) which needs to be given explicitly to CMake.
Also, I tried to put Ninja as a generator to CMake at first but a few tests are failed due to missing Ninja packages.
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.
With my solution (getting number of physical cores from Powershell command), I assume that it takes less time than before, what do you think?
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.
Yeah it looks good to me. The title of the PR says Ninja, so got confused :)
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.
Yeah, sorry for inconvenience. After discussion on issue, I decided to use Ninja but it does not work at all. So, I will update the PR title and do you want me to change commit message either?
Are we sure we have enough RAM on the runners to use all the cores? |
What do you mean by that? I do not understand the relation between RAM and parallel build. If you say that, one core must be isolated for other jobs on the system, I can get it but RAM sorry I do not. Could you please elaborate more? |
parallel builds require more RAM for build. The more core you use for build the more RAM you should have. Normal GHA runners can't do more than 3 parallel jobs. I'm not sure what setup we have here. |
* commit '7887d32da60f54984a597abccbb0c883f3a51649': (82 commits) [RELEASE] Release version 1.9.0 (open-telemetry#2091) Use sdk_start_ts for MetricData start_ts for instruments having cumulative aggregation temporality. (open-telemetry#2086) [SEMANTIC CONVENTIONS] Upgrade to version 1.20.0 (open-telemetry#2088) [EXPORTER] Add OTLP HTTP SSL support (open-telemetry#1793) Make Windows build environment parallel (open-telemetry#2080) make some hints (open-telemetry#2078) Make some targets parallel in CI pipeline (open-telemetry#2076) [Metrics SDK] Implement Forceflush for Periodic Metric Reader (open-telemetry#2064) Upgraded semantic conventions to 1.19.0 (open-telemetry#2017) Bump actions/stale from 7 to 8 (open-telemetry#2070) Include directory path added for Zipkin exporter example (open-telemetry#2069) Ignore more warning of generated protobuf files than not included in `-Wall` and `-Wextra` (open-telemetry#2067) Add `ForceFlush` for all `LogRecordExporter`s and `SpanExporter`s. (open-telemetry#2000) Remove unused 'alerting' section from prometheus.yml in examples (open-telemetry#2055) Clean warnings in ETW exporters (open-telemetry#2063) Fix default value of `OPENTELEMETRY_INSTALL_default`. (open-telemetry#2062) [EXPORTER] GRPC endpoint scheme should take precedence over OTEL_EXPORTER_OTLP_TRACES_INSECURE (open-telemetry#2060) Fix view names in Prometheus example (open-telemetry#2034) Fix some docs typo (open-telemetry#2057) Checking indices before dereference (open-telemetry#2040) ... # Conflicts: # exporters/ostream/CMakeLists.txt # sdk/src/metrics/state/metric_collector.cc # sdk/src/metrics/state/temporal_metric_storage.cc
Fixes #2077
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes