missing-make-j-flag
Detects workflow steps that run make, gmake, or cmake --build without any parallelization mechanism.
Why this rule exists:
- these tools default to serial execution
- runner minutes add up when a build uses only one core
-j$(nproc)is a zero-risk change that cuts build wall time
What is checked:
run:commands containingmake,gmake, orcmake --build- the command itself is checked for
-j,--jobs, or--parallelflags - workflow-level, job-level, and step-level
env:maps are checked forMAKEFLAGScontaining a-jflag, and forCMAKE_BUILD_PARALLEL_LEVEL - for
cmake --buildonly: all steps in the same job are scanned for Ninja references; if Ninja is the generator,cmake --buildalready parallelizes
Typical remediation:
- add
-j$(nproc)to themake/gmake/cmake --buildinvocation - or set
MAKEFLAGS: -j$(nproc)in workflow, job, or step env - or set
CMAKE_BUILD_PARALLEL_LEVEL: $(nproc)for cmake-based builds - or switch to Ninja as the CMake generator, which parallelizes by default