Skip to content

Commit 8e5f9c1

Browse files
committed
fix: fresh user test — exactly what a real user does, nothing more
mcpp new hello cd hello mcpp run No find, no cp, no env manipulation. mcpp is already in PATH from the xlings install step. This is the real first-use experience.
1 parent 1ea3a02 commit 8e5f9c1

3 files changed

Lines changed: 17 additions & 36 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -316,18 +316,10 @@ jobs:
316316
"$MCPP" --version
317317
echo ":: Self-host smoke PASS"
318318
319-
- name: Fresh user experience (clean env, mcpp new → build → run)
319+
- name: Fresh user experience (xlings install mcpp → new → run)
320320
run: |
321-
# Use the self-hosted mcpp with its existing MCPP_HOME but
322-
# unset MCPP_VENDORED_XLINGS to test self-contained behavior.
323-
MCPP=$(find target -path "*/bin/mcpp" | head -1)
324-
MCPP=$(cd "$(dirname "$MCPP")" && pwd)/$(basename "$MCPP")
325-
FRESH=$(mktemp -d)
326-
cd "$FRESH"
327-
env -u MCPP_VENDORED_XLINGS "$MCPP" new hello
321+
TMP=$(mktemp -d)
322+
cd "$TMP"
323+
mcpp new hello
328324
cd hello
329-
env -u MCPP_VENDORED_XLINGS "$MCPP" build
330-
out=$(env -u MCPP_VENDORED_XLINGS "$MCPP" run 2>&1)
331-
echo "$out"
332-
echo "$out" | grep -q "Hello from hello" || { echo "FAIL: unexpected output"; exit 1; }
333-
echo ":: Fresh user experience PASS"
325+
mcpp run

.github/workflows/ci-windows.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,14 @@ jobs:
108108
"$MCPP_SELF" --version
109109
echo ":: Self-host smoke PASS"
110110
111-
- name: Fresh user experience (clean env, mcpp new → build → run)
111+
- name: Fresh user experience (xlings install mcpp → new → run)
112112
shell: bash
113113
run: |
114-
# Unset MCPP_VENDORED_XLINGS — mcpp should use its own bundled xlings.
115-
# MCPP_HOME stays (resolved from binary location by mcpp itself).
116-
unset MCPP_VENDORED_XLINGS
117-
unset XLINGS_BIN
118-
FRESH=$(mktemp -d)
119-
cd "$FRESH"
120-
"$MCPP_SELF" new hello
114+
TMP=$(mktemp -d)
115+
cd "$TMP"
116+
mcpp.exe new hello
121117
cd hello
122-
"$MCPP_SELF" build
123-
out=$("$MCPP_SELF" run 2>&1)
124-
echo "$out"
125-
echo "$out" | grep -q "Hello from hello" || { echo "FAIL: unexpected output"; exit 1; }
126-
echo ":: Fresh user experience PASS"
118+
mcpp.exe run
127119
128120
- name: Package Windows release zip
129121
id: package

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,12 @@ jobs:
134134
"$MCPP" build
135135
"$MCPP" test
136136
137-
- name: Fresh user experience (clean env, mcpp new → build → run)
137+
- name: Fresh user experience (xlings install mcpp → new → run)
138+
env:
139+
XLINGS_NON_INTERACTIVE: '1'
138140
run: |
139-
MCPP=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
140-
FRESH=$(mktemp -d)
141-
cd "$FRESH"
142-
env -u MCPP_VENDORED_XLINGS "$MCPP" new hello
141+
TMP=$(mktemp -d)
142+
cd "$TMP"
143+
mcpp new hello
143144
cd hello
144-
env -u MCPP_VENDORED_XLINGS "$MCPP" build
145-
out=$(env -u MCPP_VENDORED_XLINGS "$MCPP" run 2>&1)
146-
echo "$out"
147-
echo "$out" | grep -q "Hello from hello" || { echo "FAIL: unexpected output"; exit 1; }
148-
echo ":: Fresh user experience PASS"
145+
mcpp run

0 commit comments

Comments
 (0)