name: Build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build-check:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y build-essential libtool intltool autoconf automake libcurl4-openssl-dev \
            pkg-config libglib2.0-dev libgtk-3-dev

      - name: Run autoconf
        run: ./autogen.sh

      - name: Build
        run: make

      - name: Run tests
        run: make check
