Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
313c695
build on windows-11-arm
bruno-garcia May 13, 2025
283f080
java 21 on arm64 win
bruno-garcia May 17, 2025
f1890bd
java
bruno-garcia May 17, 2025
5ec8ed9
java
bruno-garcia May 17, 2025
f366998
java with shel
bruno-garcia May 17, 2025
0834456
java with shel
bruno-garcia May 17, 2025
191004a
add arch to stuff
bruno-garcia May 17, 2025
67f13cc
matrix with arch
bruno-garcia May 17, 2025
fa50b1d
java
bruno-garcia May 17, 2025
9d8f3c6
fix condition
bruno-garcia May 17, 2025
891a865
sln filter
bruno-garcia May 17, 2025
eaa9a5d
fix java 11 outside windows
bruno-garcia May 17, 2025
d8a669f
copy pasta never ends
bruno-garcia May 17, 2025
e7d93a5
demove localdb stuff from arm
bruno-garcia May 17, 2025
98512cc
depend on sentry-native
bruno-garcia May 18, 2025
80b8353
Merge branch 'main' into bruno-garcia-patch-1
bruno-garcia May 18, 2025
90c3dd6
fix arch
bruno-garcia May 18, 2025
46cd05e
remove sql test from arm
bruno-garcia May 18, 2025
8e80e4a
use platform aware cache key for sentry-native windows
bruno-garcia May 18, 2025
468f82f
Fix Windows vs. Windows-arm64 cache key
jpnurmi May 19, 2025
1ac8d87
Merge branch 'main' into bruno-garcia-patch-1
jpnurmi May 19, 2025
dcf50fe
install missing zstd for cross-os cache
jpnurmi May 19, 2025
b10ab7c
add missing shell
jpnurmi May 19, 2025
793663b
move zstd installation into build-sentry-native
jpnurmi May 19, 2025
7c44c3a
run pwsh scripts/generate-solution-filters.ps1
jpnurmi May 19, 2025
1c0a17e
install zstd for restoring too
jpnurmi May 19, 2025
0aa8d28
setup env before cache restore
jpnurmi May 19, 2025
0359a55
simplify java setup
jpnurmi May 20, 2025
3d50cf2
remove outdated TODO comment
jpnurmi May 20, 2025
d59af89
add zstd on windows-11-arm issue links
jpnurmi May 20, 2025
077f53b
trim-analysis depends on build-sentry-native
jpnurmi May 20, 2025
3af984d
use matrix.os for cache & matrix.slnf for solution filter
jpnurmi May 20, 2025
86019e7
avoid error-prone matrix.os as cache key
jpnurmi May 21, 2025
eab2490
fix typos
jpnurmi May 21, 2025
39937eb
fix suffix
jpnurmi May 21, 2025
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
21 changes: 15 additions & 6 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,36 @@ runs:
echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" >> $GITHUB_ENV
echo "DOTNET_NOLOGO=1" >> $GITHUB_ENV

# zstd is needed for cross OS actions/cache but missing from windows-11-arm
# https://github.com/actions/partner-runner-images/issues/99
- name: Install zstd on Windows ARM64
if: runner.os == 'Windows' && runner.arch == 'ARM64'
shell: pwsh
run: choco install zstandard

# See https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#xcode
- name: Pin the Xcode Version
if: runner.os == 'macOS'
shell: bash
run: sudo xcode-select --switch /Applications/Xcode_16.2.app

# Needed for Android SDK setup step
- uses: actions/setup-java@v3
# Java 17 is needed for Android SDK setup step
- name: Install Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: ${{ runner.os == 'Windows' && runner.arch == 'ARM64' && 'microsoft' || 'temurin' }}
java-version: '17'

- name: Setup Android SDK
uses: android-actions/setup-android@07976c6290703d34c16d382cb36445f98bb43b1f # v3.2.0
with:
log-accepted-android-sdk-licenses: false

- name: Set Java Version
uses: actions/setup-java@v3
# Java 11 is needed by .NET Android
- name: Install Java 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: ${{ runner.os == 'Windows' && runner.arch == 'ARM64' && 'microsoft' || 'temurin' }}
java-version: '11'

- name: Install Mono
Expand Down
73 changes: 49 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,31 @@ jobs:
strategy:
fail-fast: false
matrix:
# Pin ubuntu to ensure mono is installed
# Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
os: [ubuntu-22.04, windows-latest, macos-15]
include:
- os: ubuntu-22.04 # Pin ubuntu to ensure mono is installed
- os: macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
- os: windows-latest
- os: windows-11-arm
target: Windows-arm64

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

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

# zstd is needed for cross OS actions/cache but missing from windows-11-arm
# https://github.com/actions/partner-runner-images/issues/99
- name: Install zstd on Windows ARM64
if: runner.os == 'Windows' && runner.arch == 'ARM64'
shell: pwsh
run: choco install zstandard

- uses: actions/cache@v4
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') }}
key: sentry-native-${{ matrix.target || runner.os }}-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
enableCrossOsArchive: true

- name: Remove unused applications
Expand All @@ -54,9 +64,12 @@ jobs:
strategy:
fail-fast: false
matrix:
# Pin ubuntu to ensure mono is installed
# Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
os: [ubuntu-22.04, windows-latest, macos-15]
include:
- os: ubuntu-22.04 # Pin ubuntu to ensure mono is installed
- os: macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
- os: windows-latest
- os: windows-11-arm
target: Windows-arm64

steps:
- name: Cancel Previous Runs
Expand All @@ -72,6 +85,9 @@ jobs:
- name: Remove unused applications
uses: ./.github/actions/freediskspace

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

# We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
- name: Set Environment Variables
if: runner.os == 'macOS'
Expand All @@ -94,36 +110,42 @@ jobs:
fail-on-cache-miss: true

- name: Download sentry-native (Windows)
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows') }}
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows' && runner.arch == 'X64') }}
uses: actions/cache/restore@v4
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
- name: Download sentry-native (Windows arm64)
if: ${{ (env.CI_PUBLISHING_BUILD == 'true') || (runner.os == 'Windows' && runner.arch == 'ARM64') }}
uses: actions/cache/restore@v4
with:
path: src/Sentry/Platforms/Native/sentry-native
key: sentry-native-Windows-arm64-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }}
fail-on-cache-miss: true
enableCrossOsArchive: true

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

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

- name: Build
id: build
run: dotnet build Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true -bl:build.binlog
run: dotnet build Sentry-CI-Build-${{ matrix.target || runner.os }}.slnf -c Release --no-restore --nologo -v:minimal -flp:logfile=build.log -p:CopyLocalLockFileAssemblies=true -bl:build.binlog

- name: Upload build logs
if: ${{ steps.build.outcome != 'skipped' }}
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-build-logs
name: ${{ matrix.target || runner.os }}-build-logs
path: build.binlog

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

- name: Upload code coverage
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d
Expand All @@ -132,16 +154,16 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-verify-test-results
name: ${{ matrix.target || runner.os }}-verify-test-results
path: "**/*.received.*"

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

- name: Create Nuget Packages
- name: Create NuGet Packages
if: env.CI_PUBLISHING_BUILD == 'true'
run: dotnet pack Sentry-CI-Build-${{ runner.os }}.slnf -c Release --no-build --nologo
run: dotnet pack Sentry-CI-Build-${{ matrix.target || runner.os }}.slnf -c Release --no-build --nologo

- name: Archive Nuget Packages
- name: Archive NuGet Packages
if: env.CI_PUBLISHING_BUILD == 'true'
uses: actions/upload-artifact@v4
with:
Expand All @@ -159,9 +181,11 @@ jobs:
strategy:
fail-fast: false
matrix:
# Pin ubuntu to ensure mono is installed
# Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
os: [ubuntu-22.04, windows-latest, macos-15]
include:
- os: ubuntu-22.04 # Pin ubuntu to ensure mono is installed
- os: macos-15 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703
- os: windows-latest
- os: windows-11-arm

steps:
- uses: actions/checkout@v4
Expand All @@ -173,7 +197,7 @@ jobs:
integration-test
.github

- name: Fetch Nuget Packages
- name: Fetch NuGet Packages
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}
Expand All @@ -195,6 +219,7 @@ jobs:


trim-analysis:
needs: build-sentry-native
name: Trim analysis
runs-on: macos-15

Expand All @@ -205,7 +230,7 @@ jobs:
submodules: recursive
fetch-depth: 2 # default is 1 and codecov needs > 1

# We use macOS for the final publishing build so we get all the iOS/macCatalyst targets in the packages
# We use macOS for the final publishing build so we get all the iOS/Mac Catalyst targets in the packages
- name: Set Environment Variables
run: echo "CI_PUBLISHING_BUILD=true" >> $GITHUB_ENV

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Features

- .NET MAUI integration with CommunityToolkit.Mvvm Async Relay Commands can now be auto spanned with the new package Sentry.Maui.CommunityToolkit.Mvvm ([#4125](https://github.com/getsentry/sentry-dotnet/pull/4125))
- Support for Windows ARM64 with Native AOT ([#4187](https://github.com/getsentry/sentry-dotnet/pull/4187))

### Dependencies

Expand Down
81 changes: 81 additions & 0 deletions Sentry-CI-Build-Windows-arm64.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"solution": {
"path": "Sentry.sln",
"projects": [
"benchmarks\\Sentry.Benchmarks\\Sentry.Benchmarks.csproj",
"modules\\perfview\\src\\FastSerialization\\FastSerialization.csproj",
"modules\\perfview\\src\\TraceEvent\\TraceEvent.csproj",
"samples\\Sentry.Samples.AspNetCore.Basic\\Sentry.Samples.AspNetCore.Basic.csproj",
"samples\\Sentry.Samples.AspNetCore.Blazor.Server\\Sentry.Samples.AspNetCore.Blazor.Server.csproj",
"samples\\Sentry.Samples.AspNetCore.Blazor.Wasm\\Sentry.Samples.AspNetCore.Blazor.Wasm.csproj",
"samples\\Sentry.Samples.AspNetCore.Grpc\\Sentry.Samples.AspNetCore.Grpc.csproj",
"samples\\Sentry.Samples.AspNetCore.Mvc\\Sentry.Samples.AspNetCore.Mvc.csproj",
"samples\\Sentry.Samples.AspNetCore.Serilog\\Sentry.Samples.AspNetCore.Serilog.csproj",
"samples\\Sentry.Samples.AspNetCore.WebAPI.Profiling\\Sentry.Samples.AspNetCore.WebAPI.Profiling.csproj",
"samples\\Sentry.Samples.Aws.Lambda.AspNetCoreServer\\Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj",
"samples\\Sentry.Samples.Azure.Functions.Worker\\Sentry.Samples.Azure.Functions.Worker.csproj",
"samples\\Sentry.Samples.Console.Basic\\Sentry.Samples.Console.Basic.csproj",
"samples\\Sentry.Samples.Console.Customized\\Sentry.Samples.Console.Customized.csproj",
"samples\\Sentry.Samples.Console.HeapDump\\Sentry.Samples.Console.HeapDump.csproj",
"samples\\Sentry.Samples.Console.Native\\Sentry.Samples.Console.Native.csproj",
"samples\\Sentry.Samples.Console.Profiling\\Sentry.Samples.Console.Profiling.csproj",
"samples\\Sentry.Samples.EntityFramework\\Sentry.Samples.EntityFramework.csproj",
"samples\\Sentry.Samples.GenericHost\\Sentry.Samples.GenericHost.csproj",
"samples\\Sentry.Samples.Google.Cloud.Functions\\Sentry.Samples.Google.Cloud.Functions.csproj",
"samples\\Sentry.Samples.GraphQL.Client.Http\\Sentry.Samples.GraphQL.Client.Http.csproj",
"samples\\Sentry.Samples.GraphQL.Server\\Sentry.Samples.GraphQL.Server.csproj",
"samples\\Sentry.Samples.Hangfire\\Sentry.Samples.Hangfire.csproj",
"samples\\Sentry.Samples.Log4Net\\Sentry.Samples.Log4Net.csproj",
"samples\\Sentry.Samples.Maui\\Sentry.Samples.Maui.csproj",
"samples\\Sentry.Samples.ME.Logging\\Sentry.Samples.ME.Logging.csproj",
"samples\\Sentry.Samples.NLog\\Sentry.Samples.NLog.csproj",
"samples\\Sentry.Samples.OpenTelemetry.AspNetCore\\Sentry.Samples.OpenTelemetry.AspNetCore.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj",
"src\\Sentry.AspNet\\Sentry.AspNet.csproj",
"src\\Sentry.AspNetCore.Blazor.WebAssembly\\Sentry.AspNetCore.Blazor.WebAssembly.csproj",
"src\\Sentry.AspNetCore.Grpc\\Sentry.AspNetCore.Grpc.csproj",
"src\\Sentry.AspNetCore\\Sentry.AspNetCore.csproj",
"src\\Sentry.Azure.Functions.Worker\\Sentry.Azure.Functions.Worker.csproj",
"src\\Sentry.Bindings.Android\\Sentry.Bindings.Android.csproj",
"src\\Sentry.DiagnosticSource\\Sentry.DiagnosticSource.csproj",
"src\\Sentry.EntityFramework\\Sentry.EntityFramework.csproj",
"src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj",
"src\\Sentry.Google.Cloud.Functions\\Sentry.Google.Cloud.Functions.csproj",
"src\\Sentry.Hangfire\\Sentry.Hangfire.csproj",
"src\\Sentry.Log4Net\\Sentry.Log4Net.csproj",
"src\\Sentry.Maui.CommunityToolkit.Mvvm\\Sentry.Maui.CommunityToolkit.Mvvm.csproj",
"src\\Sentry.Maui\\Sentry.Maui.csproj",
"src\\Sentry.NLog\\Sentry.NLog.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry.SourceGenerators\\Sentry.SourceGenerators.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
"test\\Sentry.Android.AssemblyReader.Tests\\Sentry.Android.AssemblyReader.Tests.csproj",
"test\\Sentry.AspNet.Tests\\Sentry.AspNet.Tests.csproj",
"test\\Sentry.AspNetCore.Grpc.Tests\\Sentry.AspNetCore.Grpc.Tests.csproj",
"test\\Sentry.AspNetCore.Tests\\Sentry.AspNetCore.Tests.csproj",
"test\\Sentry.AspNetCore.TestUtils\\Sentry.AspNetCore.TestUtils.csproj",
"test\\Sentry.Azure.Functions.Worker.Tests\\Sentry.Azure.Functions.Worker.Tests.csproj",
"test\\Sentry.Extensions.Logging.Tests\\Sentry.Extensions.Logging.Tests.csproj",
"test\\Sentry.Google.Cloud.Functions.Tests\\Sentry.Google.Cloud.Functions.Tests.csproj",
"test\\Sentry.Hangfire.Tests\\Sentry.Hangfire.Tests.csproj",
"test\\Sentry.Log4Net.Tests\\Sentry.Log4Net.Tests.csproj",
"test\\Sentry.Maui.CommunityToolkit.Mvvm.Tests\\Sentry.Maui.CommunityToolkit.Mvvm.Tests.csproj",
"test\\Sentry.Maui.Tests\\Sentry.Maui.Tests.csproj",
"test\\Sentry.NLog.Tests\\Sentry.NLog.Tests.csproj",
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.SourceGenerators.Tests\\Sentry.SourceGenerators.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.csproj",
"test\\Sentry.Tests\\Sentry.Tests.csproj",
"test\\SingleFileTestApp\\SingleFileTestApp.csproj"
]
}
}
9 changes: 8 additions & 1 deletion integration-test/runtime.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ internal class FakeTransport : ITransport
}
elseif ($IsWindows)
{
return "./console-app/bin/Release/$framework/win-x64/publish/console-app.exe"
if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
{
return "./console-app/bin/Release/$framework/win-arm64/publish/console-app.exe"
}
else
{
return "./console-app/bin/Release/$framework/win-x64/publish/console-app.exe"
}
}
else
{
Expand Down
10 changes: 9 additions & 1 deletion scripts/build-sentry-native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ try
}
elseif ($IsWindows)
{
$outDir += '/win-x64'
$additionalArgs += @('-C', 'src/Sentry/Platforms/Native/windows-config.cmake')
$actualBuildDir = "$buildDir/RelWithDebInfo"
$libPrefix = ''
$libExtension = '.lib'

if ("Arm64".Equals([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()))
{
$outDir += '/win-arm64'
}
else
{
$outDir += '/win-x64'
}
}
elseif ($IsLinux)
{
Expand Down
23 changes: 23 additions & 0 deletions scripts/generate-solution-filters-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,29 @@ filterConfigs:
- "**/*Sentry.Samples.Android.csproj"
- "**/*OpenTelemetry.AspNet.csproj"

- outputPath: Sentry-CI-Build-Windows-arm64.slnf
include:
groups:
- "allProjects"
patterns:
- "modules/perfview/**/TraceEvent.csproj"
- "modules/perfview/**/FastSerialization.csproj"
exclude:
groups:
- "macOnly"
- "artefacts"
- "trimTests"
patterns:
- "**/*AndroidTestApp.csproj"
- "**/*DeviceTests*.csproj"
- "**/*Sentry.Maui.Device.TestApp.csproj"
- "**/*Sentry.Samples.Android.csproj"
- "**/*OpenTelemetry.AspNet.csproj"
# Depends on LocalDb or SQLitePCL which are x64
- "**/*Sentry.DiagnosticSource.IntegrationTests.csproj"
- "**/*Sentry.DiagnosticSource.Tests.csproj"
- "**/*Sentry.EntityFramework.Tests.csproj"

- outputPath: Sentry-CI-CodeQL.slnf
include:
groups:
Expand Down
Loading
Loading