Skip to content
Merged

4.0.0 #2631

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
be4d8d5
nit: changelog spacing
bruno-garcia Sep 18, 2023
a4efd31
move to mobile platform targets to net7 (#2624)
bruno-garcia Sep 18, 2023
97c5f7c
Update CHANGELOG.md
bruno-garcia Sep 18, 2023
3efc18f
Skip ApiApprovalTests.verify.cs until v4.0.0 (#2658)
jamescrosswell Sep 26, 2023
56e5b06
Removed IHasDistribution and added Distrubution to IEventLike instead…
jamescrosswell Sep 26, 2023
8706936
Merged IHasTransactionNameSource into ITransactionContext (#2654)
jamescrosswell Sep 26, 2023
300f248
Merged ISpanContext into ITraceContext (#2668)
jamescrosswell Sep 26, 2023
8084c05
Merged IHasBreadcrumbs into IEventLike (#2670)
jamescrosswell Sep 27, 2023
83dbdf8
dotnet workload list runs silently (#2627)
jamescrosswell Sep 18, 2023
7e72926
fix: Overload for `ContinueTrace` to accept headers as `string` (#2601)
bitsandfoxes Sep 18, 2023
cd5e6a4
Fixes: Identifying Users with OpenTelemetry doesn't work (#2618)
jamescrosswell Sep 18, 2023
1005f3f
feat: Tracing without Performance for Azure Function Workers (#2630)
bitsandfoxes Sep 19, 2023
f50dcd4
Construct hint items lazily (avoid unnecessary allocations when not u…
jamescrosswell Sep 19, 2023
5f5f22e
Init Sentry before OpenTelemetry (#2635)
jamescrosswell Sep 19, 2023
ca9829d
ref: Instantiating `_tags` for Spans lazily (#2636)
bitsandfoxes Sep 19, 2023
9df5b21
ref: SpanId creation (#2619)
bitsandfoxes Sep 19, 2023
db17a69
ref: azure functions pkg change (#2637)
bruno-garcia Sep 20, 2023
cad89b4
chore: update modules/sentry-cocoa to 8.12.0 (#2640)
github-actions[bot] Sep 20, 2023
18d9ca8
chore: Update CHANGELOG.md (#2643)
bitsandfoxes Sep 20, 2023
5a79e7f
release: 3.40.0-beta.0
getsentry-bot Sep 21, 2023
cecb99d
chore: update scripts/update-cli.ps1 to 2.21.0 (#2645)
github-actions[bot] Sep 22, 2023
5cb67de
Added memory optimisations for GetLastActiveSpan (#2642)
jamescrosswell Sep 24, 2023
f45a0dc
chore: update scripts/update-cli.ps1 to 2.21.1 (#2647)
github-actions[bot] Sep 24, 2023
e9a113d
Update HubTests.cs (#2649)
jamescrosswell Sep 25, 2023
3474989
Removed legacy group (#2651)
jamescrosswell Sep 25, 2023
3836a94
fix: Replacing `Carthage` with `xcodebuild` (#2672)
bitsandfoxes Sep 27, 2023
11e6855
fixup changelog
vaind Sep 27, 2023
0c386ee
Fixed: Changelog prevents CI Builds in v4.0.0 branches
jamescrosswell Sep 28, 2023
0aed969
Throw ArgumentNullException if DSN is null (#2655)
jamescrosswell Sep 28, 2023
3c3182d
Merged IHasMeasurements into ISpanData (#2659)
jamescrosswell Oct 2, 2023
08d6926
Merge branch 'main' into feat/4.0.0
vaind Oct 3, 2023
ede4a04
feat: Enable `CaptureFailedRequests` by default (#2688)
bitsandfoxes Oct 3, 2023
b28cc31
chore: align StackFrame's properties (#2691)
vaind Oct 3, 2023
8c40320
Remove additional `TransactionTracer` constructors (#2694)
bitsandfoxes Oct 4, 2023
82d90cb
Removed `Scope.Platform` as it would never be applied. (#2695)
jamescrosswell Oct 5, 2023
5e0d377
feat: Native AOT frame info (#2701)
vaind Oct 5, 2023
c420292
fix build on mac m1 (#2702)
vaind Oct 5, 2023
7fec1be
Upgraded to `NLog 5` (#2697)
bitsandfoxes Oct 6, 2023
0f77c67
fix: CaptureFailedRequests xml docs
bruno-garcia Oct 6, 2023
38fd446
Fallback to `AssemblyVersion` if `InformalVersion` is `NullOrEmpty` (…
bitsandfoxes Oct 10, 2023
813d027
Reenabled API Verify tests (#2716)
bitsandfoxes Oct 11, 2023
7e12c2b
Reordered parameters to TransactionContext and SpanContext constructo…
jamescrosswell Oct 11, 2023
4fa245b
Change signature order in `DiagnosticLogger` for exceptions (#2715)
bitsandfoxes Oct 12, 2023
f286c62
chore: update scripts/update-cli.ps1 to 2.21.2 (#2698)
github-actions[bot] Oct 5, 2023
dfc1e76
build(deps): bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0…
dependabot[bot] Oct 9, 2023
00a77ae
Fix: Scope not being applied to OpenTelemetry spans in ASP.NET Core (…
jamescrosswell Oct 9, 2023
c96ac8b
Delete SentryAzureFunctions.slnf (#2708)
bruno-garcia Oct 10, 2023
fa48b25
Apply Scope to exceptions captured via Activity.RecordException (#2712)
jamescrosswell Oct 10, 2023
f0f785e
release: 3.40.0
getsentry-bot Oct 10, 2023
35c269a
Update .craft.yml (#2615)
jamescrosswell Oct 11, 2023
69bef53
Make ISentryUserFactory public (#2719)
jamescrosswell Oct 12, 2023
161c79d
chore: update scripts/update-java.ps1 to 6.31.0 (#2723)
github-actions[bot] Oct 13, 2023
e1c2c04
release: 3.40.1
getsentry-bot Oct 12, 2023
c7da8ac
chore(deps): update Cocoa SDK to v8.13.1 (#2722)
github-actions[bot] Oct 13, 2023
a9068b4
Merge branch 'main' into feat/4.0.0
vaind Oct 14, 2023
8163910
chore: fix changelog merge
vaind Oct 14, 2023
467f066
chore: update API verified.txt
vaind Oct 14, 2023
5aa3280
refactor: change DebugImage.ImageAddress to long (#2725)
vaind Oct 15, 2023
1d16e00
build with dotnet 8 sdk (#2622)
bruno-garcia Oct 17, 2023
d32f05b
sentry-native SDK integration (#2704)
vaind Oct 17, 2023
ebbb500
Renamed ISpan and ITransaction to ISpanTracer and ITransactionTracer …
jamescrosswell Oct 18, 2023
738714d
Merge remote-tracking branch 'getsentry/main' into feat/4.0.0
jamescrosswell Oct 18, 2023
7e82f99
Update Sentry.NoMobile.sln
jamescrosswell Oct 18, 2023
6e18dee
CI cleanup (#2733)
bitsandfoxes Oct 18, 2023
941d9dc
Removed `WithScope` and `WithScopeAsync` (#2717)
bitsandfoxes Oct 18, 2023
a34e984
Contexts inherit from IDictionary<string, object> (#2729)
jamescrosswell Oct 18, 2023
441386b
chore: pin .net version in global.json (#2742)
vaind Oct 19, 2023
91b22a9
Feat: native AOT debug info upload (#2739)
vaind Oct 23, 2023
1007ba3
Consolidated CaptureEvent API methods (#2749)
jamescrosswell Oct 23, 2023
30a73ad
Merge branch 'main' into feat/4.0.0
jamescrosswell Oct 23, 2023
e0bef79
See diff when dirty check fails (#2755)
jamescrosswell Oct 24, 2023
79ddcb0
ci: install xamarin-ios if not found (#2757)
vaind Oct 24, 2023
99105fe
Make Sentry.PlatformAbstractions.Runtime.Identifier get only (#2764)
jamescrosswell Oct 27, 2023
d691018
Made Sentry.Values<T> internal (#2771)
jamescrosswell Oct 31, 2023
a448ab3
Update CHANGELOG.md
vaind Oct 31, 2023
835226b
chore: include debug info in sentry-native static build (#2765)
vaind Nov 1, 2023
63a05ba
feat: sentry-native macOS integration (#2767)
vaind Nov 1, 2023
20276c5
refactor: merge Sentry.Bindings.Native into Sentry (#2777)
vaind Nov 2, 2023
68e143b
Trimming for .NET 7+ in Sentry Core (#2732)
jamescrosswell Nov 2, 2023
3dfff8c
preprocessor directives at index 0
bruno-garcia Nov 2, 2023
2d7a9dd
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 2, 2023
3ebfcb0
Remove TracePropagationTarget (#2763)
jamescrosswell Nov 3, 2023
076b0f1
Chore: minor improvements (#2769)
vaind Nov 3, 2023
f1fd43d
drop net461 in favor of net462 (#2786)
bruno-garcia Nov 4, 2023
e186ced
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 4, 2023
4080ac6
remove deprecated frameworks (#2787)
bruno-garcia Nov 5, 2023
7b330dd
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 5, 2023
e9c84a6
update contributing and remove unused snapshot test files (#2790)
bruno-garcia Nov 5, 2023
8f167a0
Added CMake as a dependency to CONTRIBUTING.md (#2795)
jamescrosswell Nov 6, 2023
c52c430
fix: Native AOT resolution (#2799)
vaind Nov 7, 2023
b8484ec
Merge branch 'main' into feat/4.0.0
jamescrosswell Nov 7, 2023
8b89fcd
Added IsAotCompatible for uncomplicated projects (#2793)
jamescrosswell Nov 8, 2023
9a2497d
Fixed warnings when generating cocoa bindings (#2805)
jamescrosswell Nov 8, 2023
1284b8d
Merge remote-tracking branch 'origin/main' into feat/4.0.0
vaind Nov 8, 2023
1da6154
fix: net8 JSON serialization (#2810)
vaind Nov 8, 2023
e590886
feat: packaging native runtime libs (#2781)
vaind Nov 8, 2023
211aba8
fixup: runtime tests after #2781 merge
vaind Nov 8, 2023
ad87961
Merge branch 'main' into feat/4.0.0
vaind Nov 8, 2023
c86fd6f
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 8, 2023
8dcacef
fix changelog heading
bruno-garcia Nov 8, 2023
4ff7f8a
release: 4.0.0-alpha.0
getsentry-bot Nov 8, 2023
c259c41
Consistent names for Transactions for ASP.NET Core routes (#2808)
jamescrosswell Nov 8, 2023
9a1bbcf
update comments
vaind Nov 9, 2023
79695bb
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 9, 2023
2e3d757
test on net8.0 (#2791)
bruno-garcia Nov 9, 2023
daaa05b
Merge branch 'main' into feat/4.0.0
vaind Nov 9, 2023
6709bf5
Merge branch 'release/4.0.0-alpha.0' into feat/4.0.0
bruno-garcia Nov 9, 2023
c2f78e7
prep next release
bruno-garcia Nov 9, 2023
3d0eb8b
disable vulnerabilities workflow
vaind Nov 9, 2023
f539268
chore: cleanup v4 changelog (#2824)
vaind Nov 13, 2023
83d8b4e
fix: don't add WinUI integration on mobile (#2821)
vaind Nov 13, 2023
f661d07
Refactor: move DebugImage and DebugMeta to Sentry.Protocol (#2815)
vaind Nov 13, 2023
9937a76
fix: NativeAOT inApp setting (#2831)
vaind Nov 14, 2023
f8f7147
Merge branch 'main' into feat/4.0.0
vaind Nov 14, 2023
975f174
chore: update dotnet-8 to final release (#2836)
vaind Nov 15, 2023
7f4b8fa
ci: cache supplemental build (#2839)
vaind Nov 15, 2023
ea5dddc
chore: net8 samples (#2830)
vaind Nov 15, 2023
b84faa8
Remove ConfigureFromConfigurationOptions<T> from Sentry.Extensions.Lo…
jamescrosswell Nov 16, 2023
2a60c09
Removed obsolete options (#2841)
bitsandfoxes Nov 16, 2023
0873db3
fix: missing metadata dependency (#2843)
vaind Nov 16, 2023
0d643ff
feat: NativeAOT iOS support (#2820)
vaind Nov 16, 2023
dd9cfac
feat: Add NET8 to major packages (#2852)
vaind Nov 16, 2023
2c0d18a
Fix `4.0.0-beta.0` changelog (#2855)
bitsandfoxes Nov 16, 2023
34b8f9c
Unobsoleted `SentryClient.Dispose` (#2842)
bitsandfoxes Nov 17, 2023
15c5c39
chore: fixup changelog (#2837)
vaind Nov 14, 2023
7f727f5
chore: update scripts/update-cli.ps1 to 2.21.5 (#2851)
github-actions[bot] Nov 16, 2023
128e372
Merge remote-tracking branch 'origin/main' into feat/4.0.0
vaind Nov 17, 2023
12e23cb
chore: remove obsolete APIs (#2856)
vaind Nov 17, 2023
69806bc
feat: Enrich transactions (#2838)
bitsandfoxes Nov 17, 2023
749c9a7
Removed `IUserFactory` in favor of `ISentryUserFactory` (#2840)
bitsandfoxes Nov 17, 2023
1ccc4a6
release: 4.0.0-beta.0
getsentry-bot Nov 17, 2023
0ae0922
Merge branch 'release/4.0.0-beta.0' into feat/4.0.0
Nov 17, 2023
5c549d1
readme: remove minidump pkg and api docs
bruno-garcia Nov 17, 2023
0c5d50f
chore: cleanup obsolete pragmas (#2857)
vaind Nov 18, 2023
bd198f9
chore: bump M.SourceLink.GitHub to 8.0.0
bruno-garcia Nov 18, 2023
329e2ee
remove explicit pkg ref SourceLink
bruno-garcia Nov 18, 2023
1dfbc64
remove netstandard from the console sample
vaind Nov 19, 2023
6f46891
pack profiling nuget package (#2800)
bruno-garcia Nov 19, 2023
30c8eba
remove ns2.1 from nlog (#2864)
bruno-garcia Nov 19, 2023
1179610
Chore: deduplicate device tests (#2858)
vaind Nov 19, 2023
9832c88
release: 4.0.0-beta.1
getsentry-bot Nov 19, 2023
ebaed3e
Merge branch 'release/4.0.0-beta.1' into feat/4.0.0
Nov 19, 2023
84925a9
Undo renaming of ISpan (#2870)
jamescrosswell Nov 20, 2023
7584368
Removed ConfigureFromConfigurationOptions<SentryAspNetCoreOptions> (#…
jamescrosswell Nov 20, 2023
89b2f6a
fix: aspnetcore dependency (#2873)
bruno-garcia Nov 21, 2023
c32be36
fix: upload Android native symbols (#2876)
vaind Nov 21, 2023
f79ab7b
Add Tests to ensure BindableOptions are consistent with Options (#2875)
jamescrosswell Nov 21, 2023
cf2d206
renamed (#2879)
bitsandfoxes Nov 21, 2023
5ba1121
Merge branch 'main' into feat/4.0.0
jamescrosswell Nov 22, 2023
5d20a0c
Updated BindableSentryAspNetCoreOptions to pass tests
jamescrosswell Nov 22, 2023
24cfe5b
Dropped `netstandard2.0` for ASP.NET Core (#2807)
bitsandfoxes Nov 22, 2023
0ea0f0a
fix: Sentry.Serilog throws with a disabled DSN (#2883)
jamescrosswell Nov 22, 2023
9e8c58f
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 22, 2023
fa1a5c6
release: 4.0.0-beta.2
getsentry-bot Nov 23, 2023
464fd4c
Only set FrameworkSupportsAot for net8.0+ (#2889)
jamescrosswell Nov 23, 2023
9fa8f3c
Merge branch 'release/4.0.0-beta.2' into feat/4.0.0
Nov 23, 2023
c0b7607
fix: changelog 4.0 beta
bruno-garcia Nov 23, 2023
2e4649c
chore: support NativeAOT only on net8+ (#2892)
vaind Nov 23, 2023
c179895
Chore: .net8 native interop cleanups (#2893)
vaind Nov 23, 2023
ba1a198
fix pragma location
bruno-garcia Nov 23, 2023
e6bf7a8
merged main
bitsandfoxes Nov 24, 2023
e08d4f6
fix ci
vaind Nov 24, 2023
2ff2e7c
CI Ignores changes to `.md` files (#2906)
bitsandfoxes Nov 27, 2023
b50c28d
Merge branch 'main' into feat/4.0.0
bruno-garcia Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.cs text=auto eol=lf diff=csharp
*.sln text=auto eol=crlf
*.sh eol=lf
*.ps1 eol=lf
CHANGELOG.md merge=union


Expand Down
21 changes: 17 additions & 4 deletions .github/actions/buildnative/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,39 @@ runs:
shell: bash
run: echo "JAVA_HOME_11=$JAVA_HOME_11_X64" >> $GITHUB_ENV

- uses: actions/cache@v3
id: cache-c
with:
path: lib/sentrysupplemental/bin
key: supplemental-c-${{ runner.os }}-${{ hashFiles('lib/sentrysupplemental/*.*') }}

- name: Install Ninja
if: ${{ steps.cache-c.outputs.cache-hit != 'true' }}
shell: bash
run: ${{ runner.os == 'macOS' && 'brew install ninja' || runner.os == 'Windows' && 'choco install ninja' || 'sudo apt-get update && sudo apt-get install ninja-build' }}

- name: Build C Project
if: runner.os == 'Linux' || runner.os == 'macOS'
if: ${{ steps.cache-c.outputs.cache-hit != 'true' && (runner.os == 'Linux' || runner.os == 'macOS') }}
shell: bash
run: lib/sentrysupplemental/build.sh

- name: Build C Project
if: runner.os == 'Windows'
if: ${{ steps.cache-c.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
shell: cmd
run: lib\sentrysupplemental\build.cmd

- uses: actions/cache@v3
id: cache-android
with:
path: lib/sentry-android-supplemental/bin
key: supplemental-android-${{ runner.os }}-${{ hashFiles('lib/sentry-android-supplemental/*.*') }}

- name: Build Java Project
if: runner.os == 'Linux' || runner.os == 'macOS'
if: ${{ steps.cache-android.outputs.cache-hit != 'true' && runner.os == 'Linux' || runner.os == 'macOS' }}
shell: bash
run: lib/sentry-android-supplemental/build.sh

- name: Build Java Project
if: runner.os == 'Windows'
if: ${{ steps.cache-android.outputs.cache-hit != 'true' && runner.os == 'Windows' }}
shell: cmd
run: lib\sentry-android-supplemental\build.cmd
33 changes: 8 additions & 25 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,21 @@ runs:
distribution: 'temurin'
java-version: '11'

# .NET 3.1 has been removed from all OS due to EOL
# https://github.com/actions/runner-images/issues/7667
- name: Install .NET 3.1 SDK
# .NET 6 and .NET 8 are not built-in with macos-13
- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Install .NET 7 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.203 # switch back to 7.x.x after resolving the below Tizen issue.

# Workaround for Tizen issue
# See https://github.com/dotnet/sdk/issues/33192
- name: Pin to .NET SDK 7.0.203
run: dotnet new globaljson --sdk-version 7.0.203 --force
shell: bash
dotnet-version: |
6.0.x
7.0.x
8.0.x

- name: Install .NET Workloads
shell: bash
run: >
dotnet workload install \
maui-android \
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows maui-tizen' || '' }} \
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows' || '' }} \
${{ runner.os == 'Windows' && 'maui-windows' || '' }} \
--temp-dir "${{ runner.temp }}" --from-rollback-file rollback.json \
--temp-dir "${{ runner.temp }}" \
--skip-sign-check

# We build Sentry.Maui for every supported MAUI target so we can access platform-specific features.
# That includes Tizen. We don't need the entire Tizen SDK, but we do need the base Tizen workload.
# Though we could install it on all runners, we really only need it when building and packing for NuGet, which we do on macOS only.
- name: Install Tizen Workload
if: runner.os == 'macOS'
shell: bash
run: "curl -sSL https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.sh | sudo bash"
128 changes: 106 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,45 @@ on:
- main
- release/*
pull_request:
paths-ignore:
- '**.md'

jobs:
build-sentry-native:
name: sentry-native (${{ matrix.os }})
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]

steps:
- name: Checkout
uses: actions/checkout@v4

- run: git submodule update --init modules/sentry-native

- uses: actions/cache@v3
id: cache
with:
path: src/Sentry/Platforms/Native/sentry-native
key: sentry-native-${{ runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
enableCrossOsArchive: true

- run: scripts/build-sentry-native.ps1
if: steps.cache.outputs.cache-hit != 'true'
shell: pwsh

build:
name: ${{ matrix.os }}
needs: build-sentry-native
name: .NET (${{ matrix.os }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# Pinning `macos-13` because Microsoft.iOS 16.4 requires Xcode 14.3 which is only built-in in 13
os: [ubuntu-latest, windows-latest, macos-13]

steps:
- name: Cancel Previous Runs
Expand All @@ -29,9 +58,34 @@ jobs:

# We use macOS for the final publishing build so we we get all the iOS/macCatalyst targets in the packages
- name: Set Environment Variables
if: startsWith(matrix.os, 'macos') && startsWith(github.ref_name, 'release/')
if: startsWith(matrix.os, 'macos')
run: echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV

- name: Download sentry-native (Linux)
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Linux') }}
uses: actions/cache/restore@v3
with:
path: src/Sentry/Platforms/Native/sentry-native
key: sentry-native-Linux-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
fail-on-cache-miss: true

- name: Download sentry-native (macOS)
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'macOS') }}
uses: actions/cache/restore@v3
with:
path: src/Sentry/Platforms/Native/sentry-native
key: sentry-native-macOS-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
fail-on-cache-miss: true

- name: Download sentry-native (Windows)
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows') }}
uses: actions/cache/restore@v3
with:
path: src/Sentry/Platforms/Native/sentry-native
key: sentry-native-Windows-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
fail-on-cache-miss: true
enableCrossOsArchive: true

- name: Setup Environment
uses: ./.github/actions/environment

Expand All @@ -42,28 +96,20 @@ jobs:
if: runner.os == 'macOS'
uses: ./.github/actions/buildcocoasdk

# Only switch to newer xcode after building the Cocoa SDK so that it can keep IPHONEOS_DEPLOYMENT_TARGET=11.0
- run: sudo xcode-select -s /Applications/Xcode_15.0.1.app
if: startsWith(matrix.os, 'macos')

- name: Restore .NET Dependencies
run: dotnet restore Sentry-CI-Build-${{ runner.os }}.slnf --nologo

- name: Build (for non-release branch)
if: env.CI_PUBLISHING_BUILD != 'true'
run: dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo

- name: Build (for release branch)
if: env.CI_PUBLISHING_BUILD == 'true'
run: dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -p:CopyLocalLockFileAssemblies=true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Build
run: dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true

- name: Test
run: dotnet test Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo -l GitHubActions -l "trx;LogFilePrefix=testresults_${{ runner.os }}"

- name: Test symbol upload
uses: getsentry/github-workflows/sentry-cli/integration-test/@v2
with:
path: test

- name: Upload Verify Results
- name: Upload build and test outputs
if: failure()
uses: actions/upload-artifact@v3
with:
Expand All @@ -72,19 +118,57 @@ jobs:

# To save time and disk space, we only create and archive the Nuget packages when we're actually releasing.

- name: Create Nuget Packages (release branch only)
- name: Create Nuget Packages
if: env.CI_PUBLISHING_BUILD == 'true'
run: dotnet pack Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo

- name: Archive Nuget Packages (release branch only)
- name: Archive Nuget Packages
if: env.CI_PUBLISHING_BUILD == 'true'
uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
if-no-files-found: error
path: |
${{ github.workspace }}/src/**/Release/*.nupkg
${{ github.workspace }}/src/**/Release/*.snupkg
src/**/Release/*.nupkg
src/**/Release/*.snupkg

integration-test:
needs: build
name: Integration test (${{ matrix.os }})
runs-on: ${{ matrix.os }}-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]

steps:
- uses: actions/checkout@v4
with:
# We only check out what is absolutely necessary to reduce a chance of local files impacting
# integration tests, e.g. Directory.Build.props, nuget.config, ...
sparse-checkout: |
Directory.Build.props
integration-test

- name: Fetch Nuget Packages
uses: actions/download-artifact@v3
with:
name: ${{ github.sha }}
path: src

- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
7.0.x
8.0.x

- run: dotnet workload install android maui-android

- name: Test
uses: getsentry/github-workflows/sentry-cli/integration-test/@v2
with:
path: integration-test

test-solution-filters:
runs-on: ubuntu-latest
Expand Down
36 changes: 13 additions & 23 deletions .github/workflows/device-tests-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- main
- release/*
pull_request:
paths-ignore:
- '**.md'

jobs:
build:
Expand All @@ -26,27 +28,24 @@ jobs:
- name: Set Java Version
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
distribution: "temurin"
java-version: "11"

- name: Setup Environment
uses: ./.github/actions/environment

- name: Build Native Dependencies
uses: ./.github/actions/buildnative

- name: Install .NET Workloads
run: dotnet workload install maui-android --temp-dir "${{ runner.temp }}" --from-rollback-file rollback.json

- name: Restore .NET Dependencies
run: dotnet restore test/Sentry.Maui.Device.TestApp --nologo

- name: Build Android Test App
run: dotnet build test/Sentry.Maui.Device.TestApp -c Release -f net7.0-android --no-restore --nologo
run: pwsh ./scripts/device-test.ps1 android -Build

- name: Upload Android Test App
uses: actions/upload-artifact@v3
with:
name: device-test-android
if-no-files-found: error
path: test/Sentry.Maui.Device.TestApp/bin/Release/net7.0-android/io.sentry.dotnet.maui.device.testapp-Signed.apk
path: test/Sentry.Maui.Device.TestApp/bin/Release/net7.0-android/android-x64/io.sentry.dotnet.maui.device.testapp-Signed.apk

android:
needs: [build]
Expand All @@ -64,13 +63,12 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:

# See https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -81,9 +79,6 @@ jobs:
name: device-test-android
path: bin

- name: Install XHarness
run: dotnet tool install Microsoft.DotNet.XHarness.CLI --global --version "1.*-*"

- name: Setup Gradle
uses: gradle/gradle-build-action@87a9a15658c426a54dd469d4fc7dc1a73ca9d4a6 # pin@v2

Expand Down Expand Up @@ -127,12 +122,7 @@ jobs:
disk-size: 4096M
emulator-options: -no-snapshot-save -no-window -accel on -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: xharness android test --output-directory=./test_output --app=bin/io.sentry.dotnet.maui.device.testapp-Signed.apk --package-name=io.sentry.dotnet.maui.device.testapp

- name: Create Test Report
if: success() || failure()
run: scripts/parse-xunit2-xml.ps1 ./test_output/TestResults.xml | Out-File $env:GITHUB_STEP_SUMMARY
shell: pwsh
script: pwsh scripts/device-test.ps1 android -Run

- name: Upload results
if: success() || failure()
Expand Down
Loading