1 version: 3.0.0-{build} 2 3 # Only download the 50 first commits like travis to speedup clone 4 clone_depth: 50 5 6 os: Visual Studio 2015 7 8 init: 9 # Disable popups as they hang the build as there is nobody to click on the OK button... 10 # Hanging the build is a lot less user friendly than reporting a build failure. 11 # 12 # Disable of system hard error popup 13 # See: https://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx 14 - reg add "HKLM\SYSTEM\CurrentControlSet\Control\Windows" /f /v ErrorMode /d 2 15 # Disable the following popup on program failure: 16 # | ** <program name> has stopped working ** | 17 # | Windows can check online for a solution to the problem| 18 # | - Check online for a solution and close the program | 19 # | - Close the program | 20 # See: https://msdn.microsoft.com/en-us/library/bb513638%28VS.85%29.aspx 21 - reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /f /v DontShowUI /d 1 22 23 # Instruct cmake were to find external dependencies 24 - set PREFIX_PATH=%APPVEYOR_BUILD_FOLDER%\asio-1.10.6;%APPVEYOR_BUILD_FOLDER%\catch 25 # Tell CMake where to install 26 - set INSTALL=%HOMEPATH%\install 27 # legacy functional tests are bash specific 28 - set CTEST_PARAMS=--output-on-failure 29 30 install: 31 - cinst cmake.portable wget 7zip.commandline 32 # Install Windows Installer XML (WiX) to create installer with cpack 33 - cinst wixtoolset 34 35 # Download and install external dependancy if they are not in the cache 36 - if not exist libxml2-x86_64 ( 37 wget --no-check-certificate https://01.org/sites/default/files/libxml2-x86_64-3eaedba1b64180668fdab7ad2eba549586017bf3.zip && 38 7z x libxml2-x86_64-3eaedba1b64180668fdab7ad2eba549586017bf3.zip) 39 - if not exist libxml2-x86_64-debug ( 40 wget --no-check-certificate https://01.org/sites/default/files/libxml2-x86_64-debug-3eaedba1b64180668fdab7ad2eba549586017bf3.zip && 41 7z x libxml2-x86_64-debug-3eaedba1b64180668fdab7ad2eba549586017bf3.zip) 42 - if not exist asio-1.10.6 ( 43 wget --no-check-certificate https://01.org/sites/default/files/asio-1.10.6.tar.gz && 44 7z x asio-1.10.6.tar.gz && 45 7z x -i"!asio*/include" asio-1.10.6.tar) 46 # This version of catch is known to work. 47 - if not exist catch ( 48 wget --no-check-certificate https://raw.github.com/philsquared/Catch/v1.2.1/single_include/catch.hpp --directory-prefix catch ) 49 - set DEBUG_LIBXML2_PATH=%APPVEYOR_BUILD_FOLDER%\libxml2-x86_64-debug 50 - set RELEASE_LIBXML2_PATH=%APPVEYOR_BUILD_FOLDER%\libxml2-x86_64 51 52 # Setup Visual studio build environement 53 - '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64' 54 55 cache: 56 - C:\ProgramData\chocolatey\bin -> appveyor.yml 57 - C:\ProgramData\chocolatey\lib -> appveyor.yml 58 - libxml2-x86_64 -> appveyor.yml 59 - libxml2-x86_64-debug -> appveyor.yml 60 - asio-1.10.6 -> appveyor.yml 61 - catch -> appveyor.yml 62 63 build_script: 64 - mkdir build && cd build 65 66 - mkdir 64bits-debug && cd 64bits-debug 67 # Add debug libxml2.dll in the path so that tests can find it 68 - set TEST_PATH=%DEBUG_LIBXML2_PATH%\bin 69 - cmake -G "NMake Makefiles" -DPYTHON_BINDINGS=OFF -DCMAKE_PREFIX_PATH="%PREFIX_PATH%;%DEBUG_LIBXML2_PATH%" ..\.. 70 - cmake --build . --config debug 71 - ctest --build-config debug %CTEST_PARAMS% 72 - cd .. 73 74 - mkdir 64bits-release & cd 64bits-release 75 # Add debug libxml2.dll in the path so that tests can find it 76 - set TEST_PATH=%RELEASE_LIBXML2_PATH%\bin 77 - cmake -G "Visual Studio 14 2015 Win64" -DPYTHON_BINDINGS=OFF -DCMAKE_PREFIX_PATH="%PREFIX_PATH%;%RELEASE_LIBXML2_PATH%" -DCMAKE_INSTALL_PREFIX=%INSTALL% ..\.. 78 # Build, test and install 79 - cmake --build . --config release 80 - ctest --build-config release %CTEST_PARAMS% 81 - cmake --build . --config release --target install 82 - cpack --verbose -G WIX 83 - cd .. 84 85 # build and test the skeleton plugin against the previously-installed build; this serves as a smoke test of the whole stack 86 - mkdir skeleton && cd skeleton 87 # %INSTALL%\lib is where the skeleton plugin is installed (see comment below) 88 # %INSTALL%\bin is where parameter.dll is installed 89 # Also add the path where the release libxml2.dll has been extracted 90 - set TEST_PATH=%RELEASE_LIBXML2_PATH%\bin;%INSTALL%\lib;%INSTALL%\bin 91 - cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL% -DCMAKE_PREFIX_PATH=%INSTALL% %APPVEYOR_BUILD_FOLDER%\skeleton-subsystem 92 # Unfortunately, the skeleton test currently doesn't work on 93 # multi-configuration build systems (Visual Studio is one of those) without 94 # installing the plugin 95 - cmake --build . --config release --target install 96 - ctest --build-config release %CTEST_PARAMS% 97 - cd .. 98