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
8 changes: 7 additions & 1 deletion .github/actions/check-test-outcome/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ inputs:
runs:
using: composite
steps:
# git names the branch a repository it initialises starts on, so the checkout below prints
# no hint about an unset default.
- name: Name git's default branch
shell: bash
run: git config --global init.defaultBranch main

- name: Check out the rules
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: MobilityDB/MEOS-API
ref: master
Expand Down
10 changes: 8 additions & 2 deletions .github/actions/check-tree-hygiene/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,23 @@ inputs:
runs:
using: composite
steps:
# git names the branch a repository it initialises starts on, so the checkout below prints
# no hint about an unset default.
- name: Name git's default branch
shell: bash
run: git config --global init.defaultBranch main

# The rules live beside the catalog and the provisioning recipe, so a
# consumer takes them from here rather than carrying a copy that goes stale.
- name: Check out the rules
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: MobilityDB/MEOS-API
ref: master
path: .meos-api-hygiene

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"

Expand Down
21 changes: 15 additions & 6 deletions .github/actions/provision-meos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,24 @@ outputs:
runs:
using: composite
steps:
# git names the branch a repository it initialises starts on, so the checkout below prints
# no hint about an unset default.
- name: Name git's default branch
shell: bash
run: git config --global init.defaultBranch main

# The MEOS headers + C sources the catalog is derived from. The whole
# repository is fetched (not just headers) so run.py can read meos/src,
# mobilitydb/src and mobilitydb/sql for the @sqlfn/@ingroup maps, and so
# the optional libmeos build below can configure it.
- name: Checkout MobilityDB @ ref
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: MobilityDB/MobilityDB
ref: ${{ inputs.mobilitydb-ref }}
path: _mobilitydb_src

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.11"

Expand Down Expand Up @@ -81,7 +87,7 @@ runs:
} >> "$GITHUB_OUTPUT"

- name: Restore the downloaded libclang sysroot packages
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/apt-sysroot-archives
key: ${{ steps.sysroot-keys.outputs.deb-key }}
Expand Down Expand Up @@ -135,6 +141,9 @@ runs:
shell: bash
run: |
sudo service postgresql stop || true
# The runner image ships PostgreSQL without its man pages, so the psql.1.gz alternative
# points at nothing and the package removal would repair it with a warning; it goes first.
sudo update-alternatives --remove-all psql.1.gz 2>/dev/null || true
bash "$GITHUB_ACTION_PATH/apt-get.sh" --purge remove postgresql* -y || true
sudo rm -rf /var/lib/postgresql/ /etc/postgresql/ /var/log/postgresql/ || true

Expand Down Expand Up @@ -177,7 +186,7 @@ runs:

- name: Restore the downloaded packages
if: inputs.build-libmeos == 'true'
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/apt-archives
key: ${{ steps.keys.outputs.deb-key }}
Expand All @@ -186,7 +195,7 @@ runs:
- name: Restore the derived libmeos prefix and catalog
id: build-cache
if: inputs.build-libmeos == 'true'
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
${{ runner.temp }}/meos-headers
Expand All @@ -211,7 +220,7 @@ runs:
- name: Restore the GDAL build
id: gdal-cache
if: inputs.build-libmeos == 'true'
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/gdal-prefix
key: ${{ steps.keys.outputs.gdal-key }}
Expand Down
17 changes: 15 additions & 2 deletions .github/actions/provision-meos/build-gdal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,36 @@ curl -fsSL --retry 3 --max-time 600 -o "$WORK/gdal.tar.gz" "$URL"
echo "$SHA256 $WORK/gdal.tar.gz" | sha256sum -c -
tar xzf "$WORK/gdal.tar.gz" -C "$WORK"

# GDAL's CheckCXXCompilerFlag passes backslashes to a macro, which CMake 4 reports unless
# CMP0219 is set; the policy is set inside the project, where CMake reads it.
cat > "$WORK/policies.cmake" <<'EOF'
if(POLICY CMP0219)
cmake_policy(SET CMP0219 NEW)
endif()
EOF

cmake -S "$WORK/gdal-$VERSION" -B "$WORK/build" \
-DCMAKE_PROJECT_INCLUDE_BEFORE="$WORK/policies.cmake" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_APPS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_PYTHON_BINDINGS=OFF \
-DBUILD_JAVA_BINDINGS=OFF \
-DBUILD_CSHARP_BINDINGS=OFF \
-DGDAL_BUILD_OPTIONAL_DRIVERS=OFF \
-DOGR_BUILD_OPTIONAL_DRIVERS=OFF \
-DGDAL_ENABLE_DRIVER_GTIFF=ON \
-DGDAL_ENABLE_DRIVER_VRT=ON \
-DOGR_ENABLE_DRIVER_GEOJSON=ON \
-DOGR_ENABLE_DRIVER_SHAPE=ON \
-DGDAL_USE_EXTERNAL_LIBS=OFF \
-DGDAL_USE_INTERNAL_LIBS=ON \
-DGDAL_USE_PROJ=ON \
-DGDAL_USE_GEOS=OFF \
-DGDAL_USE_SQLITE3=ON \
-DGDAL_USE_ZLIB=ON
-DGDAL_USE_ZLIB=ON \
-DGDAL_USE_ZLIB_INTERNAL=OFF
cmake --build "$WORK/build" -j "${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}"
cmake --install "$WORK/build"
9 changes: 6 additions & 3 deletions .github/workflows/openapi-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ jobs:
name: Regenerate + validate meos-openapi.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Name git's default branch
run: git config --global init.defaultBranch main

- uses: actions/setup-python@v5
- uses: actions/checkout@v5

- uses: actions/setup-python@v6
with:
python-version: "3.11"

Expand Down Expand Up @@ -84,7 +87,7 @@ jobs:
"

- name: Upload meos-openapi.json as artefact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: meos-openapi
path: output/meos-openapi.json
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ jobs:
name: Build libmeos + regenerate catalog + pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Name git's default branch
run: git config --global init.defaultBranch main

- uses: actions/checkout@v5

# Build + install all-families libmeos and derive the catalog from the
# installed headers — the exact step a native/FFI binding runs.
Expand All @@ -44,7 +47,7 @@ jobs:
# factory.py and degrades to `oracle-unavailable` without it, so the two
# parity gates assert nothing until it is on disk.
- name: Check out the PyMEOS oracle
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: MobilityDB/PyMEOS
path: _pymeos
Expand Down Expand Up @@ -210,7 +213,7 @@ jobs:

- name: Upload meos-idl.json as artefact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: meos-idl
path: output/meos-idl.json
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tree-hygiene.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Name git's default branch
run: git config --global init.defaultBranch main

- uses: actions/checkout@v5

# Run the script from this checkout rather than through the action, which
# would fetch master: a pull request must be checked by the rules it
# carries, or a change to them is not exercised until after it merges.
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.11"

Expand Down
1 change: 0 additions & 1 deletion tools/provision-meos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ if [ "$BUILD_LIBMEOS" = 1 ]; then
cfg=(-DCMAKE_BUILD_TYPE=Release -DMEOS=ON -DCMAKE_INSTALL_PREFIX="$PARSE_PREFIX" $FAMILIES)
[ -e "${H3_LIBRARY:=/usr/lib/x86_64-linux-gnu/libh3.so}" ] && cfg+=(-DH3_LIBRARY="$H3_LIBRARY")
[ -e "${H3_INCLUDE_DIR:=/usr/include/h3}" ] && cfg+=(-DH3_INCLUDE_DIR="$H3_INCLUDE_DIR")
[ -x "${PG_CONFIG:=/usr/lib/postgresql/17/bin/pg_config}" ] && cfg+=(-DPOSTGRESQL_PG_CONFIG="$PG_CONFIG")

cmake -S "$MDB_SRC" -B "$MDB_SRC/build" "${cfg[@]}"
cmake --build "$MDB_SRC/build" -j "${CMAKE_BUILD_PARALLEL_LEVEL:-$(nproc)}"
Expand Down
Loading