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