name: Check ABI

on: [push, pull_request]

env:
  LAST_ABI_BREAK: 0f33069752fe06f6daf3d977cd09665b059494d8

jobs:
  check-abi:
    name: Check ABI
    runs-on: ubuntu-latest

    steps:
      - name: Get this version
        uses: actions/checkout@v6

      - name: Get version from last ABI break
        uses: actions/checkout@v6
        with:
          ref: ${{ env.LAST_ABI_BREAK }}
          path: original-version

      - name: Create Build Environment
        run: podman build -t packagekit-debian -f tests/ci/Dockerfile-debian

      - name: Build & Test
        run: podman run -t -v `pwd`:/build packagekit-debian
             ./tests/ci/check-abi.sh -Dpackaging_backend=apt
