Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 5 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,7 @@ jobs:
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.

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

- name: Archive NuGet Packages
Expand All @@ -199,44 +196,24 @@ jobs:
src/**/Release/*.nupkg
src/**/Release/*.snupkg

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

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04 # Pin ubuntu to ensure mono is installed
Comment thread
jpnurmi marked this conversation as resolved.
- os: ubuntu-22.04-arm
- os: ubuntu-latest
container: ghcr.io/getsentry/sentry-dotnet-alpine:3.21
- 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
- name: Sparse checkout
if: env.CI_PUBLISHING_BUILD == 'true'
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is specific to the publishing build or macOS, but here's the integration test error for reference. Other runners have no problems, this only occurs on macOS if we don't switch to a sparse checkout:

building maui-app
      Determining projects to restore...
      All projects are up-to-date for restore.
      Detected signing identity:
              
        Bundle Id: com.companyname.mauiapp
        App Id: com.companyname.mauiapp
      maui-app -> /maui-app/bin/Release/net8.0-ios17.0/iossimulator-arm64/maui-app.dll
      Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
      Optimizing assemblies for size. This process might take a while.
      Tool /Users/runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.iossimulator-arm64/8.0.15/Sdk/../tools/mono-aot-cross execution finished (exit code = 137).
              
    /Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.0/17.0.8523/targets/Xamarin.Shared.Sdk.targets(1214,3): error : Failed to AOT compile aot-instances.dll, the AOT compiler exited with code 137. [/maui-app/maui-app.csproj::TargetFramework=net8.0-ios17.0]
      Tool /Users/runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.iossimulator-arm64/8.0.15/Sdk/../tools/mono-aot-cross execution finished (exit code = 1).
              
    /Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.0/17.0.8523/targets/Xamarin.Shared.Sdk.targets(1214,3): error : Failed to AOT compile Microsoft.iOS.dll, the AOT compiler exited with code 1. [/maui-app/maui-app.csproj::TargetFramework=net8.0-ios17.0]
    
    Build FAILED.
    
    /Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.0/17.0.8523/targets/Xamarin.Shared.Sdk.targets(1214,3): error : Failed to AOT compile aot-instances.dll, the AOT compiler exited with code 137. [/maui-app/maui-app.csproj::TargetFramework=net8.0-ios17.0]
    /Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.0/17.0.8523/targets/Xamarin.Shared.Sdk.targets(1214,3): error : Failed to AOT compile Microsoft.iOS.dll, the AOT compiler exited with code 1. [/maui-app/maui-app.csproj::TargetFramework=net8.0-ios17.0]
        0 Warning(s)
        2 Error(s)

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
Comment thread
jpnurmi marked this conversation as resolved.
integration-test
.github

- name: Fetch NuGet Packages
if: env.CI_PUBLISHING_BUILD == 'true'
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}
path: src

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

- name: Test
- name: Integration test
uses: getsentry/github-workflows/sentry-cli/integration-test/@v2
with:
path: integration-test
Expand Down
4 changes: 2 additions & 2 deletions src/Sentry.Maui/Sentry.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
-->
<EnableWindowsTargeting Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</EnableWindowsTargeting>

<!-- We'll need to package this only on OSX, so we get the iOS native support. -->
<IsPackable Condition="!$([MSBuild]::IsOSPlatform('OSX'))">false</IsPackable>
<!-- We'll need to package this only for builds including mobile targets. -->
<IsPackable Condition="'$(NO_MOBILE)' == 'true'">false</IsPackable>

<!--
Imports MAUI dependencies.
Expand Down
12 changes: 6 additions & 6 deletions src/Sentry/Platforms/Native/Sentry.Native.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,36 @@
<None Include="$(MSBuildThisFileDirectory)buildTransitive\Sentry.Native.targets" Pack="true" PackagePath="build\Sentry.Native.targets" />
</ItemGroup>

<!-- Packaging the native library -->
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'win-x64'">
<!-- Packaging the native library (NOTE: $(RuntimeIdentifier) is not set) -->
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'win-x64'">
<None Include="$(SentryNativeOutputDirectory-win-x64)$(SentryNativeLibraryName).lib">
<Pack>true</Pack>
<PackagePath>\sentry-native\$(NativeLibRelativePath-win-x64)</PackagePath>
</None>
</ItemGroup>

<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'win-arm64'">
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'win-arm64'">
<None Include="$(SentryNativeOutputDirectory-win-arm64)$(SentryNativeLibraryName).lib">
<Pack>true</Pack>
<PackagePath>\sentry-native\$(NativeLibRelativePath-win-arm64)</PackagePath>
</None>
</ItemGroup>

<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'linux-x64'">
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'linux-x64'">
<None Include="$(SentryNativeOutputDirectory-linux-x64)lib$(SentryNativeLibraryName).a">
<Pack>true</Pack>
<PackagePath>\sentry-native\$(NativeLibRelativePath-linux-x64)</PackagePath>
</None>
</ItemGroup>

<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'linux-musl-x64'">
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'linux-musl-x64'">
<None Include="$(SentryNativeOutputDirectory-linux-musl-x64)lib$(SentryNativeLibraryName).a">
<Pack>true</Pack>
<PackagePath>\sentry-native\$(NativeLibRelativePath-linux-musl-x64)</PackagePath>
</None>
</ItemGroup>

<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$(RuntimeIdentifier)' == 'linux-arm64'">
<ItemGroup Condition="'$(CI_PUBLISHING_BUILD)' == 'true' or '$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)' == 'linux-arm64'">
<None Include="$(SentryNativeOutputDirectory-linux-arm64)lib$(SentryNativeLibraryName).a">
<Pack>true</Pack>
<PackagePath>\sentry-native\$(NativeLibRelativePath-linux-arm64)</PackagePath>
Expand Down
Loading