image: debian/bookworm
packages:
  - mingw-w64
sources:
  - hg+https://hg.sr.ht/~mrpapersonic/msvpvf
tasks:
  - build: |
      cd msvpvf

      # x86 ANSI
      CC=i686-w64-mingw32-gcc make gui
      strip gui.exe
      mv gui.exe msvpvf-i686-ansi.exe

      # x86 Unicode
      make clean
      CC=i686-w64-mingw32-gcc make gui CFLAGS="-DUNICODE -D_UNICODE"
      strip gui.exe
      mv gui.exe msvpvf-i686-unicode.exe

      # x64 Unicode
      make clean
      CC=x86_64-w64-mingw32-gcc make gui CFLAGS="-DUNICODE -D_UNICODE"
      strip gui.exe
      mv gui.exe msvpvf-x86_64-unicode.exe
artifacts:
  - msvpvf/msvpvf-i686-ansi.exe
  - msvpvf/msvpvf-i686-unicode.exe
  - msvpvf/msvpvf-x86_64-unicode.exe
triggers:
  - action: email
    condition: failure
    to: Paper <paper@paper.us.eu.org>
