Skip to content

Commit

Permalink
CI cleanup (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes committed Oct 18, 2023
1 parent 7e82f99 commit 6e18dee
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 48 deletions.
22 changes: 6 additions & 16 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ runs:
distribution: 'temurin'
java-version: '11'

# https://github.com/actions/runner-images/issues/7667
# .NET 3.1 has been removed from all OS due to EOL
# .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
6.0.x
6.0.x
7.0.x
8.0.100-rc.2.23502.2
8.0.x
- name: Dependency Caching
uses: actions/cache@v3
Expand All @@ -44,17 +47,4 @@ runs:
maui-android \
${{ runner.os == 'macOS' && 'maui-ios maui-maccatalyst maui-windows' || '' }} \
${{ runner.os == 'Windows' && 'maui-windows' || '' }} \
--temp-dir "${{ runner.temp }}" --from-rollback-file rollback.json
- name: Restore workloads
shell: bash
run: dotnet workload restore

- name: Update workloads
shell: bash
run: dotnet workload update

- name: Log what we have in the workloads
shell: bash
run: dotnet workload update

--temp-dir "${{ runner.temp }}"
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# 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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/device-tests-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: ./.github/actions/buildnative

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

- name: Restore .NET Dependencies
run: dotnet restore test/Sentry.Maui.Device.TestApp --nologo
Expand All @@ -46,7 +46,7 @@ jobs:
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 Down
5 changes: 3 additions & 2 deletions .github/workflows/device-tests-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:

jobs:
build:
runs-on: macos-latest
# Pinning `macos-13` because Microsoft.iOS 16.4 requires Xcode 14.3 which is only built-in in 13
runs-on: macos-13
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
Expand All @@ -29,7 +30,7 @@ jobs:
uses: ./.github/actions/buildcocoasdk

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

- name: Restore .NET Dependencies
run: dotnet restore test/Sentry.Maui.Device.TestApp --nologo
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Breaking changes

Mobile support:
Support Changes:

.NET 6 on mobile is out of support since May 2023. With .NET 8 coming,
it won't be possible to build .NET 6 Mobile specific targets.
Expand All @@ -13,6 +13,7 @@ Mobile apps still on .NET 6 will pull the `Sentry` .NET 6, which offers the .NET
without native/platform specific bindings and SDKs. See [this ticket for more details](https://github.com/getsentry/sentry-dotnet/issues/2623).

- Drop .NET 6 Mobile in favor of .NET 7 ([#2624](https://github.com/getsentry/sentry-dotnet/pull/2604))
- Drop support for `Tizen` ([#2734](https://github.com/getsentry/sentry-dotnet/pull/2734))

API Changes:

Expand Down
2 changes: 0 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<NO_IOS>true</NO_IOS>
<NO_MACCATALYST>true</NO_MACCATALYST>
<NO_WINDOWS>true</NO_WINDOWS>
<NO_TIZEN>true</NO_TIZEN>
</PropertyGroup>

<!--
Expand Down Expand Up @@ -65,7 +64,6 @@
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">10.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'tizen'">6.5</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
Expand Down
9 changes: 0 additions & 9 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'ios'">10.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'tizen'">6.5</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="'$(TargetPlatformIdentifier)' == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
Expand All @@ -29,11 +28,6 @@
<Compile Remove="**\Windows\**\*.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetPlatformIdentifier)' != 'tizen'">
<Compile Remove="**\*.Tizen.cs" />
<Compile Remove="**\Tizen\**\*.cs" />
</ItemGroup>

<!-- Allow setting CLSCompliant via property in any csproj -->
<ItemGroup>
<AssemblyAttribute Include="CLSCompliantAttribute" Condition="'$(CLSCompliant)' == 'true'">
Expand Down Expand Up @@ -67,9 +61,6 @@
<PropertyGroup Condition="'$(MauiWorkloadVersion)' == ''">
<NO_WINDOWS>true</NO_WINDOWS>
</PropertyGroup>
<PropertyGroup Condition="!Exists('$(MSBuildBinPath)\..\..\packs\Samsung.Tizen.Sdk')">
<NO_TIZEN>true</NO_TIZEN>
</PropertyGroup>

</Target>

Expand Down
4 changes: 0 additions & 4 deletions rollback.json

This file was deleted.

1 change: 1 addition & 0 deletions samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<SelfContained>true</SelfContained>
</PropertyGroup>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<SelfContained>true</SelfContained>
</PropertyGroup>

<!--
Expand Down
18 changes: 14 additions & 4 deletions samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>Sentry.Samples.Maui</RootNamespace>
<UseMaui>true</UseMaui>
<SelfContained>true</SelfContained>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<PublishReadyToRun>false</PublishReadyToRun>
Expand All @@ -31,7 +32,7 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>

<!--
This avoids attaching a debugger when we crash the app when targeting Windows while running in Visual Studio.
Expand All @@ -55,11 +56,20 @@
<PropertyGroup>
<OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</OSArchitecture>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'Arm64' And ('$(_iOSRuntimeIdentifier)' == 'iossimulator-x64' Or ('$(_iOSRuntimeIdentifier)' == '' And '$(RuntimeIdentifier)' == ''))">iossimulator-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'Arm64' And ('$(_MacCatalystRuntimeIdentifier)' == 'maccatalyst-x64' Or ('$(_MacCatalystRuntimeIdentifier)' == '' And '$(RuntimeIdentifier)' == ''))">maccatalyst-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'x64' And ('$(_MacCatalystRuntimeIdentifier)' == '' And '$(RuntimeIdentifier)' == '')">maccatalyst-x64</RuntimeIdentifier>

<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'Arm64'">android-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'Arm64'">iossimulator-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'Arm64'">maccatalyst-arm64</RuntimeIdentifier>

<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'x64'">android-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'x64'">iossimulator-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'x64'">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<Target Name="LOG IDENTIFIERS" BeforeTargets="build">
<Message Importance="high" Text="TargetFramework: $(TargetFramework) - RuntimeIdentifier: $(RuntimeIdentifier)" />
</Target>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
Expand Down
3 changes: 0 additions & 3 deletions src/Sentry.Maui/Sentry.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
<TargetFrameworks Condition="'$(NO_MACCATALYST)' == '' And $([MSBuild]::IsOSPlatform('OSX'))">$(TargetFrameworks);net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="'$(NO_WINDOWS)' == '' And !$([MSBuild]::IsOSPlatform('Linux'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>

<!-- Target Tizen only if the Tizen SDK workload pack is installed. -->
<TargetFrameworks Condition="'$(NO_TIZEN)' == '' And Exists('$(MSBuildBinPath)\..\..\packs\Samsung.Tizen.Sdk')">$(TargetFrameworks);net7.0-tizen</TargetFrameworks>

<!--
This flag allows us to target Windows-specific code when building on OSX, so we can build and pack all platforms on a single machine.
See https://learn.microsoft.com/dotnet/core/tools/sdk-errors/netsdk1100
Expand Down
3 changes: 0 additions & 3 deletions src/Sentry.Maui/SentryMauiAppBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ private static void RegisterMauiEventsBinder(this MauiAppBuilder builder)
#elif WINDOWS
events.AddWindows(lifecycle => lifecycle.OnLaunching((application, _) =>
(application as IPlatformApplication)?.BindMauiEvents()));
#elif TIZEN
events.AddTizen(lifecycle => lifecycle.OnCreate(application =>
(application as IPlatformApplication)?.BindMauiEvents()));
#endif
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<RootNamespace>Sentry.Maui.Device.TestApp</RootNamespace>
<AssemblyName>Sentry.Maui.Device.TestApp</AssemblyName>
<UseMaui>true</UseMaui>
<SelfContained>true</SelfContained>

<!-- Display name -->
<ApplicationTitle>Sentry.Maui.Device.TestApp</ApplicationTitle>
Expand Down Expand Up @@ -41,8 +42,14 @@
<PropertyGroup>
<OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</OSArchitecture>
<TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'Arm64' And ('$(_iOSRuntimeIdentifier)' == 'iossimulator-x64' Or ('$(_iOSRuntimeIdentifier)' == '' And '$(RuntimeIdentifier)' == ''))">iossimulator-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'Arm64' And ('$(_MacCatalystRuntimeIdentifier)' == 'maccatalyst-x64' Or ('$(_MacCatalystRuntimeIdentifier)' == '' And '$(RuntimeIdentifier)' == ''))">maccatalyst-arm64</RuntimeIdentifier>

<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'Arm64'">android-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'Arm64'">iossimulator-arm64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'Arm64'">maccatalyst-arm64</RuntimeIdentifier>

<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'x64'">android-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'x64'">iossimulator-x64</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'x64'">maccatalyst-x64</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions test/SingleFileTestApp/SingleFileTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<LangVersion>11</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 6e18dee

Please sign in to comment.