I am trying to get a gitlab CI/CD pipeline going, and I really struggle getting my project built using Windows/Visual Studio 2019.
I notice that VTK has runners using VS 2019. Is there a place where a CI dummy like myself could have a look at the setup for these pipelines (how to create docker images from scratch for Windows, VS, etc) to draw some really needed inspiration from?
We do not use Docker images because, for our use case, Windows Docker images are not sufficient. Of note:
VS requires a specific “dotnetsdk” base image; if you don’t use that, you cannot install VS;
Windows Docker image disk sizes are fixed at creation time;
the base image with VS and Qt installed was 10G+;
filesystem access was sllooooowww and builds took a long time;
no useful OpenGL access, so testing could not happen inside of a Docker image anyways.
We just run on bare metal with VS installed. The runner provides the VS160COMNTOOLS envvar and the CI pulls vcvarsall.bat’s path from that. We also use tags to say exactly what versions of VS are installed and the job adds the relevant tag and tells vcvarsall.bat to load this version instead of whatever the default is.
Thanks @ben.boeckel for this information. I am new to the whole CI/CD and docker thing, and while I found it relatively easy to get everything working under linux, under windows I started scratching my eyes out.
So that’s obviously not the way to get it done; I’ll check my alternatives but it looks like your way is sensible. Thanks for this help, you have saved my many hours of frustration!