Skip to content

Commit

Permalink
build: Few build adjustments to reduce flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Aug 8, 2023
1 parent 97bc94f commit 211cf68
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion build/workflow/stage-build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:

- task: MSBuild@1
displayName: 'Build solution'
retryCountOnTaskFailure: 3
inputs:
solution: src/Uno.Toolkit.sln
configuration: Release
Expand Down
2 changes: 1 addition & 1 deletion samples/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.5.0-2.final" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.7.0-2.final" />
<!--
If, in the same solution, you are referencing a project that uses https://github.com/onovotny/MSBuildSdkExtras,
you need to make sure that the version provided here matches https://github.com/novotnyllc/MSBuildSdkExtras/blob/main/Source/MSBuild.Sdk.Extras/DefaultItems/ImplicitPackages.targets#L11.
Expand Down
2 changes: 2 additions & 0 deletions samples/Uno.Toolkit.Samples/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project ToolsVersion="15.0">
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />

<ItemGroup>
<!-- Remove WinUI files (Ctrl+F: UWP_WinUI_Removal) -->
<Page Remove="$(MSBuildThisFileDirectory)**\*.WinUI.xaml" Condition="'$(FrameworkLineage)' == 'UWP'" />
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PackageVersion Include="Uno.UITest.Xamarin" Version="1.1.0-dev.32" />
<PackageVersion Include="Xamarin.UITest" Version="4.1.0" />
<PackageVersion Include="MSTest.TestFramework" Version="2.1.2" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.5.0-2.final" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.7.0-2.final" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22518.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@

<ItemGroup>
<UpToDateCheckInput Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml" />
<!-- This is a workaround -->
<!-- Without this, the build gets flaky and sometimes fails with this error -->
<!-- C:\hostedtoolcache\windows\dotnet\sdk\7.0.306\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(221,5): error NU5019: File not found: 'D:\a\1\s\src\library\Uno.Toolkit.Cupertino\bin\Uno.Toolkit.WinUI.Cupertino\Release\net7.0-ios\Uno.Toolkit.UI.Cupertino.uprimarker'. [D:\a\1\s\src\library\Uno.Toolkit.Cupertino\Uno.Toolkit.UI.Cupertino.csproj] -->
<Content Include="..\..\Uno.Toolkit.UI\Assets\**\*.png" />
</ItemGroup>

<ItemGroup Condition="$(IsXamarinIOS) or $(IsMonoAndroid) or $(IsXamarinMac)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
<ItemGroup Condition="$(_IsWindowsWinUI)">
<PackageReference Include="Microsoft.WindowsAppSDK" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" />

<Page Remove="Generated\*.xaml" />
</ItemGroup>

<ItemGroup>
<UpToDateCheckInput Include="**\*.xaml" Exclude="bin\**\*.xaml;obj\**\*.xaml" />
<!-- This is a workaround -->
<!-- Without this, the build gets flaky and sometimes fails with this error -->
<!-- C:\hostedtoolcache\windows\dotnet\sdk\7.0.306\Sdks\NuGet.Build.Tasks.Pack\buildCrossTargeting\NuGet.Build.Tasks.Pack.targets(221,5): error NU5019: File not found: 'D:\a\1\s\src\library\Uno.Toolkit.Cupertino\bin\Uno.Toolkit.WinUI.Cupertino\Release\net7.0-ios\Uno.Toolkit.WinUI.Cupertino.uprimarker'. [D:\a\1\s\src\library\Uno.Toolkit.Cupertino\Uno.Toolkit.WinUI.Cupertino.csproj] -->
<Content Include="..\..\Uno.Toolkit.UI\Assets\**\*.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Uno.Toolkit.UI\Uno.Toolkit.WinUI.csproj" />
Expand Down

0 comments on commit 211cf68

Please sign in to comment.