Skip to content
Merged
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
42 changes: 42 additions & 0 deletions GENERATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,45 @@ installed as `org.jmeos:meos:1.0`; the generator reads its raw-FFI surface. The
the smoke tests load is built from the **same** master catalog, so the jar surface, the
facades and the native library all track master together — surface-match by construction,
with no committed jar or pinned commit to drift.

## Regenerating by hand

CI performs the steps below via `provision-meos`. To run them yourself you need a JDK, Maven,
CMake and the MEOS build dependencies.

**1. Derive libmeos and the catalog from MobilityDB master.** Both come from one commit; see
`MEOS-API/GENERATION.md` for the two commands:

```bash
MDB=~/src/MobilityDB # checkout at the commit you are deriving from
MEOSAPI=~/src/MEOS-API
cmake -S "$MDB" -B "$MDB/build" -DCMAKE_BUILD_TYPE=Release -DMEOS=ON -DALL=ON
cmake --build "$MDB/build" -j"$(nproc)"
cmake --install "$MDB/build" --prefix "$MDB/.prefix"
cd "$MEOSAPI" && MDB_SRC_ROOT="$MDB" python3 run.py "$MDB/.prefix/include"
```

**2. Build the JMEOS jar against that catalog and install it into the local Maven
repository** under the coordinates this build resolves — `org.jmeos:meos:1.0`:

```bash
cd ~/src/JMEOS # JMEOS main
CATALOG="$MEOSAPI/output/meos-idl.json" LIBMEOS="$MDB/.prefix/lib/libmeos.so" \
tools/regen-from-catalog.sh
mvn install:install-file -Dfile=jar/JMEOS.jar \
-DgroupId=org.jmeos -DartifactId=meos -Dversion=1.0 -Dpackaging=jar
```

**3. Stage the catalog and build.** `tools/meos-idl.json` is derived, not committed:

```bash
cd ~/src/MobilityFlink
cp "$MEOSAPI/output/meos-idl.json" tools/meos-idl.json
cd flink-processor
mvn -Dmeos.lib.dir="$MDB/.prefix/lib" -Dmeos.enabled=true clean test
```

`generate-sources` runs `tools/codegen_jvm.py --engine flink --catalog ../tools/meos-idl.json
--jar <the installed jar> --out target/generated-facades`, so the `MeosOps*` facades are
regenerated by the build itself. `meos.lib.dir` is where the smoke tests look for
`libmeos.so`, and `meos.enabled` turns them on.
Loading