Skip to content

Commit c4913c5

Browse files
committed
ci: substitute the specification per step, not per job
Measured 2026-08-28 across the eight repositories of this ecosystem while one change spanned all of them: eight jobs in four of them called `mcpp build' at a point where the manifest still named openkal BY VERSION, so a version under review -- which by definition is not published -- failed them with E_NOT_FOUND. The mechanism is not a missing substitution. run-conformance.sh substitutes the manifest and RESTORES IT ON EXIT, correctly; every step after it is back to naming a version. So an audit asking "does this job substitute?" passes the job and misses the steps, which is how the first pass at this found three repositories and not four. These steps are green on main and can only be green there, because there the published version is the one under test. It is not a check that fails, it is a check that cannot run at the only time it would have something to say. The substitution is also portable now: the opensbi and uefi portability jobs run on macOS and Windows, where BSD sed requires an argument to -i that GNU sed refuses.
1 parent 157d315 commit c4913c5

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,16 @@ jobs:
289289
- name: Point at the specification's working tree
290290
run: |
291291
set -euo pipefail
292-
sed -i 's|^openkal = .*$|openkal = { path = ".spec" }|' mcpp.toml
293-
grep -q 'path = ".spec"' mcpp.toml \
294-
|| { echo "::error::the specification was not substituted"; exit 1; }
292+
# ⚠️ NOT `sed -i'. This step runs on macOS and on Windows too, and
293+
# BSD sed requires an argument to -i that GNU sed refuses. A temporary
294+
# file is the spelling that holds on all three.
295+
subst() { # subst <file> <relative-path-to-the-specification>
296+
sed "s|^openkal = .*$|openkal = { path = \"$2\" }|" "$1" > "$1.next"
297+
mv "$1.next" "$1"
298+
grep -q "path = \"$2\"" "$1" \
299+
|| { echo "::error::$1 was not substituted"; exit 1; }
300+
}
301+
subst mcpp.toml .spec
295302
296303
- name: Install wine
297304
run: |

0 commit comments

Comments
 (0)