Skip to content

Commit ef5aaba

Browse files
committed
ci: prove upstream/ is pristine by comparing, not by keeping meson alive
This repository builds one way, through mcpp. A meson leg kept only to assert something is a second build system to maintain and a second one to disagree with the first. Comparing is also the stronger claim: meson succeeding proves the tree still BUILDS, not that nothing was edited. The job now downloads the wayland 1.26.0 release tarball, checks its sha256, and diffs it against upstream/ — which is exactly the guarantee the layout exists to make.
1 parent ff84df0 commit ef5aaba

2 files changed

Lines changed: 33 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,32 @@ jobs:
106106
echo "wayland.client, wayland.server and wayland.util all have interfaces"
107107
108108
upstream:
109-
# The fork patches no upstream file, so meson must still build this tree.
110-
# If this breaks, something was modified that should not have been.
111-
name: upstream meson still builds this tree
109+
# `upstream/` must be the release tarball, byte for byte.
110+
#
111+
# Checked by COMPARING, not by building: this repository builds one way,
112+
# through mcpp, and keeping a second build system alive just to assert
113+
# something would be a second thing to maintain and a second thing to
114+
# disagree with the first. Comparing is also the stronger check — meson
115+
# succeeding proves the tree still builds, not that nothing was edited.
116+
name: upstream/ is the release tarball, unmodified
112117
runs-on: ubuntu-latest
113118
steps:
114119
- uses: actions/checkout@v4
115-
- run: |
116-
sudo apt-get update -qq
117-
sudo apt-get install -y -qq meson ninja-build libffi-dev libexpat1-dev
118-
meson setup build-meson upstream -Ddocumentation=false -Ddtd_validation=false
119-
ninja -C build-meson
120+
- name: diff upstream/ against wayland 1.26.0
121+
run: |
122+
curl -L -fsS -o wayland.tar.xz \
123+
"https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.26.0/downloads/wayland-1.26.0.tar.xz"
124+
echo "64176eaa46e4969903e286f8e5ef8331affc17fdf03ac9b58381d2b23162b7a3 wayland.tar.xz" | sha256sum -c -
125+
mkdir -p /tmp/pristine
126+
tar -xJf wayland.tar.xz -C /tmp/pristine
127+
128+
# .gitignore lives at the repo root here, not inside upstream/ — it is
129+
# this repository's, covering mcpp's build output. It is the one
130+
# expected difference.
131+
if diff -r --exclude=.gitignore /tmp/pristine/wayland-1.26.0 upstream; then
132+
echo "upstream/ is pristine"
133+
else
134+
echo "::error::upstream/ differs from the wayland 1.26.0 release tarball."
135+
echo "Everything this fork adds belongs under mcpp/."
136+
exit 1
137+
fi

README.mcpp.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ mcpp.toml the workspace root
9797

9898
Updating upstream is replacing `upstream/`. Nothing this fork adds lives inside
9999
it, so a diff against a fresh release tarball is empty there by construction —
100-
and CI checks that by building `upstream/` with its own meson on every run.
100+
and CI checks exactly that on every run, by downloading wayland 1.26.0 and
101+
comparing. Not by building it with meson: this repository builds one way,
102+
through mcpp, and comparing is the stronger check anyway — a successful meson
103+
build proves the tree still builds, not that nothing was edited.
101104

102105
`build.mcpp` runs wayland-scanner at CONFIGURE time rather than declaring
103106
`mcpp::action` edges. The declarative shape was tried first and does not work
@@ -115,6 +118,6 @@ before ninja is written, so doing the work there is ordered by construction;
115118

116119
## Upstream
117120

118-
Tracking wayland 1.26.0. Upstream sources, `protocol/`, `tests/` and the meson
119-
build are untouched — CI builds the tree with `meson setup && ninja` on every
120-
run, so "no upstream file is patched" has a test rather than a promise.
121+
Tracking wayland 1.26.0. `upstream/` is the release tarball byte for byte, and
122+
CI diffs it against a freshly downloaded one on every run — so "no upstream file
123+
is patched" has a test rather than a promise.

0 commit comments

Comments
 (0)