@@ -112,12 +112,18 @@ jobs:
112112 # above, which is exactly what removing the file leaves.
113113 rm -f "$src/.xlings.json"
114114 ( cd "$src" && mcpp build --release )
115- # ⭐ `$src` is a FRESH clone each run, so `target/` holds exactly what
116- # this step just built and there is no earlier fingerprint directory
117- # to pick by mistake. `-printf` would be the safer form on a cached
118- # tree and is a GNU extension this must not use — one of the runners
119- # that reaches this line is macOS.
120- built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1)
115+ # ⚠️ BOTH SPELLINGS, AND NO `-perm`. The matrix reaches Windows and
116+ # macOS runners too: on Windows the artefact is `mcpp.exe`, and
117+ # `-perm -u+x` is not a question that filesystem answers the way this
118+ # expects. Measured: `Finished release [optimized] in 173.44s`
119+ # followed by "mcpp did not build" — the build had succeeded and the
120+ # search was looking for the wrong name.
121+ #
122+ # `$src` is a FRESH clone each run, so `target/` holds exactly what
123+ # this step just built; `-printf` would be the safer form on a cached
124+ # tree and is a GNU extension this must not use.
125+ built=$(find "$src/target" -type f \
126+ \( -name mcpp -o -name mcpp.exe \) | head -1)
121127 [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
122128 echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
123129 # ⚠️ Reported, because a PATH entry that does not win looks exactly
@@ -335,12 +341,18 @@ jobs:
335341 # above, which is exactly what removing the file leaves.
336342 rm -f "$src/.xlings.json"
337343 ( cd "$src" && mcpp build --release )
338- # ⭐ `$src` is a FRESH clone each run, so `target/` holds exactly what
339- # this step just built and there is no earlier fingerprint directory
340- # to pick by mistake. `-printf` would be the safer form on a cached
341- # tree and is a GNU extension this must not use — one of the runners
342- # that reaches this line is macOS.
343- built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1)
344+ # ⚠️ BOTH SPELLINGS, AND NO `-perm`. The matrix reaches Windows and
345+ # macOS runners too: on Windows the artefact is `mcpp.exe`, and
346+ # `-perm -u+x` is not a question that filesystem answers the way this
347+ # expects. Measured: `Finished release [optimized] in 173.44s`
348+ # followed by "mcpp did not build" — the build had succeeded and the
349+ # search was looking for the wrong name.
350+ #
351+ # `$src` is a FRESH clone each run, so `target/` holds exactly what
352+ # this step just built; `-printf` would be the safer form on a cached
353+ # tree and is a GNU extension this must not use.
354+ built=$(find "$src/target" -type f \
355+ \( -name mcpp -o -name mcpp.exe \) | head -1)
344356 [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
345357 echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
346358 # ⚠️ Reported, because a PATH entry that does not win looks exactly
0 commit comments