Skip to content

Commit 6747f67

Browse files
committed
ci: windows: Merge windows VS and mingw images
There's a lot of redundant data in the two images, and the image storage costs are starting to be noticable; so merge these images.
1 parent 6b1b36c commit 6747f67

2 files changed

Lines changed: 5 additions & 45 deletions

File tree

.cirrus.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,7 @@ task:
122122
- env:
123123
PACKERFILE: packer/windows.pkr.hcl
124124
SCRIPTS: scripts/windows*
125-
126-
matrix:
127-
- env:
128-
TASK_NAME: windows-ci-vs-2019
129-
- env:
130-
TASK_NAME: windows-ci-mingw64
125+
TASK_NAME: windows-ci
131126

132127
env:
133128
IMAGE_NAME: ${PREFIX}-${TASK_NAME}
@@ -377,15 +372,15 @@ task:
377372
task:
378373
name: 'Testing VM Image: ${PREFIX}-${IMAGE_NAME}'
379374
env:
380-
IMAGE_NAME: windows-ci-vs-2019
375+
IMAGE_NAME: windows-ci
381376
depends_on:
382377
- vmbuild-${IMAGE_NAME}
383378
compute_engine_instance:
384379
image_project: $GCP_PROJECT
385380
image: family/${PREFIX}-${IMAGE_NAME}
386381
platform: windows
387382

388-
test_script:
383+
test_vs_script:
389384
- ver
390385
- set
391386
- where perl
@@ -395,21 +390,7 @@ task:
395390
- bison --version
396391
- flex --version
397392

398-
399-
task:
400-
name: 'Testing VM Image: ${PREFIX}-${IMAGE_NAME}'
401-
env:
402-
IMAGE_NAME: windows-ci-mingw64
403-
depends_on:
404-
- vmbuild-${IMAGE_NAME}
405-
compute_engine_instance:
406-
image_project: $GCP_PROJECT
407-
image: family/${PREFIX}-${IMAGE_NAME}
408-
platform: windows
409-
410-
test_script:
411-
- ver
412-
- set
393+
test_mingw_script:
413394
- C:\msys64\usr\bin\bash.exe -lc 'where perl'
414395
- C:\msys64\usr\bin\bash.exe -lc 'perl --version'
415396
- C:\msys64\usr\bin\bash.exe -lc 'bison --version'

packer/windows.pkr.hcl

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,9 @@ locals {
2727

2828
windows_gcp_images = [
2929
{
30-
task_name = "windows-ci-vs-2019"
31-
},
32-
{
33-
task_name = "windows-ci-mingw64"
34-
},
35-
{
36-
task_name = "windows_ci_vs_2019"
37-
},
38-
{
39-
task_name = "windows_ci_mingw64"
30+
task_name = "windows-ci"
4031
},
4132
]
42-
43-
only = {
44-
vs_2019 = ["googlecompute.windows-ci-vs-2019"],
45-
mingw64 = ["googlecompute.windows-ci-mingw64"],
46-
}
4733
}
4834

4935
source "googlecompute" "windows" {
@@ -165,13 +151,11 @@ build {
165151
# this could be reduntant
166152
"$env:MSYSTEM = 'UCRT64'",
167153
]
168-
only = local.only.mingw64
169154
}
170155

171156
provisioner "powershell" {
172157
execute_command = var.execute_command
173158
script = "scripts/windows_install_mingw64.ps1"
174-
only = local.only.mingw64
175159
}
176160

177161
# Change default console code page (0) with Windows code page (65001) to get rid of warnings in postgres tests
@@ -181,7 +165,6 @@ build {
181165
"$ErrorActionPreference = 'Stop'",
182166
"chcp 65001"
183167
]
184-
only = local.only.mingw64
185168
}
186169

187170
# MSYS2 might spawn processes that will stay around in the background forever.
@@ -192,27 +175,23 @@ build {
192175
"$ErrorActionPreference = 'Stop'",
193176
"taskkill /F /FI \"MODULES eq msys-2.0.dll\""
194177
]
195-
only = local.only.mingw64
196178
}
197179
### end of mingw installations
198180

199181
### vs-2019 installations
200182
provisioner "powershell" {
201183
execute_command = var.execute_command
202184
script = "scripts/windows_install_winflexbison.ps1"
203-
only = local.only.vs_2019
204185
}
205186

206187
provisioner "powershell" {
207188
execute_command = var.execute_command
208189
script = "scripts/windows_install_pg_deps.ps1"
209-
only = local.only.vs_2019
210190
}
211191

212192
provisioner "powershell" {
213193
execute_command = var.execute_command
214194
script = "scripts/windows_install_vs_2019.ps1"
215-
only = local.only.vs_2019
216195
}
217196
### end of vs-2019 installations
218197
}

0 commit comments

Comments
 (0)