66 pull_request :
77 branches : [main, master]
88 workflow_dispatch :
9+ inputs :
10+ sentry_crash_test :
11+ description : " After building, run --sentry-crash-test to send a real crash to Sentry (verifies symbolication)"
12+ type : boolean
13+ default : false
914
1015jobs :
1116 build-linux :
6570 # uploaded still matches the binary that ships and crashes.
6671 strip build/src/texturelab/texturelab
6772
73+ - name : Sentry crash test (manual)
74+ if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.sentry_crash_test == 'true' }}
75+ run : |
76+ export QT_QPA_PLATFORM=offscreen
77+ # Crashes before the main window opens; crashpad_handler (copied next to
78+ # the binary at build time) uploads the minidump via the built-in DSN.
79+ build/src/texturelab/texturelab --sentry-crash-test || true
80+ echo "waiting for crashpad to upload the minidump..."
81+ sleep 25
82+
6883 - name : Install LinuxDeploy
6984 uses : miurahr/install-linuxdeploy-action@v1
7085 with :
@@ -132,7 +147,7 @@ jobs:
132147 cache : true
133148
134149 - name : Configure CMake
135- run : cmake -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release - DSENTRY_BACKEND=crashpad -DTEXTURELAB_SENTRY_DSN="${{ secrets.SENTRY_DSN }}" -DCMAKE_CXX_FLAGS_RELEASE="/MD /O2 /Ob2 /DNDEBUG /Zi" -DCMAKE_EXE_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF "
150+ run : cmake -B build -G "Visual Studio 17 2022" -A x64 -DSENTRY_BACKEND=crashpad -DTEXTURELAB_SENTRY_DSN="${{ secrets.SENTRY_DSN }}"
136151
137152 - name : Build
138153 run : cmake --build build --target texturelab --config Release --parallel
@@ -145,6 +160,13 @@ jobs:
145160 SENTRY_PROJECT : ${{ secrets.SENTRY_PROJECT }}
146161 run : |
147162 Invoke-WebRequest -Uri "https://github.com/getsentry/sentry-cli/releases/latest/download/sentry-cli-Windows-x86_64.exe" -OutFile "sentry-cli.exe"
163+ $exe = "build\src\texturelab\Release\texturelab.exe"
164+ $pdb = "build\src\texturelab\Release\texturelab.pdb"
165+ if (-not (Test-Path $pdb)) { Write-Error "texturelab.pdb not found — build produced no debug info; Sentry cannot symbolicate."; exit 1 }
166+ # Log the Debug IDs. The exe's Debug ID (from its CodeView record) MUST
167+ # be non-null and match the pdb, or crash minidumps stay unsymbolicated.
168+ Write-Host "== exe Debug ID =="; .\sentry-cli.exe debug-files check $exe
169+ Write-Host "== pdb Debug ID =="; .\sentry-cli.exe debug-files check $pdb
148170 .\sentry-cli.exe debug-files upload --include-sources "build\src\texturelab\Release\"
149171
150172 - name : Deploy Qt dependencies
@@ -160,6 +182,20 @@ jobs:
160182 ) | Where-Object { Test-Path $_ } | Select-Object -First 1
161183 if ($handler) { Copy-Item $handler deploy\ } else { Write-Warning "crashpad_handler.exe not found, skipping" }
162184
185+ - name : Sentry crash test (manual)
186+ if : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.sentry_crash_test == 'true' }}
187+ shell : pwsh
188+ run : |
189+ $env:QT_QPA_PLATFORM = "offscreen"
190+ # Run the deployed bundle (Qt DLLs + crashpad_handler.exe alongside the
191+ # exe). Crashes before the main window; crashpad uploads the minidump
192+ # via the built-in DSN. Debug IDs match the PDB uploaded above.
193+ $p = Start-Process -FilePath "deploy\texturelab.exe" -ArgumentList "--sentry-crash-test" -PassThru
194+ if (-not $p.WaitForExit(60000)) { $p.Kill(); Write-Warning "timed out waiting for crash" }
195+ else { Write-Host "app exited with code $($p.ExitCode) (crash expected)" }
196+ Write-Host "waiting for crashpad to upload the minidump..."
197+ Start-Sleep -Seconds 25
198+
163199 - name : Upload Windows artifact
164200 uses : actions/upload-artifact@v4
165201 with :
0 commit comments