Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/actions/provision-meos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ runs:
env:
PACKAGES: >-
clang libclang-dev libjson-c-dev libgsl-dev libproj-dev libgeos-dev
postgresql-server-dev-16
run: |
# The PostgreSQL server headers are those of the PostgreSQL the image ships.
packages="$PACKAGES $(bash "$GITHUB_ACTION_PATH/server-dev-package.sh")"
image="${ImageOS:-unknown}-${ImageVersion:-unknown}"
pkg_hash="$(echo "$PACKAGES" | tr -s ' \n' '\n\n' | sort | sha256sum | cut -c1-16)"
pkg_hash="$(echo "$packages" | tr -s ' \n' '\n\n' | sort | sha256sum | cut -c1-16)"
{
echo "packages=$PACKAGES"
echo "packages=$packages"
echo "deb-prefix=provision-meos-sysroot-debs-${ImageOS:-unknown}-"
echo "deb-key=provision-meos-sysroot-debs-$image-$pkg_hash"
} >> "$GITHUB_OUTPUT"
Expand Down
20 changes: 20 additions & 0 deletions .github/actions/provision-meos/server-dev-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# server-dev-package.sh — print the package holding the server headers of the PostgreSQL the
# runner image ships: postgresql-server-dev-16 on ubuntu-24.04 (PostgreSQL 16), and
# postgresql-server-dev-18 on ubuntu-26.04 (PostgreSQL 18). The major version is the directory
# the image installs under /usr/lib/postgresql, so the headers libclang reads follow the image
# instead of a version written into the install lists of this action and of this repository's
# workflows. postgresql-server-dev-all cannot stand in for it: the images ship postgresql-common
# from apt.postgresql.org, which the archive's postgresql-server-dev-all does not accept.
#
# Usage:
# apt-get.sh install -y "$(server-dev-package.sh)"
set -euo pipefail

major="$(find /usr/lib/postgresql -mindepth 1 -maxdepth 1 -type d -printf '%f\n' 2>/dev/null |
grep -E '^[0-9]+$' | sort -n | tail -1 || true)"
if [ -z "$major" ]; then
echo "server-dev-package.sh: the image installs no PostgreSQL under /usr/lib/postgresql" >&2
exit 1
fi
echo "postgresql-server-dev-$major"
2 changes: 1 addition & 1 deletion .github/workflows/openapi-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
bash .github/actions/provision-meos/apt-get.sh install -y --no-install-recommends \
clang libclang-dev \
libjson-c-dev libgsl-dev libproj-dev libgeos-dev \
postgresql-server-dev-16
"$(bash .github/actions/provision-meos/server-dev-package.sh)"

- name: Clone MobilityDB master (MEOS headers source)
run: |
Expand Down
Loading