[PATCH] CI: Add a CPAN cache on Windows - Mailing list pgsql-hackers

From Jacob Champion
Subject [PATCH] CI: Add a CPAN cache on Windows
Date
Msg-id CAOYmi+mC8_ZW3A1vGZHMDiW+vCMHQNga4jb9jawHn=LauwL6xQ@mail.gmail.com
Whole thread
Responses Re: [PATCH] CI: Add a CPAN cache on Windows
List pgsql-hackers
Based on the conversation at [1].

This caches the Perl site directory after we've installed IPC::Run.
After consulting with Christoph Berg and David Wheeler on the Discord,
I've set up the cache to key on the output of `perl -V`, so that we'll
rebuild it after any change to Perl underneath us.

I went back and forth on doing the bare minimum (just save off the
CPAN source+build caches, then run CPAN each time) vs the more
involved strategy presented here (don't use CPAN at all on a cache
hit). The simpler approach only saved us about half of the up-to-60s
installation delay, because I can't seem to get CPAN to skip the
installation if IPC::Run is already installed.

So this patch is more code, but it's a lot faster once the cache is
warm. (The cache is also much smaller, as a minor bonus, but it was
only ~3MB to start with.)

--Jacob

[1] https://postgr.es/m/CAOYmi%2BkyuJHC7NTJWbzLBX25QnCsMVDbYWmv5tveSveNUyBAUw%40mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: postgres_fdw: Emit message when batch_size is reduced
Next
From: Bruce Momjian
Date:
Subject: Re: First draft of PG 19 release notes