Skip to content

Commit f0c2233

Browse files
Add Trim test app
1 parent cb0a35c commit f0c2233

File tree

12 files changed

+91
-3
lines changed

12 files changed

+91
-3
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,44 @@ jobs:
187187
with:
188188
path: integration-test
189189

190+
191+
trim-analysis:
192+
needs: build
193+
name: Trim analysis
194+
runs-on: macos-15
195+
196+
steps:
197+
- name: Checkout
198+
uses: actions/checkout@v4
199+
with:
200+
submodules: recursive
201+
fetch-depth: 2 # default is 1 and codecov needs > 1
202+
203+
# We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
204+
- name: Set Environment Variables
205+
run: echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV
206+
207+
- name: Download sentry-native (macOS)
208+
uses: actions/cache/restore@v4
209+
with:
210+
path: src/Sentry/Platforms/Native/sentry-native
211+
key: sentry-native-macOS-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
212+
fail-on-cache-miss: true
213+
214+
- name: Setup Environment
215+
uses: ./.github/actions/environment
216+
217+
- name: Build Native Dependencies
218+
uses: ./.github/actions/buildnative
219+
220+
- name: Install Android SDKs
221+
if: runner.os == 'macOS'
222+
run: |
223+
dotnet build src/Sentry/Sentry.csproj -t:InstallAndroidDependencies -f:net8.0-android34.0 -p:AcceptAndroidSDKLicenses=True -p:AndroidSdkPath="/usr/local/lib/android/sdk/"
224+
225+
- name: Publish Test app
226+
run: dotnet publish test/Sentry.TrimTest/Sentry.TrimTest.csproj -c Release -r osx-arm64
227+
190228
test-solution-filters:
191229
runs-on: ubuntu-latest
192230
if: ${{ !startsWith(github.ref_name, 'release/') }}

Sentry-CI-Build-Linux.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
7272
"test\\Sentry.Testing\\Sentry.Testing.csproj",
7373
"test\\Sentry.Tests\\Sentry.Tests.csproj",
74+
"test\\Sentry.TrimTest\\Sentry.TrimTest.csproj",
7475
"test\\SingleFileTestApp\\SingleFileTestApp.csproj"
7576
]
7677
}

Sentry-CI-Build-Windows.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
7575
"test\\Sentry.Testing\\Sentry.Testing.csproj",
7676
"test\\Sentry.Tests\\Sentry.Tests.csproj",
77+
"test\\Sentry.TrimTest\\Sentry.TrimTest.csproj",
7778
"test\\SingleFileTestApp\\SingleFileTestApp.csproj"
7879
]
7980
}

Sentry-CI-Build-macOS.slnf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
3939
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
4040
"src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj",
41-
"src\\Sentry.AspNet\\Sentry.AspNet.csproj",
4241
"src\\Sentry.AspNetCore.Blazor.WebAssembly\\Sentry.AspNetCore.Blazor.WebAssembly.csproj",
4342
"src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj",
4443
"src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj",
44+
"src\\Sentry.AspNet\\Sentry.AspNet.csproj",
4545
"src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj",
4646
"src\\Sentry.Bindings.Android\\Sentry.Bindings.Android.csproj",
4747
"src\\Sentry.Bindings.Cocoa\\Sentry.Bindings.Cocoa.csproj",
@@ -80,7 +80,8 @@
8080
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
8181
"test\\Sentry.Testing\\Sentry.Testing.csproj",
8282
"test\\Sentry.Tests\\Sentry.Tests.csproj",
83+
"test\\Sentry.TrimTest\\Sentry.TrimTest.csproj",
8384
"test\\SingleFileTestApp\\SingleFileTestApp.csproj"
8485
]
8586
}
86-
}
87+
}

Sentry.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Analyzers.Tests", "t
193193
EndProject
194194
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Samples.Console.HeapDump", "samples\Sentry.Samples.Console.HeapDump\Sentry.Samples.Console.HeapDump.csproj", "{D7DF0B26-AD43-4F8B-9BFE-C4471CCC9821}"
195195
EndProject
196+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.TrimTest", "test\Sentry.TrimTest\Sentry.TrimTest.csproj", "{6030B748-0000-43B5-B8A8-399AA42F5229}"
197+
EndProject
196198
Global
197199
GlobalSection(SolutionConfigurationPlatforms) = preSolution
198200
Debug|Any CPU = Debug|Any CPU
@@ -520,6 +522,10 @@ Global
520522
{D7DF0B26-AD43-4F8B-9BFE-C4471CCC9821}.Debug|Any CPU.Build.0 = Debug|Any CPU
521523
{D7DF0B26-AD43-4F8B-9BFE-C4471CCC9821}.Release|Any CPU.ActiveCfg = Release|Any CPU
522524
{D7DF0B26-AD43-4F8B-9BFE-C4471CCC9821}.Release|Any CPU.Build.0 = Release|Any CPU
525+
{6030B748-0000-43B5-B8A8-399AA42F5229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
526+
{6030B748-0000-43B5-B8A8-399AA42F5229}.Debug|Any CPU.Build.0 = Debug|Any CPU
527+
{6030B748-0000-43B5-B8A8-399AA42F5229}.Release|Any CPU.ActiveCfg = Release|Any CPU
528+
{6030B748-0000-43B5-B8A8-399AA42F5229}.Release|Any CPU.Build.0 = Release|Any CPU
523529
EndGlobalSection
524530
GlobalSection(SolutionProperties) = preSolution
525531
HideSolutionNode = FALSE
@@ -605,5 +611,6 @@ Global
605611
{E36C8DCA-464E-41CB-B189-F58553AAA8D4} = {230B9384-90FD-4551-A5DE-1A5C197F25B6}
606612
{5A17FEF9-07BB-47B8-9883-9C2CC93F09E8} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
607613
{D7DF0B26-AD43-4F8B-9BFE-C4471CCC9821} = {21B42F60-5802-404E-90F0-AEBCC56760C0}
614+
{6030B748-0000-43B5-B8A8-399AA42F5229} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
608615
EndGlobalSection
609616
EndGlobal

SentryNoMobile.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
6969
"test\\Sentry.Testing\\Sentry.Testing.csproj",
7070
"test\\Sentry.Tests\\Sentry.Tests.csproj",
71+
"test\\Sentry.TrimTest\\Sentry.TrimTest.csproj",
7172
"test\\SingleFileTestApp\\SingleFileTestApp.csproj"
7273
]
7374
}

SentryNoSamples.slnf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
4444
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
4545
"test\\Sentry.Testing\\Sentry.Testing.csproj",
46-
"test\\Sentry.Tests\\Sentry.Tests.csproj"
46+
"test\\Sentry.Tests\\Sentry.Tests.csproj",
47+
"test\\Sentry.TrimTest\\Sentry.TrimTest.csproj"
4748
]
4849
}
4950
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- This file is here to prevent any from being used from parent directories. -->
2+
<Project />
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- This file is here to prevent any from being used from parent directories. -->
2+
<Project />

test/Sentry.TrimTest/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// See https://aka.ms/new-console-template for more information
2+
Console.WriteLine("Hello, World!");

0 commit comments

Comments
 (0)