1717 workflow_dispatch :
1818
1919env :
20- MCPP_VERSION : 2026.8.19 .4
20+ MCPP_VERSION : 2026.8.24 .4
2121 XLINGS_VERSION : v2026.8.17.2
2222 XLINGS_NON_INTERACTIVE : ' 1'
2323
@@ -107,61 +107,6 @@ jobs:
107107 xlings install xim:qemu-riscv -y
108108 XLINGS_HOME="$HOME/.mcpp/registry" xlings install xim:qemu-riscv -y
109109
110- # ⚠️ THE BUILD TOOL IS BUILT FROM A BRANCH, AND THAT IS TEMPORARY.
111- #
112- # This step needs four decisions that no released mcpp makes yet, each of
113- # which belongs to the tool rather than to this package:
114- #
115- # `import std` is gated on whether a package PROVIDES a standard
116- # library for the target rather than on whether the target is
117- # freestanding; a package may carry its own std module source;
118- # `-fno-exceptions` / `-fno-rtti` / `-ffreestanding` come off when the
119- # graph supplies a C++ runtime built for the target; and unwind tables
120- # go on, because the compiler turns them off for this kind of target
121- # and a partial set of tables stops the walk rather than degrading it.
122- #
123- # They are on mcpp-community/mcpp#486. Until that is released this job
124- # builds the tool the same way every other dependency here is taken —
125- # from the branch — so the criterion below is actually enforced instead
126- # of being a comment saying it was verified once on a laptop.
127- #
128- # ⇒ When #486 ships, delete this step and raise MCPP_VERSION.
129- - name : The build tool, from the branch that has what this needs
130- if : matrix.toolchain == 'llvm@22.1.8'
131- run : |
132- set -euo pipefail
133- git clone --depth 1 -b feat/import-std-capability \
134- https://github.com/mcpp-community/mcpp "$RUNNER_TEMP/mcpp-src"
135- cd "$RUNNER_TEMP/mcpp-src"
136- # ⚠️ THE CLONE CARRIES A WORKSPACE PIN, AND IT NAMES A VERSION THE
137- # INDEX NO LONGER HAS.
138- #
139- # xlings: version '2026.8.17.1' not found for 'mcpp'
140- # available: 2026.8.19.4
141- #
142- # `.xlings.json` at a repository root says which mcpp a build in that
143- # tree uses, and mcpp's own bootstrap pin does not move when mcpp is
144- # released — it is the version that was current when the pin was last
145- # touched. Cloning the branch therefore imports a pin that is only
146- # valid inside that repository's own CI, where the same file selects
147- # what gets installed.
148- #
149- # Rewriting it to the version this job already installed is what makes
150- # the two agree. It changes nothing about what is being tested: the
151- # pin selects the tool that BUILDS mcpp, and what is under test is the
152- # mcpp that comes out.
153- printf '{\n "workspace": {\n "mcpp": "%s"\n }\n}\n' "$MCPP_VERSION" > .xlings.json
154- # ⚠️ `--dev` AND NOT `--release`. What is under test is a set of
155- # decisions the tool makes about compile flags; an optimisation level
156- # changes none of them. Measured: the release self-build took over
157- # half an hour of a sixty-minute job on a two-core runner, which is
158- # most of the budget spent on something the test does not observe.
159- mcpp build --dev
160- BUILT=$(find target -type f -name mcpp -perm -u+x | head -1)
161- [ -n "$BUILT" ] || { echo "::error::mcpp did not build"; exit 1; }
162- echo "$(cd "$(dirname "$BUILT")" && pwd)" >> "$GITHUB_PATH"
163- "$BUILT" --version
164-
165110 - name : The same source on bare metal, with exceptions
166111 if : matrix.toolchain == 'llvm@22.1.8'
167112 run : |
@@ -175,7 +120,18 @@ jobs:
175120 grep -q '"qemu-system-riscv64"' mcpp.toml \
176121 || { echo "::error::the manifest no longer carries the bare emulator name"; exit 1; }
177122 sed -i "s|\"qemu-system-riscv64\"|\"$Q\"|" mcpp.toml
178- mcpp run 2>&1 | tee out.log
123+ # ⚠️ `--target riscv64-none-elf`, AND THE FLAG IS THE WHOLE STEP.
124+ #
125+ # This manifest carries no `[build] target`, so a bare `mcpp run`
126+ # builds for the HOST and passes — the four lines below appear either
127+ # way, which is the manifest's own claim and not an accident. A step
128+ # named "on bare metal" that omits the flag therefore reports green
129+ # over a host build and has never once reached OpenSBI. Measured
130+ # 2026-08-24: the artefact was `target/x86_64-linux-gnu/…`.
131+ mcpp run --target riscv64-none-elf 2>&1 | tee out.log
132+ # The emulator's own banner, so a run that never left the host cannot
133+ # satisfy this step by printing the four application lines.
134+ grep -q 'Boot HART' out.log # firmware ran; this is OpenSBI
179135 grep -q 'sorted: 2 4 7' out.log # containers + algorithms + the allocator
180136 grep -q 'caught: 42' out.log # the unwinder found the handler
181137 grep -q 'unwound: true' out.log # ⭐ and ran a destructor on the way
@@ -195,8 +151,16 @@ jobs:
195151 cd examples/same-source && mcpp run 2>&1 | tee host.log
196152 grep -q 'import std over openkal: ok' host.log
197153 # The four lines are the same four lines.
198- diff <(grep -E '^(sorted|caught|unwound|import std over openkal):' out.log) \
199- <(grep -E '^(sorted|caught|unwound|import std over openkal):' host.log)
154+ #
155+ # ⚠️ `tr -d '\r'` ON BOTH SIDES, AND IT IS NOT COSMETIC. The bare-metal
156+ # run reaches the console through an emulated 16550 UART, and a serial
157+ # console terminates lines with CRLF; the native run does not. Without
158+ # this the diff reports four differing lines whose visible text is
159+ # identical, which reads as a failure of the claim being tested rather
160+ # than of the transport carrying it. The assertion is about what the
161+ # program printed, not about how the bytes arrived.
162+ diff <(grep -E '^(sorted|caught|unwound|import std over openkal):' out.log | tr -d '\r') \
163+ <(grep -E '^(sorted|caught|unwound|import std over openkal):' host.log | tr -d '\r')
200164
201165 # ⭐⭐ AND THE SAME SOURCE FOR TWO MACHINES THIS ONE IS NOT.
202166 #
@@ -398,25 +362,6 @@ jobs:
398362 mcpp toolchain install llvm 22.1.8
399363 mcpp toolchain default 'llvm@22.1.8'
400364
401- # ⚠️ Same temporary step as the Linux job: the decisions this exercises are
402- # on mcpp#486 and not in any release. When that ships, this goes and
403- # MCPP_VERSION rises. See the long note in the `runtime` job.
404- - name : The build tool, from the branch that has what this needs
405- run : |
406- set -euo pipefail
407- git clone --depth 1 -b feat/import-std-capability \
408- https://github.com/mcpp-community/mcpp "$RUNNER_TEMP/mcpp-src"
409- cd "$RUNNER_TEMP/mcpp-src"
410- printf '{\n "workspace": {\n "mcpp": "%s"\n }\n}\n' "$MCPP_VERSION" > .xlings.json
411- mcpp build --dev
412- # ⚠️ Named exactly, and `-perm` is not used. On Windows every file
413- # reads as executable, so a permission test selects nothing useful;
414- # `mcpp.exe` is the name there and `mcpp` everywhere else.
415- BUILT=$(find target -type f \( -name 'mcpp' -o -name 'mcpp.exe' \) | head -1)
416- [ -n "$BUILT" ] || { echo "::error::mcpp did not build"; exit 1; }
417- echo "$(cd "$(dirname "$BUILT")" && pwd)" >> "$GITHUB_PATH"
418- "$BUILT" --version
419-
420365 - name : Every target, from this host
421366 run : |
422367 set -euo pipefail
0 commit comments