I have an extemely large project that I am working one (around 4.7M lines of code). SonarScanner through GitHub Actions currently cant finish the job before the workflow is terminated due to reaching 6 hour time limit. It there a way to have multiple workflow files for the scan in this repository?
There are a couple ways to attack this:
The standard advice when analyzing a very large project takes too long is to break it up into multiple analyses. TBH, I’m not sure how feasible that is in a C/C++ context. I recognize that would be a pain, since you would have to re-build with the build-wrapper for each subset. Also, since the build-wrapper output would include information for the entire codebase, I’m not sure to what degree only analyzing a subset would be a time saver. But it might be an option.
It looks from your log snippet like analysis is already properly multi-threading, but it might be worth double-checking that a thread is spawned for each processor.
It may be that you need a larger runner, with more CPUs, which would allow more threads to be spawned.
If hosting your own runner is an option, it would allow you to take advantage of a local analysis cache, which should speed analysis once the cache is established.