Skip to content

Commit bdb9396

Browse files
committed
ci: install mcpp from its release tarball, not the interactive installer
`curl | bash` of the xlings installer wants /dev/tty and exits 1 on a GitHub runner — both legs died there before building anything. A released mcpp is self-contained (it resolves its registry from beside its own executable), so the tarball plus MCPP_HOME is all that is needed, which is what mcpp-index's own CI does. Pinned to 2026.8.27.2, mcpp-index's floor: consumers reach these packages through that index, so that is the version worth testing against. The llvm leg now selects its toolchain the supported way (`mcpp toolchain install/default`) rather than a flag that does not exist.
1 parent 633ccb7 commit bdb9396

1 file changed

Lines changed: 39 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build every member on BOTH toolchains, and check what a green compile would
2-
# not: that the generator is ours, that the sonames are canonical, and that the
3-
# two libraries do not overlap.
2+
# not: that the generator is ours, that the sonames are canonical, that the two
3+
# libraries do not overlap, and that every module produced an interface.
44
name: ci
55

66
on:
@@ -10,31 +10,55 @@ on:
1010
pull_request:
1111
workflow_dispatch:
1212

13+
env:
14+
# The floor mcpp-index is tested against — consumers reach these packages
15+
# through that index, so this is the version that matters, not the newest.
16+
MCPP_VERSION: "2026.8.27.2"
17+
1318
jobs:
1419
build:
1520
runs-on: ubuntu-latest
1621
strategy:
1722
fail-fast: false
1823
matrix:
19-
# Both, because the module wrapper is where they differ most: GCC and
20-
# Clang disagree about what a `using ::name;` in an export block may
21-
# name, and a 300-entry export list is exactly where that shows up.
22-
toolchain: [gcc, llvm]
24+
# Both, because the module wrappers are where the two compilers differ
25+
# most: a 300-entry `using ::name;` export block is exactly the shape
26+
# that finds a disagreement about what may be named in an export.
27+
toolchain: [default, llvm]
2328
name: build (${{ matrix.toolchain }})
2429
steps:
2530
- uses: actions/checkout@v4
2631

27-
- name: Install xlings + mcpp
32+
# The release tarball, not the interactive installer: `curl | bash` of
33+
# the xlings installer wants /dev/tty and exits 1 on a runner. A released
34+
# mcpp is self-contained — it resolves its registry from beside its own
35+
# executable — so MCPP_HOME is the tarball root rather than ~/.mcpp.
36+
- name: Download mcpp
37+
env:
38+
MCPP_ARCHIVE: mcpp-2026.8.27.2-linux-x86_64.tar.gz
39+
MCPP_ROOT: mcpp-2026.8.27.2-linux-x86_64
40+
run: |
41+
curl -L -fsS -o "$MCPP_ARCHIVE" \
42+
"https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/${MCPP_ARCHIVE}"
43+
tar -xzf "$MCPP_ARCHIVE"
44+
root="$PWD/$MCPP_ROOT"
45+
echo "MCPP=$root/bin/mcpp" >> "$GITHUB_ENV"
46+
echo "MCPP_HOME=$root" >> "$GITHUB_ENV"
47+
48+
- name: Select toolchain
49+
if: matrix.toolchain != 'default'
2850
run: |
29-
curl -fsSL https://d2learn.org/xlings-install.sh | bash
30-
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
31-
"$HOME/.xlings/bin/xlings" install mcpp -y
51+
"$MCPP" toolchain install ${{ matrix.toolchain }}
52+
"$MCPP" toolchain default ${{ matrix.toolchain }}
53+
"$MCPP" toolchain list
3254
3355
- name: Build the workspace
34-
run: mcpp build --workspace --toolchain ${{ matrix.toolchain }}
56+
run: |
57+
"$MCPP" --version
58+
"$MCPP" build --workspace
3559
3660
- name: The macro mappings actually run
37-
run: mcpp test -p mcpp/util --toolchain ${{ matrix.toolchain }}
61+
run: "$MCPP" test -p mcpp/util
3862

3963
- name: wayland-scanner is ours, and is 1.26.0
4064
run: |
@@ -73,17 +97,18 @@ jobs:
7397
readelf --dyn-syms -W "$s" | grep -q ' wl_display_connect' && { echo "server leaked the client API"; exit 1; }
7498
echo "client and server APIs are disjoint"
7599
76-
- name: both modules produced a BMI
100+
- name: every module produced an interface
77101
run: |
78102
for m in client server util; do
79-
find "mcpp/$m/target" -name '*.gcm' -o -name '*.pcm' | head -1 | grep -q . \
103+
find "mcpp/$m/target" \( -name '*.gcm' -o -name '*.pcm' \) | head -1 | grep -q . \
80104
|| { echo "$m: no module interface was produced"; exit 1; }
81105
done
82106
echo "wayland.client, wayland.server and wayland.util all have interfaces"
83107
84108
upstream:
85109
# The fork patches no upstream file, so meson must still build this tree.
86110
# If this breaks, something was modified that should not have been.
111+
name: upstream meson still builds this tree
87112
runs-on: ubuntu-latest
88113
steps:
89114
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)