From e884a5f0e34851ea2f149e7d8bf171b6da5f29aa Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Sun, 22 Jan 2023 17:47:10 +0700 Subject: [PATCH] use CMake Action to configure and build this project --- .github/workflows/build.yml | 7 ++----- .github/workflows/test.yml | 19 +++++++++---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce41b27..50f9301 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,5 @@ jobs: - name: Checkout repository uses: actions/checkout@v3.3.0 - - name: Configure CMake - run: cmake . -B build - - - name: Build targets - run: cmake --build build + - name: Configure and build this project + uses: threeal/cmake-action@v1.0.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1057204..009fa72 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,11 +9,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3.3.0 - - name: Configure CMake - run: cmake . -B build -DBUILD_TESTING=ON - - - name: Build targets - run: cmake --build build + - name: Configure and build this project + uses: threeal/cmake-action@latest + with: + args: -DBUILD_TESTING=ON - name: Run tests run: ctest --test-dir build --verbose @@ -30,11 +29,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v3.3.0 - - name: Configure CMake - run: cmake . -B build -DCMAKE_CXX_FLAGS='-Werror' -DBUILD_TESTING=ON - - - name: Build targets - run: cmake --build build + - name: Configure and build this project + uses: threeal/cmake-action@latest + with: + cxx-flags: -Werror + args: -DBUILD_TESTING=ON check-formatting: runs-on: ubuntu-latest