Skip to content

Commit c9e9994

Browse files
committed
ci: install through xlings after all, with XLINGS_NON_INTERACTIVE
The tarball detour was the wrong fix. The installer already has the switch: if [[ -z "${XLINGS_NON_INTERACTIVE:-}" ]] && ! [[ -t 0 ]] && [[ -r /dev/tty ]]; then ./bin/xlings self install < /dev/tty A runner's /dev/tty is readable but not connected, so the `curl | bash` branch was taken and died on it. Setting the variable takes the plain branch. Going through xlings is also the better test: these packages depend on the ECOSYSTEM — xim:mesa's GBM discovery row, the toolchains — and a pinned mcpp tarball ships a frozen snapshot of it. This way the fork is built against what users actually have. (`xlings install` has no -y; the earlier draft invented one.)
1 parent bdb9396 commit c9e9994

1 file changed

Lines changed: 24 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ 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-
1813
jobs:
1914
build:
2015
runs-on: ubuntu-latest
@@ -29,36 +24,41 @@ jobs:
2924
steps:
3025
- uses: actions/checkout@v4
3126

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
27+
# Installed the way a user does, through xlings, rather than by
28+
# unpacking an mcpp release: these packages depend on the ECOSYSTEM
29+
# (`xim:mesa`'s GBM discovery row, the toolchains), and a pinned mcpp
30+
# tarball carries a frozen snapshot of it. Testing against the current
31+
# ecosystem is the point.
32+
#
33+
# XLINGS_NON_INTERACTIVE is what makes the installer usable here. Without
34+
# it the script takes its `curl | bash` branch — `xlings self install <
35+
# /dev/tty` — and a runner has a /dev/tty that is readable but not
36+
# connected, so it dies with "No such device or address" before anything
37+
# is installed.
38+
- name: Install xlings + mcpp
3739
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+
XLINGS_NON_INTERACTIVE: "1"
4041
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"
42+
curl -fsSL https://d2learn.org/xlings-install.sh | bash
43+
echo "$HOME/.xlings/bin" >> "$GITHUB_PATH"
44+
"$HOME/.xlings/bin/xlings" --version
45+
"$HOME/.xlings/bin/xlings" install mcpp
46+
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
4747
4848
- name: Select toolchain
4949
if: matrix.toolchain != 'default'
5050
run: |
51-
"$MCPP" toolchain install ${{ matrix.toolchain }}
52-
"$MCPP" toolchain default ${{ matrix.toolchain }}
53-
"$MCPP" toolchain list
51+
mcpp toolchain install ${{ matrix.toolchain }}
52+
mcpp toolchain default ${{ matrix.toolchain }}
53+
mcpp toolchain list
5454
5555
- name: Build the workspace
5656
run: |
57-
"$MCPP" --version
58-
"$MCPP" build --workspace
57+
mcpp --version
58+
mcpp build --workspace
5959
6060
- name: The macro mappings actually run
61-
run: "$MCPP" test -p mcpp/util
61+
run: mcpp test -p mcpp/util
6262

6363
- name: wayland-scanner is ours, and is 1.26.0
6464
run: |

0 commit comments

Comments
 (0)