diff --git a/.forgejo/workflows/build_and_test.yml b/.forgejo/workflows/build_and_test.yml new file mode 100644 index 0000000..dd807aa --- /dev/null +++ b/.forgejo/workflows/build_and_test.yml @@ -0,0 +1,36 @@ +name: Build and Test + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +jobs: + build-and-test: + 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 build-essential + + - name: Configure CMake + run: | + mkdir -p build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release + + - name: Build project + run: | + cd build + cmake --build . --parallel $(nproc) + + - name: Run tests + run: | + cd build + ctest --output-on-failure --parallel $(nproc)