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