Hi,

On Fri, 6 Jun 2025 at 08:30, Peter Eisentraut <[email protected]> wrote:
>
> On 05.06.25 12:42, Thomas Munro wrote:
> > I think on your C11 thread I might have been confused about that,
> > since there was an implication that 2019 might support <stdatomic.h>,
> > but it looks like 2019 added language stuff while 2022 added the
> > library stuff.  But yeah, given your proposal that MSVC 2019 should be
> > our new minimum target on that platform, I wonder if we should have
> > both available in CI somehow...
>
> It would be useful to have a leading and a trailing edge CI system for
> every OS family.  For example, say, Ubuntu 25.04 and RHEL 7, and VS 201x
> and VS 202y.  Because as we are seeing here, sometimes you're more
> concerned about breaking the old one, and sometimes you're more
> interested in using a feature on the new one.  Maybe one of the two
> could be manually triggered to save on resources.

I have a PR [1] for installing both VS 2022 and VS 2019 to the Windows
CI image. And here is the patch for enabling both VS 2022 and VS 2019
Windows CI tasks. Since VS 2022 is the newer one, I made it triggered
automatically. VS 2019 task is manually triggered now.

Tasks have short names to select them and the 'Windows VS 2019' task's
name was 'windows'  (i.e: ci-os-only: windows) but since we have two
Windows tasks now; we need to have different names for VS 2019 and VS
2022 tasks. To preserve the same behavior, VS 2022 task uses 'windows'
but VS 2019 is renamed to 'vs2019' (i.e: ci-os-only: vs2019). I am not
completely convinced about this naming, I am open to suggestions.

Notes: This new Windows CI image is not used for now, it will be used
when this PR [1] is merged. So,

1- To test these changes, you need to apply 0001. 0001 forces CI to
use the Windows CI image with both VS versions installed. 0001 should
not be committed.

2- To avoid confusions, 0002 patch needs to be committed immediately
after 'the PR [1] is merged and the new Windows CI image is
generated'.

Example CI task after the PR is merged and 0002 is committed:
https://cirrus-ci.com/build/5976334188412928 (I manually triggered the
VS 2019 task, it will not be run automatically after the 0002 is
committed).

[1] https://github.com/anarazel/pg-vm-images/pull/116

-- 
Regards,
Nazir Bilal Yavuz
Microsoft
From 9eceff42445a753182c80985a7d89b445d30383c Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <[email protected]>
Date: Thu, 4 Sep 2025 14:47:04 +0300
Subject: [PATCH v2 1/2] Force using Windows CI image with both VS versions
 installed

This patch should not be committed, only for testing!
---
 .cirrus.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.cirrus.yml b/.cirrus.yml
index 3f75852e84e..87085266ec2 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -74,7 +74,12 @@ default_openbsd_task_template: &openbsd_task_template
 default_windows_task_template: &windows_task_template
   env:
     PLATFORM: windows
-  <<: *cirrus_community_vm_template
+  compute_engine_instance:
+    image_project: pg-ci-images-dev
+    image: pg-ci-windows-ci-2025-09-08t07-40-48
+    platform: $PLATFORM
+    cpu: $CPUS
+    disk: $DISK_SIZE
 
 
 # macos workers provided by cirrus-ci
-- 
2.51.0

From 0864e225c62f48eae2201573d40cff026c6b470e Mon Sep 17 00:00:00 2001
From: Nazir Bilal Yavuz <[email protected]>
Date: Thu, 4 Sep 2025 17:20:18 +0300
Subject: [PATCH v2 2/2] ci: windows: Default to VS 2022, run VS 2019 task
 manually

Both VS 2019 and VS 2022 are available on the Windows image [1], but
since VS 2022 is the latest version, make it the default. The VS 2019
task is still available but must be triggered manually.

[1] https://github.com/anarazel/pg-vm-images/pull/116

Author: Nazir Bilal Yavuz <[email protected]>
Discussion: https://postgr.es/m/flat/can55fz1osam+852bmqdj+kgfg+07knj6dm3pjbgbtyak4qw...@mail.gmail.com
---
 .cirrus.star      |  3 ++-
 .cirrus.tasks.yml | 14 ++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/.cirrus.star b/.cirrus.star
index e9bb672b959..cecd9bb026c 100644
--- a/.cirrus.star
+++ b/.cirrus.star
@@ -73,7 +73,7 @@ def compute_environment_vars():
     # REPO_CI_AUTOMATIC_TRIGGER_TASKS="task_name other_task" under "Repository
     # Settings" on Cirrus CI's website.
 
-    default_manual_trigger_tasks = ['mingw', 'netbsd', 'openbsd']
+    default_manual_trigger_tasks = ['mingw', 'netbsd', 'openbsd', 'vs2019']
 
     repo_ci_automatic_trigger_tasks = env.get('REPO_CI_AUTOMATIC_TRIGGER_TASKS', '')
     for task in default_manual_trigger_tasks:
@@ -103,6 +103,7 @@ def compute_environment_vars():
       'netbsd',
       'openbsd',
       'sanitycheck',
+      'vs2019',
       'windows',
     ]
     commit_message = env.get('CIRRUS_CHANGE_MESSAGE')
diff --git a/.cirrus.tasks.yml b/.cirrus.tasks.yml
index eca9d62fc22..07e32b588ea 100644
--- a/.cirrus.tasks.yml
+++ b/.cirrus.tasks.yml
@@ -752,7 +752,6 @@ WINDOWS_ENVIRONMENT_BASE: &WINDOWS_ENVIRONMENT_BASE
 
 
 task:
-  name: Windows - Server 2019, VS 2019 - Meson & ninja
   << : *WINDOWS_ENVIRONMENT_BASE
 
   env:
@@ -775,10 +774,21 @@ task:
       -Dplperl=enabled
       -Dplpython=enabled
 
+  matrix:
+    - name: Windows - Server 2022, VS 2019 - Meson & ninja
+      env:
+        # Use VS 2019
+        PATH: C:\VS_2019\VC\Auxiliary\Build;${PATH}
+      trigger_type: $CI_TRIGGER_TYPE_VS2019
+      only_if: $CI_VS2019_ENABLED
+
+    # VS 2022 is the default VS installation
+    - name: Windows - Server 2022, VS 2022 - Meson & ninja
+      only_if: $CI_WINDOWS_ENABLED
+
   <<: *windows_task_template
 
   depends_on: SanityCheck
-  only_if: $CI_WINDOWS_ENABLED
 
   setup_additional_packages_script: |
     REM choco install -y --no-progress ...
-- 
2.51.0

Reply via email to