- Update roslyn to 3.3.1 for generation host
- Update to .NET Core 3.0 support
- Add more environments to the build matrix
This commit is contained in:
Jérôme Laban 2019-10-03 21:30:36 -04:00
Родитель 0842ec0bcc
Коммит 0a7b9c1d8f
23 изменённых файлов: 129 добавлений и 64 удалений

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

@ -1,19 +1,18 @@
resources:
containers:
- container: nv-bionic-wasm
image: nventive/wasm-build:1.4.1
jobs:
- job: Windows
- job: Windows_VS2019
pool:
vmImage: 'vs2017-win2016'
vmImage: 'windows-2019'
steps:
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.7.0
checkLatest: false
- task: DotNetCoreInstaller@0
inputs:
version: '3.0.100'
- powershell: .\build\build.ps1 -script build\build.cake
displayName: Build
@ -39,10 +38,6 @@ jobs:
ArtifactDirectory: $(build.artifactstagingdirectory)
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
- task: DotNetCoreInstaller@0
inputs:
version: '2.2.103'
- task: DotNetCoreCLI@2
displayName: Validate DotNetCore CLI build
inputs:
@ -57,8 +52,37 @@ jobs:
ArtifactName: unosourcegenerator-drop
ArtifactType: Container
- job: Windows_VS2017
pool:
vmImage: 'vs2017-win2016'
steps:
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.7.0
checkLatest: false
- task: DotNetCoreInstaller@0
inputs:
version: '3.0.100'
- powershell: .\build\build.ps1 -script build\build.cake
displayName: Build
- task: DotNetCoreCLI@2
displayName: Validate DotNetCore CLI build
inputs:
command: build
arguments: "--configuration Release"
workingDirectory: $(build.sourcesdirectory)\src\Uno.SampleCoreApp
- job: Linux
container: nv-bionic-wasm
container: nventive/wasm-build:1.4.1
pool:
vmImage: 'ubuntu-16.04'
@ -69,6 +93,10 @@ jobs:
versionSpec: 4.7.0
checkLatest: false
- task: DotNetCoreInstaller@0
inputs:
version: '3.0.100'
- bash: msbuild /r /p:Configuration=Release ./src/Uno.SourceGenerator.Linux.sln # /bl:$(build.artifactstagingdirectory)/linux-build.binlog
displayName: Build
@ -83,6 +111,12 @@ jobs:
strategy:
matrix:
Xamarin_6_4_0:
XamarinVersion: 6_4_0
Xamarin_6_0_0:
XamarinVersion: 6_0_0
Xamarin_5_18_1:
XamarinVersion: 5_18_1
Xamarin_5_16_0:
XamarinVersion: 5_16_0
Xamarin_5_12_0:
@ -100,6 +134,10 @@ jobs:
versionSpec: 4.7.0
checkLatest: false
- task: DotNetCoreInstaller@0
inputs:
version: '3.0.100'
- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinVersion)"
displayName: Select Xamarin Version

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

@ -18,8 +18,8 @@
<file src="..\src\Uno.SourceGeneratorTasks.Dev15.0\Bin\Release\**\*.pdb" target="build\Dev15.0" />
<file src="..\src\Uno.SourceGeneratorTasks.Dev15.0\Bin\Release\*.config" target="build\Dev15.0" />
<file src="..\src\Uno.SourceGeneration.Host\bin\Release\net461\**\*.*" target="build\host\net461" />
<file src="..\src\Uno.SourceGeneration.Host\bin\Release\netcoreapp2.1\**\*.*" target="build\host\netcoreapp2.1" />
<file src="..\src\Uno.SourceGeneration.Host\bin\Release\net472\**\*.*" target="build\host\net472" />
<file src="..\src\Uno.SourceGeneration.Host\bin\Release\netcoreapp3.0\**\*.*" target="build\host\netcoreapp3.0" />
<file src="..\src\Uno.SourceGeneratorTasks.Dev15.0\Content\Uno.SourceGenerationTasks.targets" target="build\netstandard1.0" />

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

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Cake" version="0.24.0" />
<package id="Cake" version="0.35.0" />
</packages>

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

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>

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

@ -0,0 +1,28 @@
// ******************************************************************
// Copyright <20> 2015-2018 nventive inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ******************************************************************
using Uno.SourceGeneration;
namespace Uno.SampleGenerators
{
public class WithDependencyGenerator : SourceGenerator
{
public override void Execute(SourceGeneratorContext context)
{
context.AddCompilationUnit("with_dependency", $"/* {NodaTime.DateTimeZone.Utc.Id} */");
}
}
}

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

@ -67,6 +67,9 @@
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="NodaTime">
<Version>2.4.7</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.3.0</Version>
</PackageReference>
@ -77,6 +80,7 @@
<Compile Include="GeneratorBaseClass.cs" />
<Compile Include="MyCustomSourceGenerator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="GeneratorWithDependency.cs" />
<Compile Include="UselessGenerator.cs" />
</ItemGroup>
<ItemGroup>

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

@ -25,4 +25,11 @@ namespace Uno.SampleProject
Debug.WriteLine(Test.MyGeneratedType2.Project);
}
}
public class Test
{
public int Value { get; }
public readonly override string ToString() => Value.ToString();
}
}

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

@ -5,6 +5,7 @@
<RootNamespace>Uno.SampleProject</RootNamespace>
<AssemblyName>Uno.SampleProject</AssemblyName>
<UnoDebugGenerationHost>true</UnoDebugGenerationHost>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<ItemGroup>

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

@ -17,7 +17,6 @@
using Microsoft.Build.Framework;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.MSBuild;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;

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

@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Immutable;
using Microsoft.CodeAnalysis.MSBuild;
using Uno.SourceGeneration.Engine.Workspace.Constants;
using MSB = Microsoft.Build;

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

@ -107,7 +107,7 @@ namespace Uno.SourceGeneration.Host
.FirstOrDefault();
}
#if NET461
#if NET472
Assembly appDomainResolve(object s, ResolveEventArgs e)
=> localResolve(new AssemblyName(e.Name));

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

@ -1,4 +1,4 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;
using System;
using System.Diagnostics;

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

@ -30,7 +30,7 @@ namespace Uno.SourceGeneration.Host.Server
options |= PEStreamOptions.PrefetchEntireImage;
}
return ModuleMetadata.CreateFromStream(fileStream, options);
return ModuleMetadata.CreateFromStream(fileStream, options: options);
}
private ImmutableArray<ModuleMetadata> GetAllModules(ModuleMetadata manifestModule, string assemblyDir)

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

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp3.0;net472</TargetFrameworks>
<DefineConstants>$(DefineConstants);HAS_BINLOG;IS_BUILD_HOST</DefineConstants>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
@ -11,7 +11,7 @@
<AppConfig>$(MSBuildThisFileDirectory)app.$(TargetFramework).config</AppConfig>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net461'">
<ItemGroup Condition="'$(TargetFramework)'=='net472'">
<PackageReference Include="ManagedEsent">
<Version>1.9.4</Version>
</PackageReference>
@ -32,38 +32,33 @@
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>2.3.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>2.3.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>2.3.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>2.3.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>2.3.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.RemoteControl">
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.3.1" />
<PackageReference Include="Microsoft.VisualStudio.RemoteControl">
<Version>14.0.262-masterA5CACE98</Version>
</PackageReference>
<PackageReference Include="Mono.Cecil">
<Version>0.9.6.4</Version>
</PackageReference>
<PackageReference Include="System.Reflection.Metadata">
<Version>1.4.2</Version>
</PackageReference>
<PackageReference Include="System.Configuration.ConfigurationManager">
<Version>4.5.0</Version>
</PackageReference>
<PackageReference Include="System.Threading.Tasks.Dataflow">
<Version>4.5.25</Version>
</PackageReference>
<PackageReference Include="System.Collections.Immutable">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.4.0</Version>
</PackageReference>
@ -87,7 +82,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.1'">
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.0'">
<PackageReference Include="System.IO.Pipes.AccessControl" Version="4.3.0" />
<PackageReference Include="Microsoft.Build">
<Version>15.4.8</Version>
@ -106,21 +101,21 @@
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>2.10.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>2.10.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>2.10.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>2.10.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>2.10.0</Version>
<Version>3.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="2.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.3.1" />
<PackageReference Include="Microsoft.DiaSymReader" Version="1.3.0" />
<PackageReference Include="Microsoft.DiaSymReader.Native" Version="1.7.0" />
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.5.0" />
@ -152,7 +147,6 @@
<ItemGroup>
<PackageReference Include="runtime.ubuntu.18.04-x64.runtime.native.System" Version="4.3.1" />
<PackageReference Include="System.Memory" Version="4.5.0" />
<PackageReference Include="System.Security.AccessControl" Version="4.5.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.5.1" />
</ItemGroup>

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

@ -36,23 +36,23 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.3.9.9" newVersion="2.3.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-1.3.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.3.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces.Desktop" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.3.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.3.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.3.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
</assemblyBinding>
<gcServer enabled="true"/>

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

@ -2,25 +2,21 @@
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.3.9.9" newVersion="2.10.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.10.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces.Desktop" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.10.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.10.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="2.10.0.0"/>
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="3.3.0.0"/>
</dependentAssembly>
</assemblyBinding>

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

@ -485,7 +485,7 @@ namespace Uno.SourceGeneration.Host.GenerationClient
}
}
#if NET461
#if NET461 || NET472
internal static bool CheckIdentityUnix(PipeStream stream)
{
// Identity verification is unavailable in the MSBuild task,

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

@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
<DefineConstants>$(DefineConstants);HAS_BINLOG</DefineConstants>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net461'">

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

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

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

@ -175,7 +175,6 @@ Global
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Debug|x86.ActiveCfg = Debug|Any CPU
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Debug|x86.Build.0 = Debug|Any CPU
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Release|Any CPU.Build.0 = Release|Any CPU
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Release|ARM.ActiveCfg = Release|Any CPU
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Release|ARM.Build.0 = Release|Any CPU
{613832ED-7BF4-43BC-B8D3-2ACC4370237F}.Release|x64.ActiveCfg = Release|Any CPU

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

@ -364,7 +364,7 @@ namespace Uno.SourceGeneratorTasks
private string GetHostPath()
{
var currentPath = Path.GetDirectoryName(new Uri(GetType().Assembly.CodeBase).LocalPath);
var hostPlatform = RuntimeHelpers.IsNetCore ? "netcoreapp2.1" : "net461";
var hostPlatform = RuntimeHelpers.IsNetCore ? "netcoreapp3.0" : "net472";
var installedPath = Path.Combine(currentPath, "..", "host", hostPlatform);
#if DEBUG
var configuration = "Debug";

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

@ -79,9 +79,6 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>2.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>2.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>2.3.0</Version>
</PackageReference>

Двоичные данные
src/msbuild.binlog Normal file

Двоичный файл не отображается.