pgsql: ci: Use setup-msys2 instead of relocating preinstalled msys2

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: ci: Use setup-msys2 instead of relocating preinstalled msys2
Date: 2026-11-06 18:42:15
Message-ID: E1xPOtD-00000000V1j-26dO@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

ci: Use setup-msys2 instead of relocating preinstalled msys2

Previously we relocated the existing install, for performance reasons. However
that has three disadvantages:

1) moving the install and then installing the packages we need is slower than
just creating a new install
2) It hardcodes that D: is the fast drive, but that turns out to depend on the
type of runner used
3) We were not using any caching and therefore downloaded the same files over
and over. We could have added caching in the previous approach too, but
it'd have been extra work.

I previously prototyped handrolling the install, instead of using
msys2/setup-msys2, and that does turn out to be a bit faster, but it doesn't
include caching. By the time we add that, the overall complexity seems like
it'd be too big.

The other alternative would be to generate a downloadable release in the
pg-vm-images repo. That'd likely be even faster.

This removes the explicit use of CHERE_INVOKING as it is implied by using
setup-msys2.

This commit is backpatched to 19 to keep CI between master and 19 the
same. Soon we'll backpatch CI support to regain coverage with lost with
cirrus-ci's shutdown.

Author: Andres Freund <andres(at)anarazel(dot)de>
Co-authored-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Discussion: https://postgr.es/m/a2ejn7lfqolutzz7kozalbhy3bixdrujb4buc3pgbtlk4am2ba@wbv6v7riia33
Discussion: https://postgr.es/m/CAN55FZ1BcWBsWgCCk2GQkYN6tzDxCw2hVK2m3qeiwaNXUnjLVg@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/510512876f97c272b0ca27f3c7fffe9776674701

Modified Files
--------------
.github/workflows/pg-ci.yml | 78 +++++++++++++++++++++------------------------
1 file changed, 36 insertions(+), 42 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2026-11-06 19:42:20 pgsql: doc PG 19 relnotes: adjust commit hash links for recent commits
Previous Message Robert Haas 2026-11-06 17:00:56 Re: pgsql: ci: Enable PCH in mingw cross job