From 47fbc8be289f1ba518a666c7b670248cfd0d5366 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Wed, 2 Sep 2026 23:55:44 +0200 Subject: [PATCH] Build every family, as the rest of the ecosystem does Both configures in the conformance job take -DALL=ON: the PostgreSQL extension the SQL routes run over, and the standalone libmeos the streaming engine links. ALL means all. A family left out is stripped at preprocess time, so a job without it reports on a smaller MobilityDB than the one it names, and -DALL=ON covers a family added later where a list of names written here would not. This tier generates its temporal type table from a catalog that covers every family, so a database or a library narrower than that catalog cannot answer for the types the tier declares it knows: the table names 23 temporal types, among them tcbuffer, tpose, trgeometry and ts2cell. The dependencies are MobilityDB's own, from its pgversion.yml. libh3 is the H3 family's library, located on disk and pinned through -DH3_INCLUDE_DIR and -DH3_LIBRARY because the pgdg package layout differs between releases. The vendored pgPointCloud that POINTCLOUD compiles needs the autotools with libxml2 and zlib. The h3 and pointcloud PostgreSQL extensions are a separate need from their libraries: MobilityDB's control file requires them when their family is on, so CREATE EXTENSION pulls them in and they must exist in the cluster, and apt.postgresql.org carries both for the PostgreSQL this job runs. Measured against a libmeos built this way, whose meos.pc reads CBUFFER=1 H3=1 JSON=1 NPOINT=1 POINTCLOUD=1 POSE=1 QUADBIN=1 RASTER=1 RGEO=1 S2CELL=1, the tier builds, vets and runs its whole suite unchanged. --- .github/workflows/go.yml | 55 +++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index fb156a9..6fc11fd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -154,32 +154,73 @@ jobs: libproj-dev \ libgdal-dev \ libjson-c-dev \ + libxml2-dev \ + zlib1g-dev \ + autoconf automake libtool \ postgresql-${PGVERSION} \ postgresql-${PGVERSION}-postgis-${POSTGISVERSION} \ postgresql-server-dev-${PGVERSION} - # The default family set is what this tier reads: temporal geometry points - # and the scalar temporal types. The optional families carry dependencies of - # their own and no route here reaches one, so the build stays at the defaults - # and the job measures the surface it uses. + # WHAT ALL=ON REQUIRES, which is what lets the builds below ask for every + # family. libh3 is the H3 family's library, and the vendored pgPointCloud + # that POINTCLOUD compiles needs the autotools with libxml2 and zlib + # installed above. The h3 and pointcloud PostgreSQL EXTENSIONS are a + # separate need: MobilityDB's control file requires them when their family + # is on, so CREATE EXTENSION pulls them in and they must exist in the + # cluster. apt.postgresql.org carries both for PostgreSQL 16 to 18. + - name: Install what the optional families require + run: | + sudo apt-get install -y libh3-dev \ + postgresql-${PGVERSION}-pointcloud \ + postgresql-${PGVERSION}-h3 + + # The pgdg libh3-dev package layout differs between releases, so the + # header and the library are located on disk and pinned rather than left + # to CMake's find_path and find_library defaults. This is MobilityDB's own + # step, from its .github/workflows/pgversion.yml. + - name: Locate libh3 on disk and pin its paths + run: | + H3_INC=$(dpkg -L libh3-dev | grep -E 'h3api\.h$' | head -1) + H3_LIB=$(dpkg -L libh3-dev libh3-1 2>/dev/null | grep -E 'libh3\.so$' | head -1) + if [ -z "$H3_INC" ] || [ -z "$H3_LIB" ]; then + find /usr -name 'h3api.h' 2>/dev/null + find /usr -name 'libh3*' 2>/dev/null + echo "::error::could not locate libh3 headers/library" + exit 1 + fi + echo "H3_INCLUDE_DIR=$(dirname "$H3_INC")" >> $GITHUB_ENV + echo "H3_LIBRARY=$H3_LIB" >> $GITHUB_ENV + + # ALL FAMILIES. A family left out is stripped at preprocess time, so this + # job would report on a smaller MobilityDB than the one it names. The tier + # generates its temporal type table from a catalog that covers every + # family, and a database narrower than that catalog cannot answer for the + # types the tier declares it knows. -DALL=ON also covers a family added + # later, which a list of names written here would not. - name: Build and install MobilityDB run: | export PATH=/usr/lib/postgresql/${PGVERSION}/bin:$PATH mkdir mobilitydb/build cd mobilitydb/build - cmake -DCMAKE_BUILD_TYPE=Release .. + cmake -DCMAKE_BUILD_TYPE=Release -DALL=ON \ + -DH3_INCLUDE_DIR="$H3_INCLUDE_DIR" -DH3_LIBRARY="$H3_LIBRARY" .. make -j "$(nproc)" sudo make install # The same source, configured as the standalone library the streaming # engine links. Building it from the checkout above is what makes the # engine tests measure the same MobilityDB the SQL routes measure; a - # libmeos from anywhere else would be a second, unnamed commit. + # libmeos from anywhere else would be a second, unnamed commit. Every + # family here too, which is what every other consumer of MEOS builds: the + # provision-meos action this repository uses for the catalog defaults to + # -DALL=ON. A standalone library needs no PostgreSQL extension for any of + # them, since the vendored pgPointCloud sources compile into it. - name: Build and install libmeos from the same checkout run: | mkdir mobilitydb/build-meos cd mobilitydb/build-meos - cmake -DMEOS=ON -DCMAKE_BUILD_TYPE=Release .. + cmake -DMEOS=ON -DALL=ON -DCMAKE_BUILD_TYPE=Release \ + -DH3_INCLUDE_DIR="$H3_INCLUDE_DIR" -DH3_LIBRARY="$H3_LIBRARY" .. make -j "$(nproc)" sudo make install sudo ldconfig