Skip to content

Commit 0f345b1

Browse files
committed
chore: wip
1 parent 3361683 commit 0f345b1

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/precompile-php.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,26 @@ jobs:
250250
echo "READLINE_CFLAGS=-I$(brew --prefix readline)/include" >> $GITHUB_ENV
251251
echo "READLINE_LIBS=-L$(brew --prefix readline)/lib -lreadline" >> $GITHUB_ENV
252252
253+
# Check if PostgreSQL is available and working
254+
echo "Debug: Checking PostgreSQL availability:"
255+
echo " PATH: $PATH"
256+
echo " Checking pg_config:"
257+
which pg_config || echo " pg_config not found in PATH"
258+
pg_config --version 2>/dev/null || echo " pg_config version check failed"
259+
echo " Checking libpq-fe.h:"
260+
ls -la $(brew --prefix postgresql@17)/include/libpq-fe.h 2>/dev/null || echo " libpq-fe.h not found"
261+
echo " Checking PostgreSQL installation:"
262+
ls -la $(brew --prefix postgresql@17)/include/ 2>/dev/null | head -5 || echo " PostgreSQL include directory not found"
263+
ls -la $(brew --prefix postgresql@17)/lib/ 2>/dev/null | head -5 || echo " PostgreSQL lib directory not found"
264+
265+
if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@17)/include/libpq-fe.h" ]]; then
266+
echo "PostgreSQL found and working"
267+
echo "POSTGRESQL_AVAILABLE=true" >> $GITHUB_ENV
268+
else
269+
echo "PostgreSQL not found or not working, will disable PostgreSQL support"
270+
echo "POSTGRESQL_AVAILABLE=false" >> $GITHUB_ENV
271+
fi
272+
253273
- name: Download and extract PHP source
254274
run: |
255275
cd ${{ env.BUILD_DIR }}
@@ -302,7 +322,7 @@ jobs:
302322
fi
303323
304324
# Check if PostgreSQL is available and working
305-
if which pg_config >/dev/null 2>&1 && [[ -f "$(brew --prefix postgresql@17)/include/libpq-fe.h" ]]; then
325+
if [[ "$POSTGRESQL_AVAILABLE" == "true" ]]; then
306326
echo "PostgreSQL found and working"
307327
else
308328
echo "PostgreSQL not found or not working, will disable PostgreSQL support"

0 commit comments

Comments
 (0)