name: C/C++ CI

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: install check
      run: sudo apt install -y check
    - name: autoreconf
      run: autoreconf --install
    - name: configure
      run: ./configure --with-check
    - name: make
      run: make
    - name: make check
      run: make check
    - name: make distcheck
      run: make distcheck
