From f2bfa980f64a4e8bad9871b199e108c216deb80b Mon Sep 17 00:00:00 2001 From: Tarek Date: Mon, 2 Jun 2025 11:08:18 -0400 Subject: [PATCH 1/2] created cmake.yml workflow --- .github/workflows/cmake.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..049e5ec --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,28 @@ +name: CMake + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Release, Debug, RelWithDebInfo, etc. + BUILD_TYPE: Release + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C ${{env.BUILD_TYPE}} From 5778fa411688e95813de5fbfadf6b0d67d966681 Mon Sep 17 00:00:00 2001 From: Tarek Date: Mon, 2 Jun 2025 11:12:44 -0400 Subject: [PATCH 2/2] adding multicore building --- .github/workflows/cmake.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 049e5ec..5ff9665 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -19,9 +19,9 @@ jobs: - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Build (parallel) + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j$(nproc) - name: Test working-directory: ${{github.workspace}}/build