ci : multithreaded builds (#3311)
* mac and linux threads
* windows
* Update build.yml
* Update build.yml
* Update build.yml
* automatically get thread count
* windows syntax
* try to fix freebsd
* Update build.yml
* Update build.yml
* Update build.yml