|
1 | 1 | # 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. |
4 | 4 | name: ci |
5 | 5 |
|
6 | 6 | on: |
|
10 | 10 | pull_request: |
11 | 11 | workflow_dispatch: |
12 | 12 |
|
| 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 | + |
13 | 18 | jobs: |
14 | 19 | build: |
15 | 20 | runs-on: ubuntu-latest |
16 | 21 | strategy: |
17 | 22 | fail-fast: false |
18 | 23 | 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] |
23 | 28 | name: build (${{ matrix.toolchain }}) |
24 | 29 | steps: |
25 | 30 | - uses: actions/checkout@v4 |
26 | 31 |
|
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' |
28 | 50 | 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 |
32 | 54 |
|
33 | 55 | - name: Build the workspace |
34 | | - run: mcpp build --workspace --toolchain ${{ matrix.toolchain }} |
| 56 | + run: | |
| 57 | + "$MCPP" --version |
| 58 | + "$MCPP" build --workspace |
35 | 59 |
|
36 | 60 | - name: The macro mappings actually run |
37 | | - run: mcpp test -p mcpp/util --toolchain ${{ matrix.toolchain }} |
| 61 | + run: "$MCPP" test -p mcpp/util |
38 | 62 |
|
39 | 63 | - name: wayland-scanner is ours, and is 1.26.0 |
40 | 64 | run: | |
@@ -73,17 +97,18 @@ jobs: |
73 | 97 | readelf --dyn-syms -W "$s" | grep -q ' wl_display_connect' && { echo "server leaked the client API"; exit 1; } |
74 | 98 | echo "client and server APIs are disjoint" |
75 | 99 |
|
76 | | - - name: both modules produced a BMI |
| 100 | + - name: every module produced an interface |
77 | 101 | run: | |
78 | 102 | 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 . \ |
80 | 104 | || { echo "$m: no module interface was produced"; exit 1; } |
81 | 105 | done |
82 | 106 | echo "wayland.client, wayland.server and wayland.util all have interfaces" |
83 | 107 |
|
84 | 108 | upstream: |
85 | 109 | # The fork patches no upstream file, so meson must still build this tree. |
86 | 110 | # If this breaks, something was modified that should not have been. |
| 111 | + name: upstream meson still builds this tree |
87 | 112 | runs-on: ubuntu-latest |
88 | 113 | steps: |
89 | 114 | - uses: actions/checkout@v4 |
|
0 commit comments