Use available CPU cores on Windows

This commit is contained in:
dcvz 2024-05-25 00:14:04 +02:00
parent 9a471c4f97
commit 82c70255ad

View file

@ -90,9 +90,13 @@ jobs:
run: |
# enable ccache
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
cmake --build cmake-build --config ${{ matrix.type }} --target ultramodern -j 8
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
cmake --build cmake-build --config ${{ matrix.type }} --target ultramodern -j $cpuCores
- name: Build librecomp
run: |
# enable ccache
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
cmake --build cmake-build --config ${{ matrix.type }} --target librecomp -j 8
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
cmake --build cmake-build --config ${{ matrix.type }} --target librecomp -j $cpuCores