Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ci(verify): upload macOS crash reports from failed Engine verify jobs

Richie McIlroyc8381d7253d2
diff --git a/.github/workflows/engine-verify-os.yml b/.github/workflows/engine-verify-os.yml
index 95da06162..bedfc01c2 100644
--- a/.github/workflows/engine-verify-os.yml
+++ b/.github/workflows/engine-verify-os.yml
@@ -178,6 +178,13 @@ jobs:
name: verify-archive-${{ inputs.platform }}-${{ github.run_attempt }}
path: ${{ runner.temp }}
+ # A test process that crashes (SIGSEGV) leaves no Rust backtrace;
+ # macOS writes a crash report instead, collected below on failure.
+ - name: Mark crash report start
+ if: inputs.platform == 'macos'
+ shell: bash
+ run: touch "$RUNNER_TEMP/crash-reports-since"
+
- name: Prepare recorded fixtures without concurrent rendering
if: contains(format(',{0},', inputs.suites), ',export,')
shell: bash
@@ -217,6 +224,21 @@ jobs:
--junit "$CAP_VERIFY_REPORT_DIR/junit.xml" --flaky "$CAP_VERIFY_FLAKY_FILE"
"$CAP_VERIFY_REPORT_DIR" >> "$GITHUB_STEP_SUMMARY"
+ - name: Collect macOS crash reports
+ if: failure() && inputs.platform == 'macos'
+ continue-on-error: true
+ shell: bash
+ run: |
+ dest="$RUNNER_TEMP/verify-report/crash-reports"
+ for dir in "$HOME/Library/Logs/DiagnosticReports" /Library/Logs/DiagnosticReports; do
+ [[ -d "$dir" ]] || continue
+ find "$dir" -type f \( -name '*.ips' -o -name '*.crash' \) -newer "$RUNNER_TEMP/crash-reports-since" -print0 2>/dev/null |
+ while IFS= read -r -d '' report; do
+ mkdir -p "$dest"
+ cp "$report" "$dest/" && echo "collected $report" || echo "could not copy $report"
+ done
+ done
+
- name: Upload report
if: always() && steps.test.outcome != 'skipped'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2