Browse Source
Merge pull request #9386 from AvaloniaUI/fixes/fix-ci-net-7.0.100
Fixes/fix ci net 7.0.100
pull/9389/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
27 additions and
10 deletions
-
azure-pipelines.yml
-
global.json
-
nukebuild/Build.cs
-
nukebuild/_build.csproj
|
|
@ -35,9 +35,9 @@ jobs: |
|
|
version: 6.0.401 |
|
|
version: 6.0.401 |
|
|
|
|
|
|
|
|
- task: UseDotNet@2 |
|
|
- task: UseDotNet@2 |
|
|
displayName: 'Use .NET Core SDK 7.0.100-rc.2.22477.23' |
|
|
displayName: 'Use .NET Core SDK 7.0' |
|
|
inputs: |
|
|
inputs: |
|
|
version: 7.0.100-rc.2.22477.23 |
|
|
version: 7.0.100 |
|
|
|
|
|
|
|
|
- task: CmdLine@2 |
|
|
- task: CmdLine@2 |
|
|
displayName: 'Install Workloads' |
|
|
displayName: 'Install Workloads' |
|
|
@ -72,9 +72,9 @@ jobs: |
|
|
version: 6.0.401 |
|
|
version: 6.0.401 |
|
|
|
|
|
|
|
|
- task: UseDotNet@2 |
|
|
- task: UseDotNet@2 |
|
|
displayName: 'Use .NET Core SDK 7.0.100-rc.2.22477.23' |
|
|
displayName: 'Use .NET Core SDK 7.0.100' |
|
|
inputs: |
|
|
inputs: |
|
|
version: 7.0.100-rc.2.22477.23 |
|
|
version: 7.0.100 |
|
|
|
|
|
|
|
|
- task: CmdLine@2 |
|
|
- task: CmdLine@2 |
|
|
displayName: 'Install Workloads' |
|
|
displayName: 'Install Workloads' |
|
|
@ -143,9 +143,9 @@ jobs: |
|
|
version: 6.0.401 |
|
|
version: 6.0.401 |
|
|
|
|
|
|
|
|
- task: UseDotNet@2 |
|
|
- task: UseDotNet@2 |
|
|
displayName: 'Use .NET Core SDK 7.0.100-rc.2.22477.23' |
|
|
displayName: 'Use .NET Core SDK 7.0.100' |
|
|
inputs: |
|
|
inputs: |
|
|
version: 7.0.100-rc.2.22477.23 |
|
|
version: 7.0.100 |
|
|
|
|
|
|
|
|
- task: CmdLine@2 |
|
|
- task: CmdLine@2 |
|
|
displayName: 'Install Workloads' |
|
|
displayName: 'Install Workloads' |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
{ |
|
|
{ |
|
|
"sdk": { |
|
|
"sdk": { |
|
|
"version": "7.0.100-rc.2.22477.23", |
|
|
"version": "7.0.100", |
|
|
"rollForward": "latestFeature" |
|
|
"rollForward": "latestFeature" |
|
|
}, |
|
|
}, |
|
|
"msbuild-sdks": { |
|
|
"msbuild-sdks": { |
|
|
|
|
|
@ -145,8 +145,25 @@ partial class Build : NukeBuild |
|
|
{ |
|
|
{ |
|
|
Information($"Running tests from {projectName}"); |
|
|
Information($"Running tests from {projectName}"); |
|
|
var project = Solution.GetProject(projectName).NotNull("project != null"); |
|
|
var project = Solution.GetProject(projectName).NotNull("project != null"); |
|
|
|
|
|
// Nuke and MSBuild tools have build-in helpers to get target frameworks from the project.
|
|
|
|
|
|
// Unfortunately, it gets broken with every second SDK update, so we had to do it manually.
|
|
|
|
|
|
var fileXml = XDocument.Parse(File.ReadAllText(project.Path)); |
|
|
|
|
|
var targetFrameworks = fileXml.Descendants("TargetFrameworks") |
|
|
|
|
|
.FirstOrDefault()?.Value.Split(';').Select(f => f.Trim()); |
|
|
|
|
|
if (targetFrameworks is null) |
|
|
|
|
|
{ |
|
|
|
|
|
var targetFramework = fileXml.Descendants("TargetFramework").FirstOrDefault()?.Value; |
|
|
|
|
|
if (targetFramework is not null) |
|
|
|
|
|
{ |
|
|
|
|
|
targetFrameworks = new[] { targetFramework }; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (targetFrameworks is null) |
|
|
|
|
|
{ |
|
|
|
|
|
throw new InvalidOperationException("No target frameworks were found in the test project"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
foreach (var fw in project.GetTargetFrameworks()) |
|
|
foreach (var fw in targetFrameworks) |
|
|
{ |
|
|
{ |
|
|
if (fw.StartsWith("net4") |
|
|
if (fw.StartsWith("net4") |
|
|
&& RuntimeInformation.IsOSPlatform(OSPlatform.Linux) |
|
|
&& RuntimeInformation.IsOSPlatform(OSPlatform.Linux) |
|
|
|
|
|
@ -16,8 +16,8 @@ |
|
|
<PackageReference Include="MicroCom.CodeGenerator" Version="0.11.0" /> |
|
|
<PackageReference Include="MicroCom.CodeGenerator" Version="0.11.0" /> |
|
|
<!-- Keep in sync with Avalonia.Build.Tasks --> |
|
|
<!-- Keep in sync with Avalonia.Build.Tasks --> |
|
|
<PackageReference Include="Mono.Cecil" Version="0.11.4" /> |
|
|
<PackageReference Include="Mono.Cecil" Version="0.11.4" /> |
|
|
<PackageReference Include="SourceLink" Version="1.1.0" GeneratePathProperty="true" /> |
|
|
<PackageReference Include="SourceLink" Version="1.1.0" GeneratePathProperty="true" /> |
|
|
<PackageReference Include="Microsoft.Build.Framework" Version="17.3.1" PrivateAssets="All" /> |
|
|
<PackageReference Include="Microsoft.Build.Framework" Version="17.3.2" PrivateAssets="All" /> |
|
|
<PackageReference Include="xunit.runner.console" Version="2.4.2"> |
|
|
<PackageReference Include="xunit.runner.console" Version="2.4.2"> |
|
|
<PrivateAssets>all</PrivateAssets> |
|
|
<PrivateAssets>all</PrivateAssets> |
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
|
|
|