version: 0.1.0.{build}

environment:
  matrix:
  - LUA: "lua 5.1"
  - LUA: "lua 5.2"
  - LUA: "lua 5.3"

platform:
  - x64
  - x86
  - mingw

before_build:
  - set PATH=C:\Python27\Scripts;%PATH%
  - pip install hererocks
  - if /I "%platform%"=="x86" set HR_TARGET=vs_32
  - if /I "%platform%"=="x64" set HR_TARGET=vs_64
  - if /I "%platform%"=="mingw" set HR_TARGET=mingw
  - if /I "%platform%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
  - hererocks env --%LUA% --target %HR_TARGET% -rlatest
  - call env\bin\activate

build_script:
  # `ld` seems can not make output dir
  - mkdir environ
  - luarocks make rockspec\pdh-scm-0.rockspec

before_test:
  - luarocks show luacheck >nul 2>&1 || luarocks install luacheck

test_script:
  - luacheck ./lua

version: 0.1.0.{build}

environment:
  matrix:
  - LUA: "lua 5.1"
  - LUA: "lua 5.2"
  - LUA: "lua 5.3"

platform:
  - x64
  - x86
  # - mingw

before_build:
  - set PATH=C:\Python27\Scripts;%PATH%
  - pip install hererocks
  - if /I "%platform%"=="x86" set HR_TARGET=vs_32
  - if /I "%platform%"=="x64" set HR_TARGET=vs_64
  - if /I "%platform%"=="mingw" set HR_TARGET=mingw
  - if /I "%platform%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
  - hererocks env --%LUA% --target %HR_TARGET% -rlatest
  - call env\bin\activate

build_script:
  # `ld` seems can not make output dir
  - if /I "%platform%"=="mingw" mkdir pdh
  - luarocks make rockspec\pdh-scm-0.rockspec

before_test:
  - luarocks show luacheck >nul 2>&1 || luarocks install luacheck

test_script:
  - luacheck ./lua

Disable MinGW build on AppVeyor.
Disable MinGW build on AppVeyor.
