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

Improve CI Setup and Performance #5670

Merged
merged 4 commits into from
Nov 22, 2023
Merged

Conversation

sturnclaw
Copy link
Member

This PR refactors some of our CI build scripts and CMake tooling files to support using the Ninja generator on Linux instead of Make, which allows us to automatically invoke parallel builds everywhere including our CI runners.

As a result, the CI build should be able to take advantage of all vCores provided to the execution environment, leading to a hopeful build time improvement.

I've also fixed the clang-format CI failures by upgrading the runner to a version that provides a newer clang-format binary - we were stuck on v11 for CI while developers are on significantly newer versions (my system has v16) and the config files are not backwards compatible or well-versioned at all.

For compatibility with VSCode, I've bumped the CMakePresets.json version number to v3 - this requires CMake 21 or newer. Older CMake versions will still be able to use the "manual" build workflow on Linux, though CMake is starting to warn about dropping support for the minimum CMake version specified in a lot of our actual CMakeLists.txt files so we should re-evaluate those at some point.

This change allows users to select their preferred CMake Generator (e.g. Ninja) and not be forced to use Unix Makefiles
- Requires bumping CMakePresets.json version to 3 for compatibility with VSCode
Allows us to make maximal use of multicore runners and reduce compile times.
Ninja automatically selects an appropriate parallelism level so we don't have to make changes if the underlying runner hardware changes.
@sturnclaw
Copy link
Member Author

Going to merge even though there's a clang-format failure and run a codebase wide "re-sync" clang-format later on master branch once I've merged most of the outstanding PRs to minimize the amount of workflow disruption.

@sturnclaw sturnclaw merged commit 0971009 into pioneerspacesim:master Nov 22, 2023
@sturnclaw sturnclaw deleted the ci-fixes branch November 22, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant