image: alpine/latest
packages:
  - meson
  - ninja
  - gcc
  - pkgconf
  - scdoc
  - freetype-dev
  - fontconfig-dev
  - harfbuzz-dev
  - utf8proc-dev
  - pixman-dev
  - wayland-dev
  - wayland-protocols
  - check-dev
  - ttf-hack
  - font-noto-emoji
  - python3
  - py3-pip

sources:
  - https://git.sr.ht/~dnkl/tllist
  - https://git.sr.ht/~dnkl/fcft

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

tasks:
  - subprojects: |
      mkdir fcft/subprojects
      ln -s ../../tllist fcft/subprojects/tllist
  - debug: |
      mkdir -p bld/debug
      meson --buildtype=debug -Drun-shaping=enabled -Dtest-text-shaping=true -Dexamples=true fcft bld/debug
      ninja -C bld/debug -k0
      meson test -C bld/debug --print-errorlogs
  - debug-no-text-shaping: |
      mkdir -p bld/no-text-shaping
      meson --buildtype=debug -Dgrapheme-shaping=disabled -Drun-shaping=disabled -Dtest-text-shaping=false fcft bld/no-text-shaping
      ninja -C bld/no-text-shaping -k0
      meson test -C bld/no-text-shaping --print-errorlogs
  - release: |
      mkdir -p bld/release
      meson --buildtype=minsize -Drun-shaping=enabled -Dtest-text-shaping=true -Dexamples=true fcft bld/release
      ninja -C bld/release -k0
      meson test -C bld/release --print-errorlogs
  - codespell: |
      pip install codespell
      ~/.local/bin/codespell README.md CHANGELOG.md *.c *.h fcft/*.h doc/*.scd
