diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..4bf00e5 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,34 @@ +name: CMake Build and Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake build-essential + + - name: Create build directory + run: mkdir -p build + + - name: Configure CMake + working-directory: build + run: cmake .. + + - name: Build + working-directory: build + run: make + + - name: Test + working-directory: build + run: ctest --output-on-failure