CI: set up multi-thread build for all platforms

This commit is contained in:
Alexey Ochapov 2021-06-03 08:00:00 +03:00 committed by Victor Zverovich
parent f4c95f6dd9
commit 024741b476
3 changed files with 9 additions and 3 deletions

View File

@ -67,7 +67,9 @@ jobs:
- name: Build - name: Build
working-directory: ${{runner.workspace}}/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 - name: Test
working-directory: ${{runner.workspace}}/build working-directory: ${{runner.workspace}}/build

View File

@ -26,7 +26,9 @@ jobs:
- name: Build - name: Build
working-directory: ${{runner.workspace}}/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 - name: Test
working-directory: ${{runner.workspace}}/build working-directory: ${{runner.workspace}}/build

View File

@ -49,7 +49,9 @@ jobs:
- name: Build - name: Build
working-directory: ${{runner.workspace}}/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 - name: Test
working-directory: ${{runner.workspace}}/build working-directory: ${{runner.workspace}}/build