From 9b0d7bbce614d3db78183d6463e938bcf3c983a7 Mon Sep 17 00:00:00 2001 From: Paul Trampert Date: Mon, 24 Nov 2025 14:24:43 -0500 Subject: [PATCH 1/2] add j option to ci build --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ec69cdc..7c6b60b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -47,7 +47,7 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash # Execute the build. You can specify a specific target with "--target " - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config $BUILD_TYPE -j$(nproc) - name: Test working-directory: ${{runner.workspace}}/build From 6154f10e0ad87730c99913ce6e668e985c28e2a6 Mon Sep 17 00:00:00 2001 From: Paul Trampert Date: Mon, 24 Nov 2025 14:31:57 -0500 Subject: [PATCH 2/2] Cross-platform core count --- .github/workflows/cmake.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7c6b60b..0191776 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,6 +21,10 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Get number of CPU cores + uses: SimenB/github-actions-cpu-cores@v2 + id: cpu-cores + - name: get-cmake # You may pin to the exact commit or the version. # uses: lukka/get-cmake@573c9a901acfd6b42c7a6f68d657326ef3d72a78 @@ -47,7 +51,7 @@ jobs: working-directory: ${{runner.workspace}}/build shell: bash # Execute the build. You can specify a specific target with "--target " - run: cmake --build . --config $BUILD_TYPE -j$(nproc) + run: cmake --build . --config $BUILD_TYPE -j${{ steps.cpu-cores.outputs.cores }} - name: Test working-directory: ${{runner.workspace}}/build