Skip to content

Commit db5eca7

Browse files
committed
ci: note why the fresh clone needs no mtime sort
The mcpp side of this cross-validation had to sort by mtime — its target/ is restored from a cache and `find … | head -1` returned a binary an earlier push had left, with the right version string and the wrong code. Here $src is a fresh clone, so the plain form is correct; `-printf` is a GNU extension and one of the runners reaching this line is macOS.
1 parent a67c562 commit db5eca7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ jobs:
117117
# above, which is exactly what removing the file leaves.
118118
rm -f "$src/.xlings.json"
119119
( cd "$src" && mcpp build --release )
120+
# ⭐ `$src` is a FRESH clone each run, so `target/` holds exactly what
121+
# this step just built and there is no earlier fingerprint directory
122+
# to pick by mistake. `-printf` would be the safer form on a cached
123+
# tree and is a GNU extension this must not use — one of the runners
124+
# that reaches this line is macOS.
120125
built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1)
121126
[ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
122127
echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"

0 commit comments

Comments
 (0)