Skip to content

Add CI for Visual Studio

Chun-wei Fan requested to merge msvc-ci into main

Hi,

This attempts to add CI for Visual Studio (2017, x64) builds for librsvg where the process is a little bit more involved, where we:

  • Build GdkPixbuf first, which will build GLib and its deps, along with libpng and zlib and libjpeg-turbo in the process, using Meson.
  • Then download rustup-init.exe, and download and build and install pkg-config (implicit dep on building librsvg; NMake Makefile builds for pkg-config hard-depends on GLib, I think I will try to fix that soon), FreeType and libxml2 (vanilla sources), using Meson (FreeType) and the provided NMake Makefiles (libxml2, pkg-config). The FreeType builds need to carried out before building Pango as Cairo is pulled in with the Pango builds, which did not properly allow us to not build FontConfig out-of-the-box [1], and building FreeType as a subproject when building Pango will cause build failures as there are circular deps between HarfBuzz and FreeType.
  • Then build Pango, which will build Cairo, pulling in FontConfig for now[1], which is again a source of grief as currently the CI system does not like how FontConfig is attempting to symlink stuff during install. Thus, this is where we are stuck now, which is outside of our controls.
  • Use the downloaded rustup-init.exe to install the Rust stable-x86_64-pc-windows-msvc toolchain in order to build librsvg.
  • Finally, build librsvg using the NMake Makefiles, with the prefix and items pointed to the previous build and runtime dependencies.

Builds currently will depend on !824 (merged) and !825 (merged) to pass at least (the latest pipeline logs may indicate some more things being needed, not too sure about those), so librsvg builds are allowed to fail for now. Ideally, the upstream Cairo MR [1] is really needed as well, as IMO we really want builds without FontConfig to work.

For now, this does not attempt to run the librsvg C/Rust test programs, due to dependent MRs.

With blessings, thank you!

[1]: Issue/MR in upstream Cairo: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/469

Edited by Chun-wei Fan

Merge request reports