name: Debian pkg-config

on: [push, pull_request]

defaults:
  run:
    shell: sh

permissions:
  contents: read

jobs:
  pkg-config:
    runs-on: ubuntu-latest
    container:
      image: debian:testing

    steps:
    - uses: actions/checkout@v4

    - name: Install dependencies
      run: |
        apt -y update
        apt -y --no-install-recommends install g++ cmake make pkg-config

    - name: Build and install
      run: |
        cmake -B build -DSIMDUTF_FAST_TESTS=On
        cmake --build build
        cmake --install build

    - name: Test pkg-config
      run: g++ tools/sutf.cpp -Itools $(pkg-config --cflags --libs simdutf) -o sutf
