Skip to content

Commit a63a3ea

Browse files
committed
fix: fresh user test — xlings remove + replace with self-hosted binary
Replace the xlings-installed mcpp with the self-hosted build, then test the exact user flow: mcpp new hello cd hello mcpp run Uses `mcpp` from PATH (like a real user), but the binary is the current code (not the old 0.0.17 release).
1 parent 228a087 commit a63a3ea

3 files changed

Lines changed: 30 additions & 14 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,18 @@ jobs:
316316
"$MCPP" --version
317317
echo ":: Self-host smoke PASS"
318318
319-
- name: Fresh user experience (mcpp new → run)
319+
- name: Fresh user experience (xlings install mcpp new → run)
320320
run: |
321-
MCPP=$(find target -path "*/bin/mcpp" | head -1)
322-
MCPP=$(cd "$(dirname "$MCPP")" && pwd)/$(basename "$MCPP")
321+
# Replace xlings mcpp with our self-hosted build
322+
MCPP_SELF=$(find target -path "*/bin/mcpp" | head -1)
323+
MCPP_SELF=$(cd "$(dirname "$MCPP_SELF")" && pwd)/$(basename "$MCPP_SELF")
324+
xlings remove mcpp -y 2>/dev/null || true
325+
MCPP_BIN=$(which mcpp 2>/dev/null || echo "$HOME/.xlings/subos/default/bin/mcpp")
326+
cp "$MCPP_SELF" "$MCPP_BIN"
327+
chmod +x "$MCPP_BIN"
328+
323329
TMP=$(mktemp -d)
324330
cd "$TMP"
325-
"$MCPP" new hello
331+
mcpp new hello
326332
cd hello
327-
"$MCPP" run
333+
mcpp run

.github/workflows/ci-windows.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,20 @@ jobs:
108108
"$MCPP_SELF" --version
109109
echo ":: Self-host smoke PASS"
110110
111-
- name: Fresh user experience (mcpp new → run)
111+
- name: Fresh user experience (xlings install mcpp new → run)
112112
shell: bash
113113
run: |
114-
# Use the self-hosted binary (current code with all fixes).
115-
# This simulates: user installs mcpp → mcpp new hello → mcpp run
114+
# Replace xlings mcpp with our self-hosted build, then test
115+
# the real user flow: mcpp new hello && cd hello && mcpp run
116+
xlings.exe remove mcpp -y 2>/dev/null || true
117+
MCPP_BIN=$(which mcpp.exe 2>/dev/null || echo "$USERPROFILE/.xlings/subos/default/bin/mcpp.exe")
118+
cp "$MCPP_SELF" "$MCPP_BIN"
119+
116120
TMP=$(mktemp -d)
117121
cd "$TMP"
118-
"$MCPP_SELF" new hello
122+
mcpp.exe new hello
119123
cd hello
120-
"$MCPP_SELF" run
124+
mcpp.exe run
121125
122126
- name: Package Windows release zip
123127
id: package

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,17 @@ jobs:
134134
"$MCPP" build
135135
"$MCPP" test
136136
137-
- name: Fresh user experience (mcpp new → run)
137+
- name: Fresh user experience (xlings install mcpp new → run)
138138
run: |
139-
MCPP=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
139+
# Replace xlings mcpp with our self-hosted build
140+
MCPP_SELF=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
141+
xlings remove mcpp -y 2>/dev/null || true
142+
MCPP_BIN=$(which mcpp 2>/dev/null || echo "$HOME/.xlings/subos/default/bin/mcpp")
143+
cp "$MCPP_SELF" "$MCPP_BIN"
144+
chmod +x "$MCPP_BIN"
145+
140146
TMP=$(mktemp -d)
141147
cd "$TMP"
142-
"$MCPP" new hello
148+
mcpp new hello
143149
cd hello
144-
"$MCPP" run
150+
mcpp run

0 commit comments

Comments
 (0)