diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0f0d7bf5..4dcd3b3c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -67,7 +67,9 @@ jobs: - name: Build working-directory: ${{runner.workspace}}/build - run: cmake --build . --config ${{matrix.build_type}} + run: | + threads=`nproc` + cmake --build . --config ${{matrix.build_type}} --parallel $threads - name: Test working-directory: ${{runner.workspace}}/build diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f62dbdc6..e300a22b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -26,7 +26,9 @@ jobs: - name: Build working-directory: ${{runner.workspace}}/build - run: cmake --build . --config ${{matrix.build_type}} + run: | + threads=`sysctl -n hw.logicalcpu` + cmake --build . --config ${{matrix.build_type}} --parallel $threads - name: Test working-directory: ${{runner.workspace}}/build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f1d11c8f..ece0372b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -49,7 +49,9 @@ jobs: - name: Build working-directory: ${{runner.workspace}}/build - run: cmake --build . --config ${{matrix.build_type}} + run: | + $threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors + cmake --build . --config ${{matrix.build_type}} --parallel $threads - name: Test working-directory: ${{runner.workspace}}/build