name: freebsd_meson

on:
  workflow_dispatch:

permissions: read-all

jobs:
  freebsd_meson:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: FreeBSD-with-meson
        uses: cross-platform-actions/action@v0.23.0
        with:
          operating_system: freebsd
          sync_files: runner-to-vm
          version:  '14.0'
          run: |
            uname -a
            whoami
            freebsd-version
            echo $SHELL
            sudo pkg install -y python3 bash meson ninja pkgconf
            sudo pkg install -y gmake binutils zstd
            mkdir builddir && cd builddir
            meson setup -Ddwarfexample=true . ..
            ninja
            ninja test
