]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci(macos): fix dylib path for postgres 17 from brew
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 28 Sep 2024 16:50:23 +0000 (18:50 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 29 Sep 2024 13:48:40 +0000 (15:48 +0200)
Libraries are now installed under `lib/postgresql/` under the brew
package directory instead of just `lib`.

.github/workflows/tests.yml

index ea96993e57bfaffe2314ecc05d56e5864651aa94..d19ae7e5bef378f86f31dfc4b3b0877029513395 100644 (file)
@@ -129,7 +129,8 @@ jobs:
       - name: Configure memory alignment tests
         if: ${{ matrix.ext == 'align' }}
         run: |
-          echo "CFLAGS=-fsanitize=undefined -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch" >> $GITHUB_ENV
+          echo "CFLAGS=-fsanitize=undefined -Werror=strict-aliasing -Werror=odr -Werror=lto-type-mismatch"
+            >> $GITHUB_ENV
           echo "UBSAN_OPTIONS=halt_on_error=1" >> $GITHUB_ENV
           echo "PYTEST_ADDOPTS=-v" >> $GITHUB_ENV
 
@@ -189,8 +190,12 @@ jobs:
 
       - name: Find the libpq
         if: ${{ matrix.impl == 'python' }}
+        # NOTE: the libpq was found in:
+        # /opt/homebrew/opt/postgresql@${PG_VERSION}/lib before PG 17
+        # /opt/homebrew/opt/postgresql@${PG_VERSION}/lib/postgresql on PG 17
         run: |
-          echo "DYLD_LIBRARY_PATH=/opt/homebrew/opt/postgresql@${PG_VERSION}/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
+          echo "DYLD_LIBRARY_PATH=/opt/homebrew/opt/postgresql@${PG_VERSION}/lib/postgresql:/opt/homebrew/opt/postgresql@${PG_VERSION}/lib:$DYLD_LIBRARY_PATH" \
+              >> $GITHUB_ENV
 
       - name: Include psycopg-c to the packages to install
         if: ${{ matrix.impl == 'c' }}