Default stage-2 parallelism for batched ``fbuild`` sketch builds.
()
| 165 | |
| 166 | |
| 167 | def default_fbuild_sketch_jobs() -> int: |
| 168 | """Default stage-2 parallelism for batched ``fbuild`` sketch builds.""" |
| 169 | env_override = _get_env_job_count("FASTLED_SKETCH_JOBS") |
| 170 | if env_override is not None: |
| 171 | return env_override |
| 172 | cpus = cpu_count() |
| 173 | if os.environ.get("GITHUB_ACTIONS") == "true": |
| 174 | return min(cpus, 2) |
| 175 | return cpus |
| 176 | |
| 177 | |
| 178 | def _fbuild_supports_subcommand(subcommand: str) -> bool: |
no test coverage detected