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

Speed up builds on CI #1029

Merged
merged 3 commits into from
Mar 1, 2023
Merged

Speed up builds on CI #1029

merged 3 commits into from
Mar 1, 2023

Conversation

Xaymar
Copy link
Contributor

@Xaymar Xaymar commented Feb 28, 2023

Explain the Pull Request

Attempt to improve the speed of builds on CI, given than they started to end up running for 30 minutes or more.

Completion Checklist

  • This has been tested on the following platforms:
    • MacOS 10.15
    • MacOS 11
    • MacOS 12
    • Ubuntu 20.04
    • Ubuntu 22.04
    • Windows 10
    • Windows 11
  • The copyright headers and license files have been updated.
  • I will maintain this for the forseeable future, and have added myself to CODEOWNERS.

Turns out to be very pointless, and usually doubles or triples the overall build time with no actual gain.
There's no need to split by configuration type on proper generators, which slightly speeds up the build. Downside is that we can't get builds for both Debug and RelWithDebInfo - though we only need the latter anyway.
A full clean build is only required for releases, so opting for iterative builds will speed up CI builds significantly. As we can re-use caches from across branches, opting for the first matching key, this means that any branch should re-use the closest match from the main branch.

Downside is that this may break if there is a change to the CMakeLists.txt file, since the project configuration is now different. Might be fixable, but that's not the aim of these changes.
@Xaymar
Copy link
Contributor Author

Xaymar commented Mar 1, 2023

Seems like this is the limit without splitting the builds into two different invocations. Around 10 minutes is a good time for builds, though ideally I wish I could drop it to just 2 to 3 minutes.

@Xaymar Xaymar marked this pull request as ready for review March 1, 2023 06:27
@Xaymar Xaymar merged commit d732f6b into root Mar 1, 2023
@Xaymar Xaymar deleted the patch/ci-speedup branch March 1, 2023 06:29
@Xaymar Xaymar added this to the 0.12 milestone Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant