Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
ci: Use windows VMs instead of windows containers
authorAndres Freund <andres@anarazel.de>
Fri, 3 Feb 2023 05:31:48 +0000 (21:31 -0800)
committerAndres Freund <andres@anarazel.de>
Fri, 3 Feb 2023 05:31:48 +0000 (21:31 -0800)
So far we have used containers for testing windows on cirrus-ci. Unfortunately
they come with substantial overhead: First, the container images are pulled
onto the host on-demand. Due to the large size of windows containers, that
ends up taking nearly 4 minutes. Secondly, IO is slow, leading to CI runs
taking long.

Thus switch to windows VMs, improving windows CI times by well over 2x.

Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/211afb88-6df6-b74d-f1b7-84b5f21ad875@gmail.com
Backpatch: 15-, where CI was added

.cirrus.yml

index 3bd806b01831caf5e91ccb61d2596f8ea05d6634..f0d1b3ec9e908f3a8b8bcd15df5feaeb690f5052 100644 (file)
@@ -400,8 +400,10 @@ task:
 
   only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
 
-  windows_container:
-    image: $CONTAINER_REPO/windows_ci_vs_2019:latest
+  compute_engine_instance:
+    image_project: $IMAGE_PROJECT
+    image: family/pg-ci-windows-ci-vs-2019
+    platform: windows
     cpu: $CPUS
     memory: 4G