name: build
on: [ push, pull_request ]
jobs:
  ubuntu:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - postgres: 18
            os: ubuntu-24.04
          - postgres: 17
            os: ubuntu-24.04
          - postgres: 16
            os: ubuntu-24.04
          - postgres: 15
            os: ubuntu-22.04
          - postgres: 14
            os: ubuntu-22.04

    steps:
      - uses: actions/checkout@v4

      - run: |
          sudo apt update
          sudo apt install -y libpoppler-glib-dev pkg-config wget

      - uses: ankane/setup-postgres@v1
        with:
          postgres-version: ${{ matrix.postgres }}
          dev-files: true

      - run: make
      - run: sudo make install
      - run: make installcheck
      - if: ${{ failure() }}
        run: cat regression.diffs

