There are too many issues with 20.04 to successfully build with
VirtualCam - the azure kernel is missing videodev headers. For now,
use 18.04 LTS directly for main CI builds.
Both 18.04 and 20.04 include clang-format-10 without issue.
Batch files into clang-format to prevent needless processes. Now its
twice as fast in real time and uses 4x less resources. The old
implementation is also slower (but pretty close to) running a single
invocation of clang-format on all files.
before
time ./formatcode.sh
real 0m3.860s
user 0m20.975s
sys 0m6.694s
after
time ./formatcode.sh
real 0m1.486s
user 0m5.426s
sys 0m0.203s
Code formatting script was using `sysctl -n hw.physicalcpu` on macOS
machines to get the CPU count. This command returns the physical CPUs.
`nproc`, however, returns logical CPU count on Linux machines. It
should be `sysctl -n hw.logicalcpu` to make it consistent with its
Linux counterpart. But there also another way. `getconf
_NPROCESSORS_ONLN` gives the number of logical CPUs on both Linux and
macOS.