1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

ci: Change macOS builds from Intel to ARM.

Cirrus is about to shut down its macOS-on-Intel support, so it's time to
move our CI testing over to ARM instances.  The Homebrew package manager
changed its default installation prefix for the new architecture, so a
couple of tests need tweaks to find binaries.

Back-patch to 15, where in-tree CI began.

Author: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20221122225744.GF11463%40telsasoft.com
This commit is contained in:
Thomas Munro
2023-01-01 10:45:18 +13:00
parent 8ad51b5f44
commit 14d63dd252
3 changed files with 19 additions and 6 deletions

View File

@ -32,8 +32,15 @@ elsif ($ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
my ($krb5_bin_dir, $krb5_sbin_dir);
if ($^O eq 'darwin')
if ($^O eq 'darwin' && -d "/opt/homebrew" )
{
# typical paths for Homebrew on ARM
$krb5_bin_dir = '/opt/homebrew/opt/krb5/bin';
$krb5_sbin_dir = '/opt/homebrew/opt/krb5/sbin';
}
elsif ($^O eq 'darwin')
{
# typical paths for Homebrew on Intel
$krb5_bin_dir = '/usr/local/opt/krb5/bin';
$krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
}

View File

@ -21,9 +21,15 @@ elsif ($ENV{PG_TEST_EXTRA} !~ /\bldap\b/)
{
plan skip_all => 'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
}
elsif ($^O eq 'darwin' && -d '/opt/homebrew/opt/openldap')
{
# typical paths for Homebrew on ARM
$slapd = '/opt/homebrew/opt/openldap/libexec/slapd';
$ldap_schema_dir = '/opt/homebrew/etc/openldap/schema';
}
elsif ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
{
# typical paths for Homebrew
# typical paths for Homebrew on Intel
$slapd = '/usr/local/opt/openldap/libexec/slapd';
$ldap_schema_dir = '/usr/local/etc/openldap/schema';
}