From 7c014b3ec71ee9578bfba5c0656c1288e34e75f8 Mon Sep 17 00:00:00 2001 From: Angelo Franciamore Date: Fri, 2 Aug 2024 15:39:12 +0200 Subject: [PATCH] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..417de28 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,35 @@ +name: CMake Build and Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y cmake libboost-all-dev + + - name: Create build directory + run: mkdir -p build + + - name: Configure CMake + run: cmake -S . -B build + + - name: Build the project + run: cmake --build build + + - name: Run tests + run: ctest --test-dir build + + - name: Clean up + run: | + rm -rf build