Skip to content

Commit 25a2d57

Browse files
authored
fix(build): force sequential AndroidTestApp builds (#4363)
* fix(build): set unique BaseIntermediateOutputPath for AndroidTestApp * Try without EnsureAndroidTestAppRestored * Let MSBuild run the default target including Restore * Revert changes * Try BuildInParallel="false" instead * Switch back to `BaseIntermediateOutputPath` * Switch to `IntermediateOutputPath` and fix target framework conditions * restore workflow_dispatch that went accidentally missing * Try MSBuildProjectExtensionsPath + explicit versions * Revert changes, again * Remove EnsureAndroidTestAppRestored * Drop PublishAot=true targets for Windows Not supported: > AndroidTestApp net9.0-android failed with 1 error(s) (0,0s) > C:\Users\jpnurmi\.nuget\packages\microsoft.dotnet.ilcompiler\9.0.6\build\Microsoft.NETCore.Native.Publish.targets(61,5): error : Cross-OS native compilation is not supported. > AndroidTestApp net9.0-android failed (1,0s) → test\AndroidTestApp\bin\net9.0-android\A=True-S=False-C=False\AndroidTestApp.dll * Another non-parallelized attempt * Revert "Remove EnsureAndroidTestAppRestored" This reverts commit 89e8035. * Clean up * fix _TestAPK condition * fix numbering * Android AOT is not supported on Windows * Final clean up * Restore net8 checks * Minimize changes * Add link
1 parent 25a894d commit 25a2d57

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,20 @@
3131
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_InnerBuildTestAPKs" Properties="TargetFramework=net9.0-android" Condition="$(TargetFramework) == 'net9.0'" />
3232
</Target>
3333
<Target Name="_InnerBuildTestAPKs">
34-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=False;_Compressed=False" />
35-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=False;_Compressed=True" />
36-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=True;_Compressed=False" />
37-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="_Aot=False;_Store=True;_Compressed=True" />
38-
39-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=False" />
40-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=True" />
41-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=False" />
42-
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=True" />
34+
<!-- https://learn.microsoft.com/visualstudio/msbuild/msbuild-batching -->
35+
<ItemGroup>
36+
<_TestAPK Include="1" Properties="_Aot=False;_Store=False;_Compressed=False" />
37+
<_TestAPK Include="2" Properties="_Aot=False;_Store=False;_Compressed=True" />
38+
<_TestAPK Include="3" Properties="_Aot=False;_Store=True;_Compressed=False" />
39+
<_TestAPK Include="4" Properties="_Aot=False;_Store=True;_Compressed=True" />
40+
41+
<_TestAPK Include="5" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=False" />
42+
<_TestAPK Include="6" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=False;_Compressed=True" />
43+
<_TestAPK Include="7" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=False" />
44+
<_TestAPK Include="8" Condition="!$(TargetFramework.StartsWith('net8'))" Properties="_Aot=True;_Store=True;_Compressed=True" />
45+
</ItemGroup>
46+
47+
<MSBuild Projects="$(MSBuildProjectFile)" Targets="_BuildTestAPK" Properties="%(_TestAPK.Properties)" BuildInParallel="false" />
4348
</Target>
4449
<Target Name="_BuildTestAPK">
4550
<PropertyGroup>

0 commit comments

Comments
 (0)