appveyor.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. version: '{build}'
  2. clone_folder: c:\projects\open62541
  3. clone_depth: 20
  4. environment:
  5. global:
  6. CYG_ARCH: x86
  7. CYG_ROOT: C:/cygwin
  8. CYG_SETUP_URL: http://cygwin.com/setup-x86.exe
  9. CYG_MIRROR: http://cygwin.mirror.constant.com
  10. CYG_CACHE: C:\cygwin\var\cache\setup
  11. CYG_BASH: C:/cygwin/bin/bash
  12. matrix:
  13. - CC_NAME: MinGW Makefiles
  14. CC_SHORTNAME: mingw
  15. MAKE: mingw32-make
  16. FORCE_CXX: OFF
  17. # - CC_NAME: Visual Studio 9 2008
  18. # CC_SHORTNAME: vs2008
  19. # # Do not use multicore switch (/m), it causes appveyor to randomly fail
  20. # MAKE: msbuild open62541.sln
  21. # FORCE_CXX: ON
  22. - CC_NAME: Visual Studio 12 2013
  23. CC_SHORTNAME: vs2013
  24. # Do not use multicore switch (/m), it causes appveyor to randomly fail
  25. MAKE: msbuild open62541.sln
  26. FORCE_CXX: OFF
  27. - CC_NAME: Visual Studio 12 2013 Win64
  28. CC_SHORTNAME: vs2013-x64
  29. # Do not use multicore switch (/m), it causes appveyor to randomly fail
  30. MAKE: msbuild open62541.sln
  31. FORCE_CXX: OFF
  32. cache:
  33. - '%CYG_CACHE%'
  34. init:
  35. - git config --global core.autocrlf input # Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
  36. # Install needed build dependencies
  37. install:
  38. - if not exist "%CYG_ROOT%" mkdir "%CYG_ROOT%"
  39. - ps: echo "Installing Cygwin from $env:CYG_SETUP_URL to $env:CYG_ROOT/setup-x86.exe"
  40. - appveyor DownloadFile %CYG_SETUP_URL% -FileName %CYG_ROOT%/setup-x86.exe
  41. - ps: echo "Downloaded. Now ready to install."
  42. - cmd: '"%CYG_ROOT%/setup-x86.exe" --quiet-mode --no-shortcuts --only-site -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" --packages cmake,python'
  43. - cmd: '%CYG_BASH% -lc "cygcheck -dc cygwin"'
  44. before_build:
  45. # Workaround for CMake not wanting sh.exe on PATH for MinGW
  46. - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
  47. - set PATH=C:\MinGW\bin;%PATH%
  48. build_script:
  49. - cd c:\projects\open62541
  50. - md build
  51. - cd build
  52. - echo "Testing %CC_NAME%"
  53. - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -G"%CC_NAME%" ..
  54. - '%MAKE%'
  55. - cd ..
  56. - rd /s /q build
  57. - md build
  58. - cd build
  59. - echo "Testing %CC_NAME% with amalgamation"
  60. - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DBUILD_SHARED_LIBS:BOOL=OFF -G"%CC_NAME%" ..
  61. - '%MAKE%'
  62. - 7z a -tzip open62541-%CC_SHORTNAME%-static.zip %APPVEYOR_BUILD_FOLDER%\build\*
  63. - move open62541-%CC_SHORTNAME%-static.zip %APPVEYOR_BUILD_FOLDER%
  64. - cd ..
  65. - rd /s /q build
  66. - md build
  67. - cd build
  68. - echo "Testing %CC_NAME% with amalgamation and .dll"
  69. - cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -DUA_COMPILE_AS_CXX:BOOL=%FORCE_CXX% -DBUILD_SHARED_LIBS:BOOL=ON -G"%CC_NAME%" ..
  70. - '%MAKE%'
  71. - 7z a -tzip open62541-%CC_SHORTNAME%-dynamic.zip %APPVEYOR_BUILD_FOLDER%\build\*
  72. - move open62541-%CC_SHORTNAME%-dynamic.zip %APPVEYOR_BUILD_FOLDER%
  73. - cd ..
  74. after_build:
  75. - appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\open62541-%CC_SHORTNAME%-static.zip
  76. - appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\open62541-%CC_SHORTNAME%-dynamic.zip