From 82c70255ade1055ce3a4b02dd3922019eec7bac0 Mon Sep 17 00:00:00 2001 From: dcvz Date: Sat, 25 May 2024 00:14:04 +0200 Subject: [PATCH] Use available CPU cores on Windows --- .github/workflows/validate.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 046b931..774f0c4 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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