How to build Windows binaries with Gitlab CI

I currently have a small C library and demo program that is a simple command line calculator. The project can be built with cmake.

I made a Gitlab CI file to build the Linux 32 bit and 64 bit version, run the tests, package the artifacts in a zip file and upload it on my website. I am using gitlab.com, I don’t have my own gitlab server.

Now, I would like to do the same with Windows since most people use windows. I would like to build the same software, with possibly MinGW, for various version of windows like: 95, XP, 7, etc.

I searched the internet, but I have a huge pain finding docker images for different windows versions. I know that windows is not a free operating system, so it could be the main reason why I cannot find any images.

I also cannot find any information on how to install the necessary build tools to compile the program since “apt-get” does not exist in Windows.

Another solution could be cross compiling windows application from Linux, but again, I found little information on the subject.

Else, I must manually boot my Win7 installation, clone the repo, build the software, package and ship the file. The problem, is that I would need multiple installation of windows, or multiple computers, if I wanted to build it for different windows versions. The idea behind docker images was to prevent me from doing that.

So does anybody has any information, examples or tutorials that could help me build Windows binaries with gitlab CI?