version: 0.6-build-{build}
pull_requests:
  do_not_increment_build_number: true
image:
- Visual Studio 2017
- Visual Studio 2019
install:
- cmd: >-
    if /i "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86) & (set QTDIR=C:\Qt\5.13\msvc2017)

    if /i "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" (call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64) & (set QTDIR=C:\Qt\6.1\msvc2019_64)

    set path=%PATH%;%QTDIR%\bin
build_script:
- cmd: >-
    nmake -f Makefile.nmake -nologo CFLAGS="-W3 -Os -MDd"

    cd tests

    qmake CONFIG-=release CONFIG+=debug

    nmake -nologo -s
test_script:
- cmd: >-
    nmake -s -nologo TESTARGS=-silent check
artifacts:
- path: lib\tinycbor.lib
deploy: off
