@@ -116,12 +116,18 @@ jobs:
116116 # above, which is exactly what removing the file leaves.
117117 rm -f "$src/.xlings.json"
118118 ( cd "$src" && mcpp build --release )
119- # ⭐ `$src` is a FRESH clone each run, so `target/` holds exactly what
120- # this step just built and there is no earlier fingerprint directory
121- # to pick by mistake. `-printf` would be the safer form on a cached
122- # tree and is a GNU extension this must not use — one of the runners
123- # that reaches this line is macOS.
124- built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1)
119+ # ⚠️ BOTH SPELLINGS, AND NO `-perm`. The matrix reaches Windows and
120+ # macOS runners too: on Windows the artefact is `mcpp.exe`, and
121+ # `-perm -u+x` is not a question that filesystem answers the way this
122+ # expects. Measured: `Finished release [optimized] in 173.44s`
123+ # followed by "mcpp did not build" — the build had succeeded and the
124+ # search was looking for the wrong name.
125+ #
126+ # `$src` is a FRESH clone each run, so `target/` holds exactly what
127+ # this step just built; `-printf` would be the safer form on a cached
128+ # tree and is a GNU extension this must not use.
129+ built=$(find "$src/target" -type f \
130+ \( -name mcpp -o -name mcpp.exe \) | head -1)
125131 [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
126132 echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
127133 # ⚠️ Reported, because a PATH entry that does not win looks exactly
@@ -237,12 +243,18 @@ jobs:
237243 # above, which is exactly what removing the file leaves.
238244 rm -f "$src/.xlings.json"
239245 ( cd "$src" && mcpp build --release )
240- # ⭐ `$src` is a FRESH clone each run, so `target/` holds exactly what
241- # this step just built and there is no earlier fingerprint directory
242- # to pick by mistake. `-printf` would be the safer form on a cached
243- # tree and is a GNU extension this must not use — one of the runners
244- # that reaches this line is macOS.
245- built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1)
246+ # ⚠️ BOTH SPELLINGS, AND NO `-perm`. The matrix reaches Windows and
247+ # macOS runners too: on Windows the artefact is `mcpp.exe`, and
248+ # `-perm -u+x` is not a question that filesystem answers the way this
249+ # expects. Measured: `Finished release [optimized] in 173.44s`
250+ # followed by "mcpp did not build" — the build had succeeded and the
251+ # search was looking for the wrong name.
252+ #
253+ # `$src` is a FRESH clone each run, so `target/` holds exactly what
254+ # this step just built; `-printf` would be the safer form on a cached
255+ # tree and is a GNU extension this must not use.
256+ built=$(find "$src/target" -type f \
257+ \( -name mcpp -o -name mcpp.exe \) | head -1)
246258 [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; }
247259 echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH"
248260 # ⚠️ Reported, because a PATH entry that does not win looks exactly
0 commit comments