fix: Force roslyn generation for xamarin targets (#2098)

Co-authored-by: Jerome Laban <jerome.laban@nventive.com>
This commit is contained in:
Matthew Leibowitz 2022-06-03 04:53:30 +02:00 коммит произвёл GitHub
Родитель ff5239a007
Коммит c8cdc0efec
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 31 добавлений и 23 удалений

Просмотреть файл

@ -39,6 +39,7 @@ var UNSUPPORTED_TESTS = Argument ("unsupportedTests", "");
var THROW_ON_TEST_FAILURE = Argument ("throwOnTestFailure", true);
var NUGET_DIFF_PRERELEASE = Argument ("nugetDiffPrerelease", false);
var COVERAGE = Argument ("coverage", false);
var SOLUTION_TYPE = Argument ("solutionType", "").ToLower ().Trim ();
var CHROMEWEBDRIVER = Argument ("chromedriver", EnvironmentVariable ("CHROMEWEBDRIVER"));
var PLATFORM_SUPPORTS_VULKAN_TESTS = (IsRunningOnWindows () || IsRunningOnLinux ()).ToString ();
@ -163,9 +164,9 @@ Task ("libs")
var net6 = $"./source/SkiaSharpSource{platform}-net6.slnf";
var netfx = $"./source/SkiaSharpSource{platform}-netfx.slnf";
if (FileExists (net6) || FileExists (netfx)) {
if (FileExists (net6))
if (FileExists (net6) && (string.IsNullOrEmpty(SOLUTION_TYPE) || SOLUTION_TYPE == "net6"))
RunMSBuild (net6, properties: new Dictionary<string, string> { { "BuildingForNet6", "true" } });
if (FileExists (netfx))
if (FileExists (netfx) && (string.IsNullOrEmpty(SOLUTION_TYPE) || SOLUTION_TYPE == "netfx"))
RunMSBuild (netfx, properties: new Dictionary<string, string> { { "BuildingForNet6", "false" } });
} else {
var slnf = $"./source/SkiaSharpSource{platform}.slnf";

Просмотреть файл

@ -12,7 +12,7 @@ parameters:
postBuildSteps: [] # any additional steps to run after the build
initScript: '' # any scripts to run before starting the bootstrapper
additionalArgs: '' # any additional arguments to pass to the bootstrapper
retryCount: 1 # the number of times to retry the bootstrapper
retryCount: 3 # the number of times to retry the bootstrapper
condition: succeeded() # whether or not to run this template
shouldPublish: true # whether or not to publish the artifacts
configuration: $(CONFIGURATION) # the build configuration
@ -64,10 +64,6 @@ jobs:
- pwsh: .\scripts\get-build-type.ps1 -ExternalsBuildId '${{ parameters.buildExternals }}'
displayName: Determine build type
- pwsh: ./scripts/get-free-space.ps1
displayName: Display the free space to debug out of space errors
condition: always()
# provisioning steps
- ${{ if ne(parameters.vmImage.provisioningSteps, '') }}:
- ${{ parameters.vmImage.provisioningSteps }}
@ -290,10 +286,6 @@ jobs:
- ${{ if ne(length(parameters.preBuildSteps), 0) }}:
- ${{ parameters.preBuildSteps }}
- pwsh: ./scripts/get-free-space.ps1
displayName: Display the free space to debug out of space errors
condition: always()
# build
- ${{ if eq(parameters.docker, '') }}:
- ${{ if endsWith(parameters.name, '_windows') }}:
@ -339,14 +331,6 @@ jobs:
displayName: Run the bootstrapper for ${{ parameters.target }} using the Docker image
condition: and(succeeded(), eq(variables['DOWNLOAD_EXTERNALS'], ''))
- pwsh: ./scripts/get-free-space.ps1
displayName: Display the free space to debug out of space errors
condition: always()
- pwsh: ./scripts/get-largest-folders.ps1
displayName: Display the full folder size to debug out of space errors
condition: always()
# post-build steps
- ${{ parameters.postBuildSteps }}

Просмотреть файл

@ -384,14 +384,29 @@ stages:
- native_linux
- native_wasm
jobs:
- template: azure-templates-bootstrapper.yml # Build Managed (Windows)
- template: azure-templates-bootstrapper.yml # Build Managed .NET Framework (Windows)
parameters:
name: managed_windows
displayName: Managed (Windows)
name: managed_netfx_windows
displayName: Managed .NET Framework (Windows)
buildPipelineType: ${{ parameters.buildPipelineType }}
vmImage: ${{ parameters.VM_IMAGE_WINDOWS}}
target: libs
additionalArgs: --skipExternals="all"
additionalArgs: --skipExternals="all" --solutionType=netfx
installPreviewVs: true
requiredArtifacts:
- name: native
artifactName: managed
postBuildSteps:
- pwsh: Remove-Item ./output/native/ -Recurse -Force -ErrorAction Continue
displayName: Delete the native folder
- template: azure-templates-bootstrapper.yml # Build Managed .NET (Windows)
parameters:
name: managed_net6_windows
displayName: Managed .NET (Windows)
buildPipelineType: ${{ parameters.buildPipelineType }}
vmImage: ${{ parameters.VM_IMAGE_WINDOWS}}
target: libs
additionalArgs: --skipExternals="all" --solutionType=net6
installPreviewVs: true
requiredArtifacts:
- name: native

Просмотреть файл

@ -27,6 +27,14 @@
<LangVersion Condition="$(IsWindows)">10.0</LangVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Disable csc shared compilation to reduce memory usage on CI -->
<UseSharedCompilation>False</UseSharedCompilation>
<!-- Force the use of Uno Roslyn generators to reduce memory usage on CI -->
<UnoUIUseRoslynSourceGenerators>true</UnoUIUseRoslynSourceGenerators>
</PropertyGroup>
<!-- Classic Tizen, Xamarin and UWP -->
<PropertyGroup>
<ClassicTargetFrameworks>tizen40</ClassicTargetFrameworks>