]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
test: add CI jobs to run libpq with PG master
authorJelte Fennema <github-tech@jeltef.nl>
Tue, 1 Aug 2023 13:07:15 +0000 (15:07 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 1 Aug 2023 14:18:06 +0000 (15:18 +0100)
.github/workflows/tests.yml
tools/build/ci_install_libpq.sh

index 13660315fb942db6d06636fd8800c4f658787c3b..98cf39c9bd9b223268382e2ca1efbbbb969a180a 100644 (file)
@@ -30,11 +30,11 @@ jobs:
           - {impl: python, python: "3.8", postgres: "postgres:11"}
           - {impl: python, python: "3.9", postgres: "postgres:12"}
           - {impl: python, python: "3.10", postgres: "postgres:13"}
-          - {impl: python, python: "3.11", postgres: "postgres:14"}
+          - {impl: python, python: "3.11", postgres: "postgres:14", libpq: master}
           - {impl: python, python: "3.12.0-beta.4 - 3.12", postgres: "postgres:15", libpq: oldest}
 
           - {impl: c, python: "3.7", postgres: "postgres:15", libpq: newest}
-          - {impl: c, python: "3.8", postgres: "postgres:13"}
+          - {impl: c, python: "3.8", postgres: "postgres:13", libpq: master}
           - {impl: c, python: "3.9", postgres: "postgres:14"}
           - {impl: c, python: "3.10", postgres: "postgres:12"}
           - {impl: c, python: "3.11", postgres: "postgres:11", libpq: oldest}
index 55525e37dbc07f7ffadba20fa98ee9321dac3ad5..98db83ed84bb6d8e08c6b963d239422edcee9e2e 100755 (executable)
@@ -13,9 +13,10 @@ rel=$(lsb_release -c -s)
 
 setup_repo () {
     version=${1:-}
+    repo_suffix=${2:-pgdg}
     curl -sL -o /etc/apt/trusted.gpg.d/apt.postgresql.org.asc \
         https://www.postgresql.org/media/keys/ACCC4CF8.asc
-    echo "deb http://apt.postgresql.org/pub/repos/apt ${rel}-pgdg main ${version}" \
+    echo "deb http://apt.postgresql.org/pub/repos/apt ${rel}-${repo_suffix} main ${version}" \
         >> /etc/apt/sources.list.d/pgdg.list
     apt-get -qq update
 }
@@ -39,6 +40,12 @@ case "$libpq" in
         apt-get -qq -y install "libpq-dev=${pqver}" "libpq5=${pqver}"
         ;;
 
+    master)
+        setup_repo 17 pgdg-snapshot
+        pqver=$(apt-cache show libpq5 | grep ^Version: | head -1 | awk '{print $2}')
+        apt-get -qq -y install "libpq-dev=${pqver}" "libpq5=${pqver}"
+        ;;
+
     *)
         echo "Unexpected wanted libpq: '${libpq}'" >&2
         exit 1