-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (67 loc) · 2.86 KB
/
Copy pathci.yml
File metadata and controls
80 lines (67 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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