Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
108677e
fix(windows): ship the native library as `sentry-native`
bitsandfoxes Sep 10, 2026
557683d
Merge remote-tracking branch 'origin/main' into fix/native-library-na…
bitsandfoxes Sep 11, 2026
9b79808
cleanup
bitsandfoxes Sep 11, 2026
ed8ea3b
Merge remote-tracking branch 'origin/main' into fix/windows-x86-nativ…
bitsandfoxes Sep 11, 2026
5e79198
added x86 windows native build
bitsandfoxes Sep 11, 2026
09ccd61
updated changelog
bitsandfoxes Sep 11, 2026
0e29247
Merge remote-tracking branch 'origin/main' into fix/native-library-na…
bitsandfoxes Sep 11, 2026
8e13975
updated changelog
bitsandfoxes Sep 11, 2026
d8a7531
Merge branch 'fix/native-library-name-clash' of https://github.com/ge…
bitsandfoxes Sep 11, 2026
46fd252
Merge branch 'fix/native-library-name-clash' into fix/windows-x86-nat…
bitsandfoxes Sep 11, 2026
92dae22
windows x86 ci guard
bitsandfoxes Sep 11, 2026
e9a220b
fix(android): use serializedVersion 2 plugin meta so 2021.3 includes …
bitsandfoxes Sep 11, 2026
b482471
Merge branch 'fix/native-library-name-clash' into fix/windows-x86-nat…
bitsandfoxes Sep 11, 2026
d4c17c2
ci: temporary probe for the hanging windows x86 player
bitsandfoxes Sep 11, 2026
40eed75
ci: dump the hung windows x86 player
bitsandfoxes Sep 11, 2026
cf78a20
ci: dump the x86 player with a 32-bit dumper
bitsandfoxes Sep 11, 2026
0766d42
run ci
bitsandfoxes Sep 11, 2026
2cdf869
fix(windows): declare cdecl on the sentry-native p/invokes
bitsandfoxes Sep 11, 2026
09782ec
Merge remote-tracking branch 'origin/fix/native-library-name-clash' i…
bitsandfoxes Sep 11, 2026
34e3dbe
fix: x86 support for Windows
mujacica Sep 24, 2026
ae3ef44
Fix sentry_attach_file/bytes return type to match sentry_uuid_t
tustanivsky Sep 24, 2026
ce4f003
Align Switch attachment stubs with sentry_uuid_t return type
tustanivsky Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,23 @@ jobs:
with:
unity-version: ${{ matrix.unity-version }}

test-build-windows-x86:
# Unity still ships a 32-bit standalone player and it needs its own sentry-native build.
# One version, native backend only: x86 is on its way out and the x64 matrix already covers
# the version spread and the crashpad backend. The version is the first matrix entry rather
# than a literal, because `test-create` only builds what the matrix holds and Unity-bump PRs
# narrow it to the bumped version. The lists in create-unity-matrix.yml are oldest-first.
name: Build Windows x86 ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version[0] }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [test-create, create-unity-matrix]
secrets:
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_TEST_DSN: ${{ secrets.SENTRY_TEST_DSN }}
uses: ./.github/workflows/test-build-windows-x86.yml
with:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version[0] }}

test-build-windows-mono:
# The Mono scripting backend resolves P/Invokes differently than IL2CPP, so it needs its own
# player. One version, default (Crashpad) backend only: the IL2CPP matrix already covers the
Expand Down Expand Up @@ -500,6 +517,20 @@ jobs:
platform: windows
backend: ${{ matrix.backend }}

test-run-windows-x86:
name: Run Windows x86 native ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version[0] }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [test-build-windows-x86, create-unity-matrix]
secrets:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_TEST_DSN: ${{ secrets.SENTRY_TEST_DSN }}
uses: ./.github/workflows/test-run-desktop.yml
with:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version[0] }}
platform: windows
architecture: x86
backend: native

test-run-windows-mono:
name: Run Windows Mono ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version[0] }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
Expand Down
143 changes: 143 additions & 0 deletions .github/workflows/test-build-windows-x86.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: "Test: Build Windows x86"
on:
workflow_call:
inputs:
unity-version:
required: true
type: string
secrets:
UNITY_LICENSE_SERVER_CONFIG:
required: true
SENTRY_AUTH_TOKEN:
required: true
SENTRY_TEST_DSN:
required: true

defaults:
run:
shell: pwsh

jobs:
build:
name: Windows x86 ${{ inputs.unity-version }}
runs-on: windows-latest
env:
UNITY_VERSION: ${{ inputs.unity-version }}
BUILD_PLATFORM: Windows-x86

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Load env
id: env
run: |
$u = (Get-Content scripts/unity-versions.json -Raw | ConvertFrom-Json).'${{ env.UNITY_VERSION }}'
"unityVersion=$($u.version)" >> $env:GITHUB_OUTPUT
"unityChangeset=$($u.changeset)" >> $env:GITHUB_OUTPUT

- name: Setup Unity
uses: getsentry/setup-unity@61c0c0944851685b6c1225e940d1b1ab349e3aa3
with:
unity-version: ${{ steps.env.outputs.unityVersion }}
unity-version-changeset: ${{ steps.env.outputs.unityChangeset }}
unity-modules: windows-il2cpp

- name: Create Unity license config
run: |
New-Item -Path "C:/ProgramData/Unity/config/" -ItemType Directory -Force
Set-Content -Path "C:/ProgramData/Unity/config/services-config.json" -Value "$env:UNITY_LICENSE_SERVER_CONFIG"
env:
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Download IntegrationTest project
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: test-${{ env.UNITY_VERSION }}

- name: Extract project archive
run: tar -xvzf test-project.tar.gz

- name: Restore Unity Library cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: samples/IntegrationTest/Library
key: it-library-windows-x86-${{ env.UNITY_VERSION }}-${{ github.run_id }}
restore-keys: |
it-library-windows-x86-${{ env.UNITY_VERSION }}-

- name: Download UPM package
uses: ./.github/actions/wait-for-artifact
with:
name: package-release

- name: Extract UPM package
run: ./test/Scripts.Integration.Test/extract-package.ps1

- name: Add Sentry to the project
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "$env:UNITY_PATH" -PackagePath "test-package-release"

- name: Download DependencyConflict package
uses: ./.github/actions/wait-for-artifact
with:
name: dependency-conflict-package
path: dependency-conflict-package

- name: Add DependencyConflict to the project
run: ./test/Scripts.Integration.Test/add-dependency-conflict.ps1 -PackagePath "dependency-conflict-package"

- name: Configure Sentry
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform Windows
env:
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}

# Native backend only. The point of this job is that a 32-bit player loads a 32-bit
# sentry-native at all; covering both backends here would double Unity licence usage
# for no extra signal. The x64 matrix still covers crashpad.
- name: Select the Native backend
run: |
$optionsPath = "samples/IntegrationTest/Assets/Scripts/IntegrationOptionsConfiguration.cs"
$content = Get-Content $optionsPath -Raw
$content = $content -replace 'WindowsBackend = WindowsBackend.Crashpad', 'WindowsBackend = WindowsBackend.Native'
Set-Content $optionsPath $content

- name: Build with Sentry SDK
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform Windows-x86 -UnityVersion "$env:UNITY_VERSION"
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

- name: Assert symbols and sources were uploaded
run: ./test/Scripts.Integration.Test/assert-symbol-upload.ps1 -LogPath unity.log

# We create tar explicitly because upload-artifact is slow for many files.
- name: Create archive
run: |
Remove-Item -Recurse -Force samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame -ErrorAction SilentlyContinue
Copy-Item unity.log samples/IntegrationTest/Build/ -ErrorAction SilentlyContinue
tar -cvzf test-app-desktop.tar.gz samples/IntegrationTest/Build

- name: Upload test app
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: testapp-desktop-compiled-${{ env.UNITY_VERSION }}-windows-x86-native
if-no-files-found: error
path: test-app-desktop.tar.gz
retention-days: 14

- name: Save Unity Library cache
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: samples/IntegrationTest/Library
key: it-library-windows-x86-${{ env.UNITY_VERSION }}-${{ github.run_id }}

- name: Upload IntegrationTest project on failure
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: failed-project-desktop-windows-x86-${{ env.UNITY_VERSION }}
path: |
samples/IntegrationTest
unity.log
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame
retention-days: 14
11 changes: 8 additions & 3 deletions .github/workflows/test-run-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
type: string
default: ""
description: "macOS: native or cocoa. Windows: native or crashpad. Linux: native or breakpad."
architecture:
required: false
type: string
default: ""
description: "Only set for non-default architectures, e.g. x86 for the 32-bit Windows player."
scripting:
required: false
type: string
Expand All @@ -31,7 +36,7 @@ defaults:

jobs:
run:
name: ${{ inputs.platform }}${{ inputs.scripting && format(' {0}', inputs.scripting) || '' }}${{ inputs.backend && format(' ({0})', inputs.backend) || '' }} ${{ inputs.unity-version }}
name: ${{ inputs.platform }}${{ inputs.architecture && format(' {0}', inputs.architecture) || '' }}${{ inputs.scripting && format(' {0}', inputs.scripting) || '' }}${{ inputs.backend && format(' ({0})', inputs.backend) || '' }} ${{ inputs.unity-version }}
runs-on: ${{ inputs.platform == 'linux' && 'ubuntu-latest' || inputs.platform == 'macos' && 'macos-latest' || 'windows-latest' }}
env:
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}
Expand All @@ -48,7 +53,7 @@ jobs:
- name: Download test app artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: testapp-desktop-compiled-${{ inputs.unity-version }}-${{ inputs.platform }}${{ inputs.scripting && format('-{0}', inputs.scripting) || '' }}${{ inputs.backend && format('-{0}', inputs.backend) || '' }}
name: testapp-desktop-compiled-${{ inputs.unity-version }}-${{ inputs.platform }}${{ inputs.architecture && format('-{0}', inputs.architecture) || '' }}${{ inputs.scripting && format('-{0}', inputs.scripting) || '' }}${{ inputs.backend && format('-{0}', inputs.backend) || '' }}

- name: Extract test app
run: tar -xvzf test-app-desktop.tar.gz
Expand Down Expand Up @@ -97,7 +102,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: testapp-desktop-logs-${{ inputs.platform }}${{ inputs.scripting && format('-{0}', inputs.scripting) || '' }}${{ inputs.backend && format('-{0}', inputs.backend) || '' }}-${{ inputs.unity-version }}
name: testapp-desktop-logs-${{ inputs.platform }}${{ inputs.architecture && format('-{0}', inputs.architecture) || '' }}${{ inputs.scripting && format('-{0}', inputs.scripting) || '' }}${{ inputs.backend && format('-{0}', inputs.backend) || '' }}-${{ inputs.unity-version }}
path: |
test/IntegrationTest/results/
retention-days: 14
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Fixes

- Native crash capture now works on 32-bit Windows standalone builds. The SDK shipped only an x64 library while enabling native support for both architectures, so the player failed to load it. The P/Invokes into `sentry-native` also declare `Cdecl` now - without it the 32-bit player corrupted its stack on the first call. ([#2847](https://github.com/getsentry/sentry-unity/pull/2847))

### Dependencies

- Bump Native SDK from v0.16.6 to v0.17.0 ([#2862](https://github.com/getsentry/sentry-unity/pull/2862))
Expand Down
Loading
Loading