Closed mmatuska closed 5 years ago
Have you tried to use Dockerfile as CI environment feature?
@fkorotkov I have tested it and created three docker images:
cirrus-ci-community/91e796765d3cd0e5f512859b72a9bcdc contains Visual Studio 2017 community and cmake and runs like a charm
cirrus-ci-community/5c4258d852b9682c008df118501c21f2 contains MinGW and cmake - runs extremely slow, much slower than the base image with installing MinGW and cmake afterwards. It is not possible to finish in 60 minutes. It is about 3 times slower.
cirrus-ci-community/f4483e0b1f975e53612a30c392f28b4d contains Cygwin, runs extremely slow as well. If I take just the base image, install cygwin and run it is about 3 times faster
@mmatuska wow, nice! Can you share Dockerfile
s for them or even create a PR with them? I'll test them and then we can pre-cache them on Cirrus. 😍
@fkorotkov thank you for including the image. I was also thinking about an MSYS2 and eventually Cygwin environment images. The difference here is that it would be great if they could be started with their respective bash shells instead of cmd or powershell. How can that be done?
In Cygwin you launch the shell from cmd with
C:\tools\cygwin\bin\bash.exe --login -c "user_script"
The problem here is that you don't start in the working directory where you checked out the git source with the windows git from your base image. To do that you need the following command form:
C:\tools\cygwin\bin\bash.exe --login -c "cd '%cd%'; user_script"
On MSYS2 this is very similar:
set MSYSTEM=MSYS
C:\tools\msys64\usr\bin\bash\bash.exe --login -c "cd '%cd%'; user_script"
@mmatuska just rebuilt VMs so now they have updated cirrus/*
containers pre-cached. Which means the following now works:
windows_container:
image: cirrusci/windowsservercore:cmake
os_version: 2019
CIRRUS_SHELL
might help with the shell issues for Cygwin and MSYS2. The caveat here is that Cirrus will still generate a batch-like script. Please create a separate issue in https://github.com/cirruslabs/cirrus-ci-docs so we can follow up on it (to make sure agent will generate Bash script if CIRRUS_SHELL
point to Bash on Windows).
Closing this issue since now there is cirrusci/windowsservercore:cmake
image
Would it be possible to create an additional image with a basic C build environment for community projects?
Visual Studio 2017 takes 9 minutes to download and install, MinGW about 3 minutes.
Are custom images possible?