name: C/C++ CI

on:
  push:
  pull_request:

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: prepare autoconf
      run: autoreconf -if 
    - name: install dependencies (minimal build) 
      run: sudo apt install build-essential autoconf libssl-dev 
    - name: configure
      run: ./configure
    - name: make
      run: make
    - name: install dependencies (full build)
      run: |
        sudo apt update
        sudo apt install libpq5 libpq-dev libssh2-1 libssh2-1-dev libgnutls28-dev libsvn-dev freerdp2-dev
    - name: configure
      run: ./configure
    - name: make
      run: make
    - name: make check
      run: make check
    - name: make distcheck
      run: make distcheck
