version: "0.81.0.{build}"
image: Visual Studio 2019
install:
  - cmd: set MSYSTEM=MINGW32
  - cmd: C:\msys64\usr\bin\bash -lc "pacman --sync --noconfirm make mingw-w64-i686-gcc mingw-w64-i686-sqlite3"
  - cmd: cd C:\projects & mklink /D %APPVEYOR_PROJECT_NAME% %APPVEYOR_PROJECT_SLUG% & exit 0
build_script:
  - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; ./configure --ssl --with-ext='sqlite3 win32 zlib' --disable-docs CFLAGS=-D__MINGW_USE_VC2005_COMPAT"
  - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make"
test_script:
  - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; make test"
after_build:
  - cmd: copy jimsh.exe jimsh_debug.exe
  - cmd: C:\msys64\usr\bin\bash -lc "cd /c/projects/jimtcl; strip jimsh.exe; 7z a jimsh.zip jimsh.exe jimsh_debug.exe /c/msys64/mingw32/bin/{libcrypto-*.dll,libgcc_s_dw2-1.dll,libsqlite3-0.dll,libssl-*.dll,libwinpthread-1.dll,zlib1.dll}"
artifacts:
  - path: jimsh.zip
