Commit 212e6c5
authored
ci: add fresh-install workflow for first-time user experience (#63)
* ci: add fresh-install workflow for first-time user experience
Validates the released mcpp binary via xlings on all platforms:
- Linux: xlings install mcpp → mcpp build (self) → mcpp new → mcpp run
+ install LLVM → mcpp new → mcpp run (continue-on-error)
- macOS: xlings install mcpp → mcpp build → mcpp new → mcpp run
- Windows: xlings install mcpp → mcpp build → mcpp new → mcpp run
No caches — simulates a clean machine. Catches issues like incomplete
sysroot, stale cfg paths, missing xpkg dependencies.
* ci: add Windows LLVM smoke test + ci-fresh-install workflow
Main CI changes:
- ci-windows.yml: add explicit "Toolchain: LLVM — mcpp new → build → run"
smoke test (previously only soft fallback via || true)
- All three main CIs (ci.yml, ci-macos.yml, ci-windows.yml) no longer
have continue-on-error fresh user tests (removed in PR #62)
Toolchain coverage after this change:
Linux: gcc@16.1.0 ✓ musl-gcc@15.1.0 ✓ llvm@20.1.7 ✓
macOS: llvm@20.1.7 ✓ (comprehensive module tests)
Windows: llvm@20.1.7 ✓ (explicit smoke test)
New workflow:
- ci-fresh-install.yml: tests released mcpp via xlings on clean machines
(no caches). Validates real first-time user experience separately
from PR code testing.
* fix: ci.yml — install musl-gcc before setting default
The musl-gcc test step assumed the toolchain was already cached.
After cache clears, `toolchain default gcc@15.1.0-musl` fails with
"not installed". Add explicit install before setting default.
* ci: toolchain smoke tests build mcpp itself, not hello world
Each toolchain now builds mcpp from source (self-host) instead of
a trivial hello-world project. This validates that the toolchain
can compile a real C++23 modules codebase.
Coverage:
Linux: gcc@16.1.0 builds mcpp ✓
musl-gcc@15.1.0 builds mcpp ✓
llvm@20.1.7 builds mcpp ✓
macOS: llvm@20.1.7 builds mcpp ✓ (default, in self-host smoke)
Windows: llvm@20.1.7 builds mcpp ✓ (new step)
* ci: each platform's every toolchain builds mcpp itself
Merge redundant self-host smoke steps into unified toolchain steps.
Each supported toolchain per platform does: clean → build mcpp → verify.
Linux: gcc@16.1.0 (+ test), musl-gcc@15.1.0, llvm@20.1.7
macOS: llvm@20.1.7
Windows: llvm@20.1.7
* ci: complete CI architecture — dev CI + release validation CI
Two-tier CI design:
Tier 1 — PR/dev CI (ci.yml, ci-macos.yml, ci-windows.yml):
Runs on every PR. Builds mcpp from source, runs tests + e2e,
then verifies each platform's supported toolchains can build mcpp:
Linux: gcc@16.1.0 (+test), musl-gcc@15.1.0, llvm@20.1.7
macOS: llvm@20.1.7
Windows: llvm@20.1.7
Tier 2 — Release validation CI (ci-fresh-install.yml):
Manual trigger + daily schedule. Tests released mcpp via xlings
on clean machines (no caches). For each platform, every supported
toolchain: new → run (basic project) + build mcpp (self-host).
Linux: gcc, musl-gcc, llvm — new+run + build mcpp
macOS: llvm — new+run + build mcpp
Windows: llvm — new+run + build mcpp
ci-fresh-install no longer runs on PRs (it tests released mcpp,
not PR code). Moved to workflow_dispatch + daily cron.
* ci: temporarily enable ci-fresh-install on PR for validation
* ci: ci-fresh-install — fix GCC version, remove PR trigger
- GCC: don't set toolchain default (GCC is already default after
xlings install mcpp), fixes "gcc@ is not installed" error
- Remove pull_request trigger: ci-fresh-install tests released mcpp
(not PR code), so it should not block PRs. Runs on push to main,
workflow_dispatch, and daily schedule only.
* fix: save mcpp binary before clean in toolchain smoke tests
mcpp clean deletes target/ which contains the freshly-built binary.
Copy it to /tmp before running clean so it survives.
Also: clear Windows BMI cache (--bmi-cache) to avoid MSVC version
mismatch errors from stale std.pcm.
* fix: Windows packaging — find mcpp.exe from target/ instead of stale $MCPP_SELF
* fix: CI toolchain tests actually use correct toolchain + assertions
Review findings addressed:
1. Linux musl/LLVM steps were NOT actually using those toolchains
(mcpp.toml [toolchain].default overrides global default).
Fix:
- musl: use `mcpp build --target x86_64-linux-musl`
- LLVM: sed-override mcpp.toml before build
- All steps: grep assertion on "Resolved <toolchain>" output
2. Windows: remove `|| true` on critical config/default commands
that silently swallowed failures.
3. Windows: add explicit `mcpp new hello → mcpp run` smoke test
(covers first-run user path that E2E skips due to missing
fresh-sandbox capability).
4. All toolchain build steps: assert via grep that the expected
toolchain was actually resolved.
* fix: CI — tee to file instead of /dev/stderr (Windows compat), precise grep
- Replace `tee /dev/stderr` with `tee build.log` (Git Bash on Windows
doesn't have /dev/stderr)
- All grep assertions read from build.log file
- musl grep: "musl" → "Resolved gcc@15.1.0-musl" (more precise)1 parent 3f9a369 commit 212e6c5
4 files changed
Lines changed: 204 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
315 | 318 | | |
316 | 319 | | |
317 | | - | |
318 | | - | |
319 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
| 99 | + | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
| |||
118 | 128 | | |
119 | 129 | | |
120 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
121 | 134 | | |
122 | 135 | | |
123 | | - | |
| 136 | + | |
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
146 | 142 | | |
147 | | - | |
| 143 | + | |
148 | 144 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 145 | + | |
| 146 | + | |
156 | 147 | | |
157 | | - | |
| 148 | + | |
158 | 149 | | |
159 | | - | |
160 | 150 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
0 commit comments