-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (65 loc) · 3.23 KB
/
Copy pathci.yml
File metadata and controls
78 lines (65 loc) · 3.23 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
name: CI
on:
push:
pull_request:
jobs:
build:
name: Regenerate, build and smoke-test against MEOS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Provision MEOS (build libmeos + generate catalog)
id: provision
# Derive the MEOS catalog (meos-idl.json) and the libmeos build from upstream
# MobilityDB master through the shared provision-meos action. Tracking master
# (not a pinned commit) keeps the source, the catalog and the native library the
# binding is generated against all moving together.
uses: MobilityDB/MEOS-API/.github/actions/provision-meos@master
with:
mobilitydb-ref: master
build-libmeos: "true"
# The committed generated tree is what a consumer of this repository
# compiles, and every step below overwrites it, so whether it still holds
# together is decided HERE or nowhere. Drift against a freshly derived
# catalog is ordinary — MobilityDB master moves independently of this
# binding — but a snapshot declaring a function MEOS no longer exports
# reaches that consumer as an EntryPointNotFoundException at run time.
- name: Resolve the COMMITTED snapshot against MEOS
run: |
dotnet build MEOS.NET.sln -c Release
dotnet test MEOS.NET.sln -c Release --no-build \
--filter "FullyQualifiedName~NativeSymbolTests"
env:
LD_LIBRARY_PATH: ${{ steps.provision.outputs.libmeos-prefix }}/lib
- name: Regenerate bindings
run: python3 tools/codegen.py "${{ steps.provision.outputs.catalog-path }}"
- name: Regenerate the object layer
run: python3 tools/objectgen.py "${{ steps.provision.outputs.catalog-path }}" --report
- name: Report binding drift
run: git --no-pager diff --stat -- MEOS.NET/Functions MEOS.NET/Types || true
- name: Build solution
run: dotnet build MEOS.NET.sln -c Release
# No --filter here: this run is the one the floor below is read from, so it
# collects the whole suite. The snapshot step above narrows deliberately and
# its result is not what any count is taken from.
- name: Run tests
run: dotnet test MEOS.NET.sln -c Release --no-build 2>&1 | tee test.log
env:
LD_LIBRARY_PATH: ${{ steps.provision.outputs.libmeos-prefix }}/lib
# A skip is already impossible to WRITE — MEOS.NET.Tests/BannedSymbols.txt
# makes [Ignore] and Assert.Inconclusive compile errors. Deleting a test is
# the remaining way to stop running it, and that leaves no skip behind, so
# the total carries a floor. Raise it when the suite grows; lowering it is a
# deliberate act belonging to the commit that removes the tests.
- name: Refuse a skipped test and a shrinking suite
uses: MobilityDB/MEOS-API/.github/actions/check-test-outcome@master
with:
log: test.log
min-tests: "67"
- name: Smoke-test the FFI
run: dotnet run --project ExampleApp/ExampleApp.csproj -c Release --no-build
env:
LD_LIBRARY_PATH: ${{ steps.provision.outputs.libmeos-prefix }}/lib