Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14d63dd

Browse filesBrowse files
committed
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
1 parent 8ad51b5 commit 14d63dd
Copy full SHA for 14d63dd

File tree

3 files changed

+19
-6
lines changed
Filter options

3 files changed

+19
-6
lines changed

‎.cirrus.yml

Copy file name to clipboardExpand all lines: .cirrus.yml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ task:
407407
name: macOS - Monterey - Meson
408408

409409
env:
410-
CPUS: 12 # always get that much for cirrusci macOS instances
410+
CPUS: 4 # always get that much for cirrusci macOS instances
411411
BUILD_JOBS: $CPUS
412412
# Test performance regresses noticably when using all cores. 8 seems to
413413
# work OK. See
@@ -428,8 +428,8 @@ task:
428428
depends_on: SanityCheck
429429
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
430430

431-
osx_instance:
432-
image: monterey-base
431+
macos_instance:
432+
image: ghcr.io/cirruslabs/macos-monterey-base:latest
433433

434434
sysinfo_script: |
435435
id
@@ -475,7 +475,7 @@ task:
475475
ccache_cache:
476476
folder: $CCACHE_DIR
477477
configure_script: |
478-
brewpath="/usr/local"
478+
brewpath="/opt/homebrew"
479479
PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}"
480480
481481
for pkg in icu4c krb5 openldap openssl zstd ; do

‎src/test/kerberos/t/001_auth.pl

Copy file name to clipboardExpand all lines: src/test/kerberos/t/001_auth.pl
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@
3232

3333
my ($krb5_bin_dir, $krb5_sbin_dir);
3434

35-
if ($^O eq 'darwin')
35+
if ($^O eq 'darwin' && -d "/opt/homebrew" )
3636
{
37+
# typical paths for Homebrew on ARM
38+
$krb5_bin_dir = '/opt/homebrew/opt/krb5/bin';
39+
$krb5_sbin_dir = '/opt/homebrew/opt/krb5/sbin';
40+
}
41+
elsif ($^O eq 'darwin')
42+
{
43+
# typical paths for Homebrew on Intel
3744
$krb5_bin_dir = '/usr/local/opt/krb5/bin';
3845
$krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
3946
}

‎src/test/ldap/t/001_auth.pl

Copy file name to clipboardExpand all lines: src/test/ldap/t/001_auth.pl
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@
2121
{
2222
plan skip_all => 'Potentially unsafe test LDAP not enabled in PG_TEST_EXTRA';
2323
}
24+
elsif ($^O eq 'darwin' && -d '/opt/homebrew/opt/openldap')
25+
{
26+
# typical paths for Homebrew on ARM
27+
$slapd = '/opt/homebrew/opt/openldap/libexec/slapd';
28+
$ldap_schema_dir = '/opt/homebrew/etc/openldap/schema';
29+
}
2430
elsif ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
2531
{
26-
# typical paths for Homebrew
32+
# typical paths for Homebrew on Intel
2733
$slapd = '/usr/local/opt/openldap/libexec/slapd';
2834
$ldap_schema_dir = '/usr/local/etc/openldap/schema';
2935
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.