diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8ff2886 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + gcc: ['9', '10', '11'] + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y help2man clang-tidy + + - name: Build + run: make + + - name: Run tests + run: make test + + - name: Lint + run: make lint + + flox-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Flox + uses: flox/install-flox@v1 + + - name: Build with Flox + run: | + flox activate + make + + - name: Test with Flox + run: | + flox activate + make test diff --git a/README.md b/README.md index ec22ed7..b357343 100644 --- a/README.md +++ b/README.md @@ -142,3 +142,13 @@ This project is developed and maintained with Flox. 1. `flox activate` 2. `make` + +## Continuous Integration + +The project uses GitHub Actions for CI with the following checks: +- Building with multiple GCC versions +- Running the test suite +- Static analysis with clang-tidy +- Building in Flox environment + +All checks must pass before merging pull requests.