Skip to content

Commit 06a8bb6

Browse files
committed
chore: wip
1 parent caaa0e4 commit 06a8bb6

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/precompile-binaries.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,10 @@ jobs:
269269
export LDFLAGS="$LDFLAGS -L$(brew --prefix readline)/lib"
270270
export LIBS="$LIBS -lreadline"
271271
272-
# Set PostgreSQL environment variables
272+
# Set PostgreSQL environment variables and PATH
273273
export PGSQL_CFLAGS="-I$(brew --prefix postgresql@15)/include"
274274
export PGSQL_LIBS="-L$(brew --prefix postgresql@15)/lib -lpq"
275+
export PATH="$(brew --prefix postgresql@15)/bin:$PATH"
275276
276277
# Set bzip2 environment variables
277278
export BZIP2_CFLAGS="-I$(brew --prefix bzip2)/include"
@@ -286,6 +287,16 @@ jobs:
286287
echo "readline.h not found, disabling readline support"
287288
EXTRA_CONFIG="--with-iconv=$(brew --prefix libiconv) --disable-readline"
288289
fi
290+
291+
# Check if PostgreSQL is available and working
292+
if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@15)/include/libpq-fe.h" ]]; then
293+
echo "PostgreSQL found and working"
294+
else
295+
echo "PostgreSQL not found or not working, will disable PostgreSQL support"
296+
# Remove PostgreSQL extensions from CONFIGURE_EXTENSIONS
297+
export CONFIGURE_EXTENSIONS=$(echo "$CONFIGURE_EXTENSIONS" | sed 's/--with-pdo-pgsql//g' | sed 's/--with-pgsql//g' | sed 's/ */ /g')
298+
echo "Updated CONFIGURE_EXTENSIONS: $CONFIGURE_EXTENSIONS"
299+
fi
289300
else
290301
# On Linux, use system-installed libraries
291302
# System libraries should be available via apt-get installation
@@ -307,6 +318,16 @@ jobs:
307318
echo " LDFLAGS: $LDFLAGS"
308319
echo " Checking if readline.h exists:"
309320
find $(brew --prefix) -name "readline.h" 2>/dev/null || echo " No readline.h found"
321+
322+
echo "Debug: Checking PostgreSQL installation on macOS:"
323+
echo " PGSQL_CFLAGS: $PGSQL_CFLAGS"
324+
echo " PGSQL_LIBS: $PGSQL_LIBS"
325+
echo " PATH: $PATH"
326+
echo " Checking if pg_config is available:"
327+
which pg_config || echo " pg_config not found in PATH"
328+
pg_config --version 2>/dev/null || echo " pg_config version check failed"
329+
echo " Checking if libpq-fe.h exists:"
330+
find $(brew --prefix) -name "libpq-fe.h" 2>/dev/null || echo " No libpq-fe.h found"
310331
fi
311332
312333
# Check if libcurl is found via pkg-config

0 commit comments

Comments
 (0)