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
23 changes: 22 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,33 @@ jobs:
java-version: "21"
cache: maven

# Prefer apt.postgresql.org over the runner's preinstalled PostgreSQL so
# the postgresql-server-dev package resolves cleanly. Only pg_config is
# needed here — pgPointCloud produces a static libpc.a, no server.
- name: Remove existing PostgreSQL installations [prefer apt.postgresql.org]
run: |
sudo service postgresql stop || true
sudo apt-get --purge remove postgresql* -y || true
sudo rm -rf /var/lib/postgresql/ /etc/postgresql/ \
/var/log/postgresql/ || true

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install -y curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install MEOS build dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y \
cmake build-essential \
libjson-c-dev libgeos-dev libproj-dev libgsl-dev
libjson-c-dev libgeos-dev libproj-dev libgsl-dev \
libh3-dev libgdal-dev libxml2-dev \
autoconf automake libtool pkg-config \
postgresql-17 postgresql-server-dev-17

- name: Build libmeos.so + JMEOS.jar from the tracked commit
# build-jmeos.sh builds libmeos from the recorded MobilityDB commit, builds the
Expand Down
15 changes: 8 additions & 7 deletions build-jmeos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ clone_at() {
MDB_DIR="${WORK_DIR}/MobilityDB"
clone_at "${MOBILITYDB_REPO}" "${MOBILITYDB_REF}" "${MDB_DIR}"

# Enable the MEOS type families the streaming app exercises: circular buffers,
# network points (default ON) and geoposes (which auto-enables rigid geometries).
# The facade smoke tests link these symbols, so they must be in libmeos.so.
# H3 and POINTCLOUD are left OFF — the app does not use them and they require
# extra system libraries (libh3, libpointcloud); enable them via MEOS_CMAKE_ARGS
# if a downstream consumer ever needs them.
MEOS_CMAKE_ARGS="${MEOS_CMAKE_ARGS:--DCBUFFER=ON -DNPOINT=ON -DPOSE=ON}"
# Build every optional MEOS family via -DALL so the facades link against a
# libmeos with the full symbol surface (circular buffers, H3, JSON, network
# points, pgPointCloud, geoposes, quadbin, raster, rigid geometries, Arrow).
# H3 is pinned to the distro's system library (the CI apt step installs
# libh3-dev); pgPointCloud's vendored libpc.a needs pg_config, pinned to the
# apt.postgresql.org PostgreSQL 17 the CI workflow installs. Override via
# MEOS_CMAKE_ARGS for a non-Debian layout.
MEOS_CMAKE_ARGS="${MEOS_CMAKE_ARGS:--DALL=ON -DH3_LIBRARY=/usr/lib/x86_64-linux-gnu/libh3.so -DH3_INCLUDE_DIR=/usr/include/h3 -DPOSTGRESQL_PG_CONFIG=/usr/lib/postgresql/17/bin/pg_config}"

log "Building libmeos.so (MEOS=ON ${MEOS_CMAKE_ARGS})"
rm -rf "${MDB_DIR}/build"
Expand Down
Loading