From d7bc35d9d8443110493365f66713b0f2fd5b74f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Mon, 19 Oct 2026 10:54:07 +0200 Subject: [PATCH] [CrashReporting] Upload Windows PDBs from where Ninja actually puts them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Windows branch of the symbol upload looked in build//Release, which is the Visual Studio generator's layout. The Windows leg uses Ninja, which is single-config: linker PDBs land in build//, next to the binaries — the same paths the "[Windows] Upload PDBs" artifact step below globs with if-no-files-found: error. So paths was always empty on Windows, the step printed "No symbol paths found, skipping symbol upload" and exited 0: a silent no-op behind continue-on-error. Every Windows build would then report "A required debug information file was missing" for cockatrice.exe with a PDB-style debug id (GUID-age), exactly as if no upload step existed at all. Use the artifact step's globs. Also turn the empty-path case into a failure in both symbol steps: a silent skip is indistinguishable from a successful upload (which is how the wrong path went unnoticed), and continue-on-error already keeps a broken upload from failing the release. Verified by extracting both steps' run blocks and executing the Windows branch against a Ninja-style tree: it now passes the three linker PDBs to sentry-cli (and not the CMakeFiles/*.pdb intermediates), and exits non-zero with an ::error:: annotation when there is nothing to upload. --- .github/workflows/desktop-build.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 8ef1af578..b1ea70070 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -295,8 +295,11 @@ jobs: [[ -d $dir ]] && paths+=("$dir") done if [[ ${#paths[@]} == 0 ]]; then - echo "No build output dirs found, skipping symbol upload" - exit 0 + # Fail loudly instead of skipping: see the Windows/macOS leg below — this step + # is the only way symbols reach Sentry and `continue-on-error` keeps the job + # green either way, so a silent skip looks exactly like a successful upload. + echo "::error::No debug symbol files found; nothing would be uploaded" + exit 1 fi # Project slug on Sentry; must match the project the baked DSN points at. # No --release here: `debug-files upload` has no such option (sentry-cli errors on @@ -646,11 +649,13 @@ jobs: run: | paths=() if [[ '${{ matrix.os }}' == 'Windows' ]]; then - # Top-level CMakeLists.txt links /DEBUG even in release, so PDBs land - # next to the binaries (same dirs as the PDB artifact step below). - for dir in build/cockatrice/Release build/oracle/Release build/servatrice/Release; do - [[ -d $dir ]] && paths+=("$dir") - done + # Top-level CMakeLists.txt links /DEBUG even in release, so the linker PDBs + # land next to the binaries. Ninja is single-config, so that is + # build// and NOT build//Release/ — the same globs the PDB + # artifact step below uses. + shopt -s nullglob + paths+=(build/cockatrice/*.pdb build/oracle/*.pdb build/servatrice/*.pdb) + shopt -u nullglob else # Release builds carry DWARF (-g, kept by CrashReporting.cmake); macOS keeps its # debug info in dSYM bundles, so materialize them before uploading. @@ -667,8 +672,12 @@ jobs: done fi if [[ ${#paths[@]} == 0 ]]; then - echo "No symbol paths found, skipping symbol upload" - exit 0 + # Fail loudly instead of skipping: this step is the only way symbols reach + # Sentry, and `continue-on-error` keeps the job green either way, so a + # silent skip is indistinguishable from a successful upload. It also hid a + # wrong Windows path (build//Release, which Ninja never creates). + echo "::error::No debug symbol files found; nothing would be uploaded" + exit 1 fi # Project slug on Sentry; must match the project the baked DSN points at. # No --release: see the Linux leg above — the flag does not exist on