Skip to content

Commit d2e10cc

Browse files
committed
ci(macos): sandbox uses LLVM_ROOT's exact version; forensics captures crash reports
The version-glob pick chose a stale cached 20.1.7 beside the freshly installed 22.1.8 — rounds 1-3 never actually tested the new llvm. Also capture the newest .ips crash report after a direct failing run (the SIGABRT is silent on stderr).
1 parent 0df0238 commit d2e10cc

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,10 @@ jobs:
286286
287287
- name: Configure dev mcpp sandbox to reuse xlings LLVM
288288
run: |
289-
# Discover whatever LLVM version `xlings install llvm` provided —
290-
# hardcoding it (20.1.7) broke the job the day xlings bumped its
291-
# default to 22.1.8.
292-
LLVM_PKG=$(ls -d "$HOME/.xlings/data/xpkgs/xim-x-llvm"/*/ 2>/dev/null | head -1)
293-
LLVM_PKG="${LLVM_PKG%/}"
289+
# Use EXACTLY the LLVM the install step resolved (env LLVM_ROOT) —
290+
# a version-glob pick chose a stale cached 20.1.7 next to the
291+
# freshly installed 22.1.8 and silently tested the wrong toolchain.
292+
LLVM_PKG="$LLVM_ROOT"
294293
test -d "$LLVM_PKG"
295294
LLVM_VER=$(basename "$LLVM_PKG")
296295
echo "MCPP_LLVM_VER=$LLVM_VER" >> "$GITHUB_ENV"
@@ -348,7 +347,14 @@ jobs:
348347
echo "--- otool -L ---"; otool -L "$BIN" || true
349348
echo "--- rpaths ---"; otool -l "$BIN" | grep -A2 LC_RPATH || true
350349
echo "--- direct run ---"
351-
"$BIN" 2>&1 | head -20 || echo "exit=$?"
350+
set +e
351+
"$BIN" > run.out 2>&1
352+
echo "exit=$?"
353+
head -20 run.out
354+
sleep 3
355+
echo "--- newest crash report ---"
356+
CR=$(ls -t "$HOME/Library/Logs/DiagnosticReports"/*.ips 2>/dev/null | head -1)
357+
[ -n "$CR" ] && head -c 4000 "$CR" || echo "none"
352358
353359
- name: E2E suite
354360
# See ci-linux.yml — fail-fast on hung tests instead of burning the

0 commit comments

Comments
 (0)