| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
| Subject: | Re: [PATCH] CI: Add a CPAN cache on Windows |
| Date: | 2026-06-05 18:38:11 |
| Message-ID: | mfsypugrm2k2zj4cyskqr5skhro74ugmmmpmntqvjkibndrcpc@bbrmb54q3647 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2026-06-05 11:05:08 -0700, Jacob Champion wrote:
> Based on the conversation at [1].
>
> This caches the Perl site directory after we've installed IPC::Run.
Cool!
Worth noting that while the baseline install time isn't that slow, it does
occasionally take a good bit longer, sometimes it has to retry for quite a few
minutes to download.
> 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.
Makes sense.
> @@ -808,6 +816,8 @@ jobs:
> PG_TEST_USE_UNIX_SOCKETS: 1
> PG_REGRESS_SOCK_DIR: 'd:\pgsock'
> TAR: "c:/windows/system32/tar.exe"
> + CPAN_CACHE_DIRS: |
> + C:\Strawberry\perl\site
In 93d97349461347d952e8cebdf62f5aa84b4bd20a, I kinda had implemented such
caching for macos. There I used
PERL5LIB: ${HOME}/perl5/lib/perl5
to put the cache somewhere under our control. Any reason to not do that?
> - - name: Install dependencies
> + # Rebuild the CPAN cache whenever `perl -V` changes.
> + - name: Compute Perl version cache key
> + id: perlkey
> + shell: 'C:\msys64\usr\bin\bash.exe --login -eo pipefail "{0}"'
> + run: |
> + perl_hash=$(/c/Strawberry/perl/bin/perl -V | md5sum | cut -f1 -d ' ')
> + echo "key=perl${perl_hash}" >> "$GITHUB_OUTPUT"
Hm. It'd be nicer if we didn't have to repeat this part between the two
tasks... Perhaps we can make it work using the small overlap between the
different shells?
Or maybe shell: bash would actually work well enough between the tasks (without
-- login it might not overwrite PATH).
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-06-05 18:44:51 | Re: Fix bug of CHECK constraint enforceability recursion |
| Previous Message | Baji Shaik | 2026-06-05 18:35:25 | Re: [PATCH] Use ssup_datum_*_cmp for int2, oid, and oid8 sort support |