image: alpine/edge
arch: x86
packages:
  - musl-dev
  - eudev-libs
  - eudev-dev
  - linux-headers
  - meson
  - ninja
  - gcc
  - scdoc
  - wayland-dev
  - wayland-protocols
  - freetype-dev
  - fontconfig-dev
  - harfbuzz-dev
  - utf8proc-dev
  - pixman-dev
  - libxkbcommon-dev
  - ncurses
  - check-dev
  - ttf-hack
  - font-noto-emoji

sources:
  - https://git.sr.ht/~dnkl/foot

# triggers:
#   - action: email
#     condition: failure
#     to: <committer>

tasks:
  - debug: |
      mkdir -p bld/debug
      meson --buildtype=debug -Dgrapheme-clustering=enabled -Dfcft:grapheme-shaping=enabled -Dfcft:run-shaping=enabled  -Dfcft:test-text-shaping=true foot bld/debug
      ninja -C bld/debug -k0
      meson test -C bld/debug --print-errorlogs
  - release: |
      mkdir -p bld/release
      meson --buildtype=minsize -Db_pgo=generate -Dgrapheme-clustering=enabled -Dfcft:grapheme-shaping=enabled -Dfcft:run-shaping=enabled  -Dfcft:test-text-shaping=true foot bld/release
      ninja -C bld/release -k0
      meson test -C bld/release --print-errorlogs
