4646 libxdo-dev
4747
4848 - name : Install Dioxus CLI
49- # Should be pinned to same version as dioxus in Cargo.toml
50- # note: dx bundle on Windows fails with 0.7.3, see
49+ # Library deps in ui/Cargo.toml are pinned to dioxus =0.7.9, but the CLI is
50+ # held back at 0.7.2 because dx bundle path resolution regressed in 0.7.3+
51+ # and the upstream fix is still open:
5152 # https://github.com/DioxusLabs/dioxus/issues/5233
53+ # Bump in lockstep with the lib once that issue is resolved.
5254 run : cargo binstall dioxus-cli@0.7.2 --disable-telemetry --locked --force -y
5355 env :
5456 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -153,6 +155,10 @@ jobs:
153155 - name : Bundle (macOS)
154156 if : runner.os == 'macOS'
155157 working-directory : ./ui
158+ env :
159+ # Baked into the binary via `option_env!("SENTRY_DSN")` in ui/src/main.rs.
160+ # If the secret isn't set the binary just runs without Sentry reporting.
161+ SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
156162 run : dx bundle --locked --desktop --release --package-types macos
157163
158164 - name : Build DMG (appdmg)
@@ -182,6 +188,26 @@ jobs:
182188 fi
183189 codesign --force --sign "$APPLE_SIGNING_IDENTITY" --timestamp ui/dist/Datum.dmg
184190
191+ - name : Generate dSYM (macOS)
192+ if : runner.os == 'macOS' && startsWith(github.ref, 'refs/tags/v')
193+ run : |
194+ # `debug = "line-tables-only"` in workspace Cargo.toml leaves DWARF
195+ # distributed across the `.o` files in target/<triple>/<profile>/deps/
196+ # with only N_OSO references in the binary. Without a .dSYM bundle
197+ # sentry-cli has nothing to symbolicate against on macOS, so we run
198+ # dsymutil manually and stage the result outside the .app bundle so
199+ # it doesn't get packaged into the DMG.
200+ BIN="ui/target/dx/Datum/release/macos/Datum.app/Contents/MacOS/Datum"
201+ DSYM_DIR="$RUNNER_TEMP/dsyms"
202+ mkdir -p "$DSYM_DIR"
203+ if [ ! -f "$BIN" ]; then
204+ echo "Bundled binary not found at $BIN" >&2
205+ exit 1
206+ fi
207+ dsymutil "$BIN" -o "$DSYM_DIR/Datum.dSYM"
208+ ls -la "$DSYM_DIR/Datum.dSYM"
209+ dwarfdump --uuid "$DSYM_DIR/Datum.dSYM"
210+
185211 - name : Upload Debug Symbols to Sentry (macOS)
186212 if : runner.os == 'macOS' && startsWith(github.ref, 'refs/tags/v')
187213 env :
@@ -196,6 +222,7 @@ jobs:
196222 export PATH="$INSTALL_DIR:$PATH"
197223 curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=3.2.3 sh
198224 sentry-cli debug-files upload --include-sources \
225+ "$RUNNER_TEMP/dsyms" \
199226 ui/target/dx/Datum/release/macos/Datum.app/Contents/MacOS/
200227 else
201228 echo "SENTRY_AUTH_TOKEN not set, skipping debug symbol upload"
@@ -255,6 +282,8 @@ jobs:
255282 # For now we set NO_STRIP, which makes the bundles *huge*...
256283 env :
257284 NO_STRIP : true
285+ # Baked into the binary via `option_env!("SENTRY_DSN")` in ui/src/main.rs.
286+ SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
258287 run : dx bundle --locked --desktop --release --package-types appimage
259288
260289 - name : Repack AppImage using system libs (Linux)
@@ -390,6 +419,9 @@ jobs:
390419 - name : Bundle (Windows)
391420 working-directory : ./ui
392421 if : runner.os == 'Windows'
422+ env :
423+ # Baked into the binary via `option_env!("SENTRY_DSN")` in ui/src/main.rs.
424+ SENTRY_DSN : ${{ secrets.SENTRY_DSN }}
393425 run : dx bundle --locked --desktop --release --package-types nsis
394426
395427 - name : Upload Debug Symbols to Sentry (Windows)
0 commit comments