11name : ci-fresh-install
22
3- # Fresh install CI — validates the first-time user experience on all platforms.
4- # No caches: simulates a clean machine where a user runs `xlings install mcpp`
5- # for the first time, creates a project, and builds it.
6- #
7- # This catches issues that cached CI misses:
8- # - Incomplete sysroot (missing linux kernel headers)
9- # - Stale toolchain cfg/specs paths
10- # - Missing xpkg dependencies (glibc, linux-headers)
3+ # Fresh install CI — simulates a real first-time user on a clean machine.
4+ # No caches, no env overrides, no self-host. Just:
5+ # 1. Install xlings
6+ # 2. Install mcpp via xlings
7+ # 3. mcpp new hello → cd hello → mcpp run
118
129on :
1310 push :
@@ -21,230 +18,69 @@ concurrency:
2118 cancel-in-progress : true
2219
2320jobs :
24- # ──────────────────────────────────────────────────────────────────
25- # Linux: fresh install → new project → build with GCC + LLVM
26- # ──────────────────────────────────────────────────────────────────
2721 linux-fresh :
2822 name : Linux fresh install
2923 runs-on : ubuntu-24.04
30- timeout-minutes : 45
31- env :
32- MCPP_HOME : /home/runner/.mcpp
24+ timeout-minutes : 30
3325 steps :
34- - uses : actions/checkout@v4
35-
36- - name : Install xlings + bootstrap mcpp (clean, no cache)
37- env :
38- XLINGS_NON_INTERACTIVE : ' 1'
39- XLINGS_VERSION : ' 0.4.30'
26+ - name : Install xlings
4027 run : |
41- tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz"
42- curl -fsSL -o "/tmp/${tarball}" \
43- "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
44- tar -xzf "/tmp/${tarball}" -C /tmp
45- "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install
46- export PATH="$HOME/.xlings/subos/default/bin:$PATH"
47- xlings --version
48- xlings install mcpp -y
49- echo "MCPP_BOOTSTRAP=$HOME/.xlings/subos/default/bin/mcpp" >> "$GITHUB_ENV"
50- echo "XLINGS_BIN=$HOME/.xlings/subos/default/bin/xlings" >> "$GITHUB_ENV"
51- echo "PATH=$HOME/.xlings/subos/default/bin:$PATH" >> "$GITHUB_ENV"
28+ curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-linux-x86_64.tar.gz -o /tmp/xlings.tar.gz
29+ tar -xzf /tmp/xlings.tar.gz -C /tmp
30+ /tmp/xlings-0.4.30-linux-x86_64/subos/default/bin/xlings self install
31+ echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
5232
53- - name : Build mcpp from source (self-host with freshly-built binary)
54- run : |
55- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
56- "$MCPP_BOOTSTRAP" self config --mirror GLOBAL
57- "$MCPP_BOOTSTRAP" build
58- MCPP_FRESH=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
59- echo "MCPP=$MCPP_FRESH" >> "$GITHUB_ENV"
60-
61- - name : " Fresh user: mcpp new → build → run (default GCC)"
62- run : |
63- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
64- TMP=$(mktemp -d)
65- cd "$TMP"
66- "$MCPP" new hello_gcc
67- cd hello_gcc
68- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "Hello"
69-
70- - name : " Fresh user: install LLVM → new → build → run"
71- run : |
72- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
73- "$MCPP" toolchain install llvm 20.1.7
74- "$MCPP" toolchain default llvm@20.1.7
75- TMP=$(mktemp -d)
76- cd "$TMP"
77- "$MCPP" new hello_llvm
78- cd hello_llvm
79- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "Hello"
80-
81- - name : " Fresh user: import std (GCC)"
82- run : |
83- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
84- "$MCPP" toolchain default gcc
85- TMP=$(mktemp -d)
86- cd "$TMP"
87- mkdir -p src
88- cat > mcpp.toml <<'TOML'
89- [package]
90- name = "std_test"
91- version = "0.1.0"
92- TOML
93- cat > src/main.cpp <<'CPP'
94- import std;
95- int main() { std::println("import std works"); }
96- CPP
97- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "import std works"
33+ - name : Install mcpp
34+ run : xlings install mcpp -y
9835
99- - name : " Fresh user: import std (LLVM) "
36+ - name : " mcpp new hello → mcpp run "
10037 run : |
101- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
102- "$MCPP" toolchain default llvm@20.1.7
103- TMP=$(mktemp -d)
104- cd "$TMP"
105- mkdir -p src
106- cat > mcpp.toml <<'TOML'
107- [package]
108- name = "std_test_llvm"
109- version = "0.1.0"
110- TOML
111- cat > src/main.cpp <<'CPP'
112- import std;
113- int main() { std::println("llvm import std works"); }
114- CPP
115- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "llvm import std works"
38+ mcpp new hello
39+ cd hello
40+ mcpp run
11641
117- # ──────────────────────────────────────────────────────────────────
118- # macOS: fresh install → new project → build with LLVM
119- # ──────────────────────────────────────────────────────────────────
12042 macos-fresh :
12143 name : macOS fresh install
12244 runs-on : macos-15
12345 timeout-minutes : 30
124- env :
125- MCPP_HOME : /Users/runner/.mcpp
12646 steps :
127- - uses : actions/checkout@v4
128-
129- - name : Install xlings + bootstrap mcpp (clean, no cache)
130- env :
131- XLINGS_NON_INTERACTIVE : ' 1'
132- XLINGS_VERSION : ' 0.4.30'
47+ - name : Install xlings
13348 run : |
134- tarball="xlings-${XLINGS_VERSION}-macosx-arm64.tar.gz"
135- curl -fsSL -o "/tmp/${tarball}" \
136- "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/${tarball}"
137- tar -xzf "/tmp/${tarball}" -C /tmp
138- "/tmp/xlings-${XLINGS_VERSION}-macosx-arm64/subos/default/bin/xlings" self install
139- export PATH="$HOME/.xlings/subos/default/bin:$PATH"
140- xlings --version
141- xlings install mcpp -y
142- echo "MCPP_BOOTSTRAP=$HOME/.xlings/subos/default/bin/mcpp" >> "$GITHUB_ENV"
143- echo "XLINGS_BIN=$HOME/.xlings/subos/default/bin/xlings" >> "$GITHUB_ENV"
144- echo "PATH=$HOME/.xlings/subos/default/bin:$PATH" >> "$GITHUB_ENV"
49+ curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-macosx-arm64.tar.gz -o /tmp/xlings.tar.gz
50+ tar -xzf /tmp/xlings.tar.gz -C /tmp
51+ /tmp/xlings-0.4.30-macosx-arm64/subos/default/bin/xlings self install
52+ echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
14553
146- - name : Build mcpp from source
147- run : |
148- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
149- "$MCPP_BOOTSTRAP" self config --mirror GLOBAL
150- "$MCPP_BOOTSTRAP" build
151- MCPP_FRESH=$(find target -type f -name mcpp ! -name '*.o' | head -1)
152- echo "MCPP=$(cd "$(dirname "$MCPP_FRESH")" && pwd)/$(basename "$MCPP_FRESH")" >> "$GITHUB_ENV"
54+ - name : Install mcpp
55+ run : xlings install mcpp -y
15356
154- - name : " Fresh user: mcpp new → build → run (LLVM) "
57+ - name : " mcpp new hello → mcpp run "
15558 run : |
156- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
157- TMP=$(mktemp -d)
158- cd "$TMP"
159- "$MCPP" new hello_mac
160- cd hello_mac
161- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "Hello"
59+ mcpp new hello
60+ cd hello
61+ mcpp run
16262
163- - name : " Fresh user: import std (LLVM)"
164- run : |
165- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
166- TMP=$(mktemp -d)
167- cd "$TMP"
168- mkdir -p src
169- cat > mcpp.toml <<'TOML'
170- [package]
171- name = "std_test_mac"
172- version = "0.1.0"
173- TOML
174- cat > src/main.cpp <<'CPP'
175- import std;
176- int main() { std::println("macos import std works"); }
177- CPP
178- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "macos import std works"
179-
180- # ──────────────────────────────────────────────────────────────────
181- # Windows: fresh install → new project → build with LLVM + MSVC STL
182- # ──────────────────────────────────────────────────────────────────
18363 windows-fresh :
18464 name : Windows fresh install
18565 runs-on : windows-latest
18666 timeout-minutes : 30
187- env :
188- MCPP_HOME : C:\Users\runneradmin\.mcpp
18967 steps :
190- - uses : actions/checkout@v4
191-
192- - name : Install xlings + bootstrap mcpp (clean, no cache)
193- env :
194- XLINGS_NON_INTERACTIVE : ' 1'
195- XLINGS_VERSION : ' 0.4.30'
68+ - name : Install xlings
19669 shell : bash
19770 run : |
198- curl -fsSL -o /tmp/xlings.zip \
199- "https://github.com/d2learn/xlings/releases/download/v${XLINGS_VERSION}/xlings-${XLINGS_VERSION}-windows-x86_64.zip"
71+ curl -fsSL https://github.com/d2learn/xlings/releases/download/v0.4.30/xlings-0.4.30-windows-x86_64.zip -o /tmp/xlings.zip
20072 mkdir -p /tmp/xlings-extract
20173 unzip -o /tmp/xlings.zip -d /tmp/xlings-extract
202- XLINGS_DIR="/tmp/xlings-extract/xlings-${XLINGS_VERSION}-windows-x86_64"
203- "$XLINGS_DIR/subos/default/bin/xlings.exe" self install
204- export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
205- xlings --version
206- xlings install mcpp -y
207- MCPP_BOOTSTRAP="$USERPROFILE/.xlings/subos/default/bin/mcpp.exe"
208- test -f "$MCPP_BOOTSTRAP"
209- echo "MCPP_BOOTSTRAP=$MCPP_BOOTSTRAP" >> "$GITHUB_ENV"
210- echo "XLINGS_BIN=$USERPROFILE/.xlings/subos/default/bin/xlings.exe" >> "$GITHUB_ENV"
74+ /tmp/xlings-extract/xlings-0.4.30-windows-x86_64/subos/default/bin/xlings.exe self install
75+ echo "$USERPROFILE/.xlings/subos/default/bin" >> "$GITHUB_PATH"
21176
212- - name : Build mcpp from source
77+ - name : Install mcpp
21378 shell : bash
214- run : |
215- export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
216- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
217- "$MCPP_BOOTSTRAP" self config --mirror GLOBAL
218- "$MCPP_BOOTSTRAP" build
219- MCPP_FRESH=$(find target -type f -name 'mcpp.exe' | head -1)
220- echo "MCPP=$(realpath "$MCPP_FRESH")" >> "$GITHUB_ENV"
221-
222- - name : " Fresh user: mcpp new → build → run"
223- shell : bash
224- run : |
225- export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
226- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
227- TMP=$(mktemp -d)
228- cd "$TMP"
229- "$MCPP" new hello_win
230- cd hello_win
231- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "Hello"
79+ run : xlings install mcpp -y
23280
233- - name : " Fresh user: import std "
81+ - name : " mcpp new hello → mcpp run "
23482 shell : bash
23583 run : |
236- export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
237- export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
238- TMP=$(mktemp -d)
239- cd "$TMP"
240- mkdir -p src
241- cat > mcpp.toml <<'TOML'
242- [package]
243- name = "std_test_win"
244- version = "0.1.0"
245- TOML
246- cat > src/main.cpp <<'CPP'
247- import std;
248- int main() { std::println("windows import std works"); }
249- CPP
250- "$MCPP" run 2>&1 | tee /dev/stderr | grep -q "windows import std works"
84+ mcpp new hello
85+ cd hello
86+ mcpp run
0 commit comments