Skip to content
Open
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
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
pull_request:

# Both the libmeos build and the MEOS-API header parse are pinned to the
# same MobilityDB ref so the regenerated bindings and the runtime library
# always match. Current MEOS lives on master (there is no stable-1.4 yet);
# bump MOBILITYDB_REF once a stable release branch exists.
env:
MOBILITYDB_REF: master
# The bindings need two not-yet-merged MEOS-API changes: the shape
# metadata (PR #2, branch feat/shape-metadata) and the postgres
# integer-typedef stub (PR #1, branch fix/stdbool-stub) without which
# int64/TimestampTz collapse to 32-bit int. Stack them: check out
# feat/shape-metadata and cherry-pick PR #1's fix. Once both land on
# MEOS-API master, drop MEOS_API_PR1_BRANCH and set MEOS_API_REF=master.
MEOS_API_REF: feat/shape-metadata
MEOS_API_PR1_BRANCH: fix/stdbool-stub
MEOS_API_PR1_COMMIT: fd83b2825af641f8c54f422dd7f66b148b287b68

jobs:
build:
name: Regenerate, build and smoke-test against MEOS
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install native dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential cmake git python3-pip \
libgeos-dev libproj-dev libjson-c-dev libgsl-dev

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Build and install libmeos (${{ env.MOBILITYDB_REF }})
run: |
git clone --depth 1 --branch "$MOBILITYDB_REF" \
https://github.com/MobilityDB/MobilityDB "$HOME/MobilityDB"
cmake -S "$HOME/MobilityDB" -B "$HOME/MobilityDB/build" \
-DCMAKE_BUILD_TYPE=Release -DMEOS=on
cmake --build "$HOME/MobilityDB/build" -j "$(nproc)"
sudo cmake --install "$HOME/MobilityDB/build"
sudo ldconfig

- name: Generate meos-idl.json (${{ env.MOBILITYDB_REF }})
run: |
git clone --branch "$MEOS_API_REF" \
https://github.com/MobilityDB/MEOS-API "$HOME/MEOS-API"
cd "$HOME/MEOS-API"
git config user.email ci@local
git config user.name CI
git fetch origin "$MEOS_API_PR1_BRANCH"
git cherry-pick "$MEOS_API_PR1_COMMIT"
pip install -r requirements.txt
python setup.py --branch "$MOBILITYDB_REF"
python run.py

- name: Regenerate bindings
run: python3 tools/codegen.py "$HOME/MEOS-API/output/meos-idl.json"

- name: Report binding drift
run: git --no-pager diff --stat -- MEOS.NET/Internal || true

- name: Build solution
run: dotnet build MEOS.NET.sln -c Release

- name: Run tests
run: dotnet test MEOS.NET.sln -c Release --no-build

- name: Smoke-test the FFI
run: dotnet run --project ExampleApp/ExampleApp.csproj -c Release --no-build
env:
LD_LIBRARY_PATH: /usr/local/lib
2 changes: 0 additions & 2 deletions MEOS.NET.Builder/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions MEOS.NET.Builder/Constants/BuilderVersion.cs

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions MEOS.NET.Builder/Exceptions/InvalidCDeclarationException.cs

This file was deleted.

26 changes: 0 additions & 26 deletions MEOS.NET.Builder/MEOS.NET.Builder.csproj

This file was deleted.

13 changes: 0 additions & 13 deletions MEOS.NET.Builder/Models/CFunctionDeclaration.cs

This file was deleted.

26 changes: 0 additions & 26 deletions MEOS.NET.Builder/Models/CSFunctionArgument.cs

This file was deleted.

40 changes: 0 additions & 40 deletions MEOS.NET.Builder/Models/CSFunctionDeclaration.cs

This file was deleted.

9 changes: 0 additions & 9 deletions MEOS.NET.Builder/Models/FunctionDeclaration.cs

This file was deleted.

22 changes: 0 additions & 22 deletions MEOS.NET.Builder/Program.cs

This file was deleted.

21 changes: 0 additions & 21 deletions MEOS.NET.Builder/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions MEOS.NET.Builder/Type mapping.txt

This file was deleted.

21 changes: 0 additions & 21 deletions MEOS.NET.Builder/View/Display.cs

This file was deleted.

17 changes: 0 additions & 17 deletions MEOS.NET.Builder/View/Messages.cs

This file was deleted.

Loading
Loading