# APPVEYOR_BUILD_FOLDER is C:/projects/bali-phy
version: '{build}'
environment:
  matrix:
  - MSYSTEM: MINGW64
    PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%

install:
  # update msys2
  - bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
  - bash -lc "pacman --noconfirm -Sy"
  - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-ninja"
  - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-python3-pip"
  - bash -lc "pip3 install meson"

build_script:
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER/ && git submodule update --init"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER/ && meson build --prefix=$APPVEYOR_BUILD_FOLDER/local"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER/build && ninja install
#  - bash -lc "cd $APPVEYOR_BUILD_FOLDER/build && ninja test"


