appveyor.yml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. version: 1.3.{build}
  2. environment:
  3. matrix:
  4. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
  5. PAHO_WINDOWS_BUILD_BIT: x64
  6. OPENSSL_ROOT_DIR: "C:/OpenSSL-v111-Win64"
  7. PAHO_BUILD_STATIC: FALSE
  8. PAHO_BUILD_SHARED: TRUE
  9. PAHO_HIGH_PERFORMANCE: FALSE
  10. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
  11. PAHO_WINDOWS_BUILD_BIT: x64
  12. OPENSSL_ROOT_DIR: "C:/OpenSSL-Win64"
  13. PAHO_BUILD_STATIC: TRUE
  14. PAHO_BUILD_SHARED: FALSE
  15. PAHO_HIGH_PERFORMANCE: TRUE
  16. - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
  17. PAHO_WINDOWS_BUILD_BIT: x86
  18. OPENSSL_ROOT_DIR: "C:/OpenSSL-Win32"
  19. PAHO_BUILD_STATIC: FALSE
  20. PAHO_BUILD_SHARED: TRUE
  21. PAHO_HIGH_PERFORMANCE: TRUE
  22. configuration: Debug
  23. install:
  24. - cmd: ver
  25. - cmd: openssl version
  26. - cmd: C:\Python36\python --version
  27. - cmd: netsh advfirewall firewall add rule name="Python 3.6" dir=in action=allow program="C:\Python36\python.exe" enable=yes
  28. - cmd: netsh advfirewall firewall add rule name="Open Port 1883" dir=in action=allow protocol=TCP localport=1883
  29. - cmd: netsh advfirewall set allprofiles state off
  30. - ps: Start-Process C:\Python36\python -ArgumentList 'test\mqttsas.py'
  31. - cmd: git clone https://github.com/eclipse/paho.mqtt.testing.git
  32. - cmd: cd paho.mqtt.testing\interoperability
  33. - ps: Start-Process C:\Python36\python -ArgumentList 'startbroker.py -c localhost_testing.conf'
  34. - cmd: cd ..\..
  35. build_script:
  36. - cmd: >-
  37. mkdir build.paho
  38. cd build.paho
  39. echo %APPVEYOR_BUILD_WORKER_IMAGE%
  40. if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %PAHO_WINDOWS_BUILD_BIT%
  41. if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PAHO_WINDOWS_BUILD_BIT%
  42. if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2013" call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PAHO_WINDOWS_BUILD_BIT%
  43. cmake -G "NMake Makefiles" -DPAHO_WITH_SSL=TRUE -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_SAMPLES=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE -DPAHO_BUILD_STATIC=%PAHO_BUILD_STATIC% -DPAHO_BUILD_SHARED=%PAHO_BUILD_SHARED% -DPAHO_HIGH_PERFORMANCE=%PAHO_HIGH_PERFORMANCE% ..
  44. nmake
  45. ctest -T test -VV
  46. cd ..
  47. after_build:
  48. - cmd: >-
  49. set ZIPNAME=eclipse-paho-mqtt-c-windows.zip
  50. 7z a %ZIPNAME% %APPVEYOR_BUILD_FOLDER%\*.html
  51. 7z a %ZIPNAME% %APPVEYOR_BUILD_FOLDER%\*.md
  52. 7z a %ZIPNAME% %APPVEYOR_BUILD_FOLDER%\*-v10
  53. 7z a %ZIPNAME% build.paho\src\*.dll
  54. 7z a %ZIPNAME% build.paho\src\*.lib
  55. 7z rn %ZIPNAME% build.paho\src lib
  56. 7z a %ZIPNAME% build.paho\src\samples\*.exe
  57. 7z rn %ZIPNAME% build.paho\src\samples bin
  58. if "%PAHO_BUILD_SHARED%" == "TRUE" 7z a %ZIPNAME% "%APPVEYOR_BUILD_FOLDER%\build.paho\src\MQTTVersion.exe"
  59. 7z rn %ZIPNAME% MQTTVersion.exe bin\MQTTVersion.exe
  60. 7z a %ZIPNAME% src\MQTTClient.h src\MQTTAsync.h src\MQTTClientPersistence.h src\MQTTProperties.h src\MQTTReasonCodes.h src\MQTTSubscribeOpts.h src\MQTTExportDeclarations.h
  61. 7z rn %ZIPNAME% src include
  62. 7z a %ZIPNAME% src\samples\*.c
  63. 7z rn %ZIPNAME% src\samples samples
  64. artifacts:
  65. - path: eclipse-paho-mqtt-c-windows.zip
  66. name: paho-mqtt-c
  67. test:
  68. assemblies: build/Testing/*/Test.xml