win32-vd_agent/appveyor.yml
Akihiko Odaki f095b40ee7 CI: Build with MSYS2 on AppVeyor
MSYS2 is an alternative build environment.

MSYS2 has the following advantage compared to Microsoft Visual C++
that is already employed on AppVeyor:
- MSYS2 can pack MSI using autotools

MSYS2 has the following disadvantages compared to Microsoft Visual C++:
- MSYS2 cannot run tests because the autotools scripts currently require
  Wine.
- MSYS2 no longer supports UCRT on the 32-bit platform.

MSYS2 has the following advantages compared to Fedora that is already
employed on GitLab CI:
- The build completely fails on Fedora because libpng tries to link
  the __intrinsic_setjmpex function, which is not available.
- MSYS2 can employ UCRT instead of MSVCRT. For details of UCRT and
  MSVCRT, see: https://www.msys2.org/docs/environments/#msvcrt-vs-ucrt
  Fedora

MSYS2 has the following disadvantage compared to Fedora:
- MSYS2 cannot run tests.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
2025-03-04 14:13:18 +09:00

68 lines
1.7 KiB
YAML

configuration: Release
image: Visual Studio 2019
cache: c:\Tools\vcpkg\installed\
environment:
BASH: C:\msys64\usr\bin\bash
CHERE_INVOKING: yes
VCPKG_ROOT: c:\Tools\vcpkg
install:
- git submodule update --init --recursive
- mkdir build32
- mkdir build64
- choco install --timeout 600 -y imagemagick
- '%BASH% -l msys2\install.sh'
- refreshenv
- cd %VCPKG_ROOT%
- vcpkg install libpng:x64-windows-static libpng:x86-windows-static
build_script:
- set CTEST_OUTPUT_ON_FAILURE=1
- cd %APPVEYOR_BUILD_FOLDER%
- '%BASH% -lc "autoreconf -i"'
- set MSYSTEM=MINGW32
- '%BASH% -l msys2\build.sh buildmingw32'
- set MSYSTEM=UCRT64
- '%BASH% -l msys2\build.sh builducrt64'
- cd %APPVEYOR_BUILD_FOLDER%\build64
- cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -A x64 -DVCPKG_TARGET_TRIPLET=x64-windows-static ..
- cmake --build . --config Release
- cmake --build . --config Release --target check
- cd %APPVEYOR_BUILD_FOLDER%\build32
- cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -A Win32 -DVCPKG_TARGET_TRIPLET=x86-windows-static ..
- cmake --build . --config Release
- cmake --build . --config Release --target check
after_build:
- cd %APPVEYOR_BUILD_FOLDER%\build64
- del Release\test*
- del Release\imagetest*
- 7z a vdagent-win-x64.zip Release\*
- cd %APPVEYOR_BUILD_FOLDER%\build32
- del Release\test*
- del Release\imagetest*
- 7z a vdagent-win-x86.zip Release\*
artifacts:
- path: buildmingw32/spice-vdagent-x86-*.msi
name: VdAgentWin-mingw32
- path: builducrt64/spice-vdagent-x64-*.msi
name: VdAgentWin-ucrt64
- path: build64/vdagent-win-x64.zip
name: VdAgentWin-x64
- path: build32/vdagent-win-x86.zip
name: VdAgentWin-x86