1version: 3.0.0-{build} 2 3# Only download the 50 first commits like travis to speedup clone 4clone_depth: 50 5 6os: Visual Studio 2015 7 8init: 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 30install: 31 - cinst cmake.portable wget 7zip.commandline 32 # Install Windows Installer XML (WiX) to create installer with cpack 33 # This package is currently broken because of a missing checksum. Since we 34 # are not distributing the packages, we don't care about that and can 35 # override the checksum: 36 - choco feature enable -n allowEmptyChecksums 37 - cinst wixtoolset 38 39 # Download and install external dependency if they are not in the cache 40 - if not exist libxml2-x86_64 ( 41 wget --no-check-certificate https://01.org/sites/default/files/libxml2-x86_64-3eaedba1b64180668fdab7ad2eba549586017bf3.zip && 42 7z x libxml2-x86_64-3eaedba1b64180668fdab7ad2eba549586017bf3.zip) 43 - if not exist libxml2-x86_64-debug ( 44 wget --no-check-certificate https://01.org/sites/default/files/libxml2-x86_64-debug-3eaedba1b64180668fdab7ad2eba549586017bf3.zip && 45 7z x libxml2-x86_64-debug-3eaedba1b64180668fdab7ad2eba549586017bf3.zip) 46 - if not exist asio-1.10.6 ( 47 wget --no-check-certificate https://01.org/sites/default/files/asio-1.10.6.tar.gz && 48 7z x asio-1.10.6.tar.gz && 49 7z x -i"!asio*/include" asio-1.10.6.tar) 50 # This version of catch is known to work. 51 - if not exist catch ( 52 wget --no-check-certificate https://raw.github.com/philsquared/Catch/v1.2.1/single_include/catch.hpp --directory-prefix catch ) 53 - set DEBUG_LIBXML2_PATH=%APPVEYOR_BUILD_FOLDER%\libxml2-x86_64-debug 54 - set RELEASE_LIBXML2_PATH=%APPVEYOR_BUILD_FOLDER%\libxml2-x86_64 55 56 # Setup Visual studio build environement 57 - '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64' 58 59cache: 60 - C:\ProgramData\chocolatey\bin -> appveyor.yml 61 - C:\ProgramData\chocolatey\lib -> appveyor.yml 62 - libxml2-x86_64 -> appveyor.yml 63 - libxml2-x86_64-debug -> appveyor.yml 64 - asio-1.10.6 -> appveyor.yml 65 - catch -> appveyor.yml 66 67build_script: 68 - mkdir build && cd build 69 70 - mkdir 64bits-debug && cd 64bits-debug 71 # Add debug libxml2.dll in the path so that tests can find it 72 - set TEST_PATH=%DEBUG_LIBXML2_PATH%\bin 73 - cmake -G "NMake Makefiles" -DPYTHON_BINDINGS=OFF -DCLIENT_SIMULATOR=OFF -DCMAKE_PREFIX_PATH="%PREFIX_PATH%;%DEBUG_LIBXML2_PATH%" ..\.. 74 - cmake --build . --config debug 75 - ctest --build-config debug %CTEST_PARAMS% 76 - cd .. 77 78 - mkdir 64bits-release & cd 64bits-release 79 # Add debug libxml2.dll in the path so that tests can find it 80 - set TEST_PATH=%RELEASE_LIBXML2_PATH%\bin 81 - cmake -G "Visual Studio 14 2015 Win64" -DPYTHON_BINDINGS=OFF -DCLIENT_SIMULATOR=OFF -DCMAKE_PREFIX_PATH="%PREFIX_PATH%;%RELEASE_LIBXML2_PATH%" -DCMAKE_INSTALL_PREFIX=%INSTALL% ..\.. 82 # Build, test and install 83 - cmake --build . --config release 84 - ctest --build-config release %CTEST_PARAMS% 85 - cmake --build . --config release --target install 86 - cpack --verbose -G WIX 87 - cd .. 88 89 # build and test the skeleton plugin against the previously-installed build; this serves as a smoke test of the whole stack 90 - mkdir skeleton && cd skeleton 91 # %INSTALL%\lib is where the skeleton plugin is installed (see comment below) 92 # %INSTALL%\bin is where parameter.dll is installed 93 # Also add the path where the release libxml2.dll has been extracted 94 - set TEST_PATH=%RELEASE_LIBXML2_PATH%\bin;%INSTALL%\lib;%INSTALL%\bin 95 - cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL% -DCMAKE_PREFIX_PATH="%INSTALL%;%RELEASE_LIBXML2_PATH%" %APPVEYOR_BUILD_FOLDER%\skeleton-subsystem 96 # Unfortunately, the skeleton test currently doesn't work on 97 # multi-configuration build systems (Visual Studio is one of those) without 98 # installing the plugin 99 - cmake --build . --config release --target install 100 - ctest --build-config release %CTEST_PARAMS% 101 - cd .. 102