Skip to content

Commit 6d58be2

Browse files
ci(vendor): add vendor-drift workflow (step 3 of ingestion plan)
Adds `.github/workflows/vendor-drift.yml` which regenerates the vendored MEOS-API artefacts (`make vendor-meos-api`) on every PR touching `vendor/meos-api/`, the Makefile, or the workflow itself, plus on push to master and on a daily 06:00 UTC cron. On drift it fails with an actionable message: ::error::vendor/meos-api/ is stale. Run `make vendor-meos-api` locally and open a refresh PR. This is step 3 of `docs/MEOS_API_INGESTION_PLAN.md` ("CI gate that regenerates the vendored artefacts and fails the PR if they drift"). Stacks on PR #4 (vendoring + Makefile).
1 parent 4d5098f commit 6d58be2

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/vendor-drift.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Vendor drift (MEOS-API)
2+
3+
# Re-runs the `make vendor-meos-api` target against the live MEOS-API master
4+
# and fails if the vendored artefacts under `vendor/meos-api/` are out of date.
5+
#
6+
# Surfaces upstream changes as actionable PR diffs instead of letting them
7+
# silently rot. The CI failure message tells the maintainer to run
8+
#
9+
# make vendor-meos-api
10+
#
11+
# locally and submit a refresh PR.
12+
#
13+
# Step 3 of `docs/MEOS_API_INGESTION_PLAN.md`.
14+
15+
on:
16+
pull_request:
17+
paths:
18+
- 'vendor/meos-api/**'
19+
- 'Makefile'
20+
- '.github/workflows/vendor-drift.yml'
21+
push:
22+
branches: [master]
23+
schedule:
24+
# Daily 06:00 UTC — pings the maintainer if MEOS-API master moves and the
25+
# vendored copy goes stale, even without a MobilityAPI PR open.
26+
- cron: '0 6 * * *'
27+
workflow_dispatch:
28+
29+
jobs:
30+
vendor-drift:
31+
name: Refresh & diff vendored artefacts
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
# libclang (the Python wheel) bundles the .so but not the system C
37+
# headers — without them, `size_t` and friends from <stddef.h> degrade
38+
# to `int` during the catalog parse, which would show up as a false
39+
# drift on every CI run. Install system clang dev headers so libclang
40+
# gets the same sysroot resolution as a local checkout.
41+
- name: Install clang system headers for libclang sysroot
42+
run: |
43+
sudo apt-get update -qq
44+
sudo apt-get install -y --no-install-recommends clang libclang-dev
45+
46+
- name: Refresh vendored MEOS-API artefacts from master
47+
run: make vendor-meos-api
48+
49+
- name: Detect drift
50+
id: drift
51+
run: |
52+
if git diff --exit-code -- vendor/meos-api/; then
53+
echo "drift=false" >> "$GITHUB_OUTPUT"
54+
echo "::notice::vendor/meos-api/ is up to date with MEOS-API master."
55+
else
56+
echo "drift=true" >> "$GITHUB_OUTPUT"
57+
echo "::error::vendor/meos-api/ is stale. Run \`make vendor-meos-api\` locally and open a refresh PR."
58+
git diff --stat -- vendor/meos-api/
59+
exit 1
60+
fi

0 commit comments

Comments
 (0)