install:
  - set PATH=C:\msys64\usr\bin;%PATH%
  - bash -lc "pacman --needed --noconfirm -Syu"
  - bash -lc "pacman --needed --noconfirm -Sy"
  - bash -lc "pacman --noconfirm -S base-devel"
  - bash -lc "pacman --noconfirm -S msys2-devel"
  - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-toolchain"
  - bash -lc "pacman --noconfirm -S mingw-w64-x86_64-pcre"
  - bash -lc "pacman --noconfirm -S msys2-runtime"

build_script:
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; pwd"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; ls -l"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; which gcc"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; gcc --version"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; pacman -Q"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; cat msys2-build.sh"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; bash -x msys2-build.sh"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER; cp /usr/bin/msys-2.0.dll ."

artifacts:
  - path: ./c/mlr.exe
    name: Miller executable
  - path: ./msys-2.0.dll
    name: MSYS2 DLL
