appveyor.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. version: '{build}'
  2. os: Visual Studio 2015 RC
  3. clone_folder: c:\projects\open62541
  4. clone_depth: 20
  5. environment:
  6. global:
  7. CYG_ARCH: x86
  8. CYG_ROOT: C:/cygwin
  9. CYG_SETUP_URL: http://cygwin.com/setup-x86.exe
  10. CYG_MIRROR: http://cygwin.mirror.constant.com
  11. CYG_CACHE: C:\cygwin\var\cache\setup
  12. CYG_BASH: C:/cygwin/bin/bash
  13. cache:
  14. - '%CYG_CACHE%'
  15. #
  16. # Initialisation prior to pulling the Mono repository
  17. # Attempt to ensure we don't try to convert line endings to Win32 CRLF as this will cause build to fail
  18. #
  19. init:
  20. - git config --global core.autocrlf input
  21. #
  22. # Install needed build dependencies
  23. #
  24. install:
  25. - if not exist "%CYG_ROOT%" mkdir "%CYG_ROOT%"
  26. - ps: echo "Installing Cygwin from $env:CYG_SETUP_URL to $env:CYG_ROOT/setup-x86.exe"
  27. - appveyor DownloadFile %CYG_SETUP_URL% -FileName %CYG_ROOT%/setup-x86.exe
  28. - ps: echo "Downloaded. Now ready to install."
  29. - cmd: '"%CYG_ROOT%/setup-x86.exe" --quiet-mode --no-shortcuts --only-site -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" --packages cmake,gcc-core,make,python'
  30. - cmd: '%CYG_BASH% -lc "cygcheck -dc cygwin"'
  31. before_build:
  32. # Workaround for CMake not wanting sh.exe on PATH for MinGW
  33. - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
  34. - set PATH=C:\MinGW\bin;%PATH%
  35. build_script:
  36. - cd c:\projects\open62541
  37. - md build
  38. - cd build
  39. # cygwin cmake stopped working on 05.07.2016 -- commented out until a fix appears
  40. #- echo "Testing cygwin"
  41. #- '%CYG_BASH% --login -lc "/usr/bin/cmake.exe --version"'
  42. #- '%CYG_BASH% --login -lc "cd /cygdrive/c/projects/open62541/build; cmake -DUA_BUILD_EXAMPLES:BOOL=ON -G\"Unix Makefiles\" .."'
  43. #- '%CYG_BASH% --login -lc "cd /cygdrive/c/projects/open62541/build; make -j"'
  44. - cd ..
  45. - rd /s /q build
  46. - md build
  47. - cd build
  48. - echo "Testing MinGW32"
  49. - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE:BOOL=ON -G"MinGW Makefiles" ..
  50. - mingw32-make
  51. - cd ..
  52. - rd /s /q build
  53. - md build
  54. - cd build
  55. - echo "Testing MinGW32 with amalgamation"
  56. - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -G"MinGW Makefiles" ..
  57. - mingw32-make
  58. - cd ..
  59. - rd /s /q build
  60. - md build
  61. - cd build
  62. - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -G"Visual Studio 12 2013" ..
  63. - msbuild open62541.sln /m
  64. - echo "Testing amalgamation"
  65. - cd ..
  66. - rd /s /q build
  67. - md build
  68. - cd build
  69. - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -G"Visual Studio 12 2013" ..
  70. - msbuild open62541.sln /m
  71. - copy C:\projects\open62541\build\open62541.c C:\projects\open62541\build\Debug\open62541.c
  72. - copy C:\projects\open62541\build\open62541.h C:\projects\open62541\build\Debug\open62541.h
  73. - copy C:\projects\open62541\build\examples\server_cert.der C:\projects\open62541\build\Debug\server_cert.der
  74. - cd ..
  75. - echo "Win 64 build"
  76. - md build64
  77. - cd build64
  78. - cmake -DUA_BUILD_EXAMPLES:BOOL=ON -DUA_BUILD_SELFSIGNED_CERTIFICATE:BOOL=ON -DUA_ENABLE_AMALGAMATION:BOOL=ON -G"Visual Studio 12 2013 Win64" ..
  79. - msbuild open62541.sln /m
  80. - copy C:\projects\open62541\build64\open62541.c C:\projects\open62541\build64\Debug\open62541.c
  81. - copy C:\projects\open62541\build64\open62541.h C:\projects\open62541\build64\Debug\open62541.h
  82. - copy C:\projects\open62541\build64\examples\server_cert.der C:\projects\open62541\build64\Debug\server_cert.der
  83. - cd ..
  84. after_build:
  85. - 7z a open62541-win32.zip %APPVEYOR_BUILD_FOLDER%\build\Debug\* %APPVEYOR_BUILD_FOLDER%\build\examples\Debug\*
  86. - 7z a open62541-win64.zip %APPVEYOR_BUILD_FOLDER%\build64\Debug\* %APPVEYOR_BUILD_FOLDER%\build64\examples\Debug\*
  87. - appveyor PushArtifact open62541-win32.zip
  88. - appveyor PushArtifact open62541-win64.zip