Cygwin build environment setup

Hi all!

I’m trying to add a Cygwin build to the project I maintain (
So far I am failing to understand how to do it. I’m a Linux person and don’t usually deal much with Windows, so I may be missing some basic things, but I couldn’t find any documentation on how to set up the .travis.yml file for Cygwin-based build with all the packages I need.

I’ve added to the before-install script a call to setup-x86.exe with all the required packages, but they don’t seem to be installed although the call pretends to succeed. The later attempts to invoke any of the programs that must have been installed with the aforementioned packages all result in “command not found” and the ls -R /c/tools/cygwin doesn’t list them either.

What am I doing wrong?

You can see the latest failed job here:

The issue inspiring and tracking the effort is here:

It looks like before_script and script somehow get executed before the before_install has actually finished.

That can clearly be seen in this log:

I was guessing setup-x86.exe fork a windows setup process and return on the console application, so I added a delay 5 minutes to make sure the before_script executed after the installation. However it is still doesn’t work.

Thanks for your help, @doublechiang. I’ve been experimenting with the config for a while, but also failed to figure out a working combination.

Well, in fact I would be happy with any approach to build ipmitool for Windows with TravisCI, not necessarily with Cygwin.

If using msys2 is acceptable, I have a working config which can pass the bootstrap and configure and start to make. However, the compilation is failed at some point. You can check

Thank you so much! This is a huge progress! I’m not a Windows person and have never dealt with msys2 before, so I have no idea why it fails so far (looks like some header is missing), but that’s better to discuss in the ipmitool ticket, I guess.

Anyway, the problems with cygwin are very strange and if anyone has a solution for that, I’d appreciate it.