From e0cb38c10e2ba0f065c25660ee6c2343ea56bfc7 Mon Sep 17 00:00:00 2001 From: Cezary Bloch Date: Fri, 8 Nov 2024 21:33:38 +0100 Subject: [PATCH] Add github workflows --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f221a18 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build and Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up CMake + uses: lukka/get-cmake@v3 + + - name: Install dependencies + run: sudo apt-get install -y cmake g++ libgtest-dev + + - name: Build project + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Debug .. + make + + - name: Run tests + run: | + cd build + ctest --output-on-failure \ No newline at end of file