Skip to content

Commit 9644868

Browse files
authored
[Infra] Handle net60 preview. (#108)
* [Infra] Handle net60 preview. * [Build] update nuke to net6.0 * [Build] fix build for macos * [Build] try to fix azure pipelines. * [Build] add net60 in GetTargetFrameworks. * [Build] exclude x86 and net60 test project. * [Build] try to fix azure-pipelines file * [Build] add logs to understand azure pipelines * [Build] add logs. * [Build] install sdk instead runtime for azure pipelines * [Build] try to fix azure pipelines. * [Build] install all sdk * [Build] Move setup just before compilation. * [Build] fix Compile job. * [Build] clean log.
1 parent 92e92c5 commit 9644868

File tree

8 files changed

+91
-19
lines changed

8 files changed

+91
-19
lines changed

.github/workflows/continuous.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
with:
4646
dotnet-version: 5.0.*
4747

48+
- name: Setup .NET 6.0
49+
uses: actions/setup-dotnet@v1
50+
with:
51+
dotnet-version: 6.0.*
52+
include-prerelease: true
53+
4854
- name: Cache .nuke/temp, ~/.nuget/packages
4955
uses: actions/cache@v2
5056
with:

.github/workflows/continuousCore.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
with:
4646
dotnet-version: 5.0.*
4747

48+
- name: Setup .NET 6.0
49+
uses: actions/setup-dotnet@v1
50+
with:
51+
dotnet-version: 6.0.*
52+
include-prerelease: true
53+
4854
- name: Cache .nuke/temp, ~/.nuget/packages
4955
uses: actions/cache@v2
5056
with:
@@ -86,6 +92,12 @@ jobs:
8692
with:
8793
dotnet-version: 5.0.*
8894

95+
- name: Setup .NET 6.0
96+
uses: actions/setup-dotnet@v1
97+
with:
98+
dotnet-version: 6.0.*
99+
include-prerelease: true
100+
89101
- name: Cache .nuke/temp, ~/.nuget/packages
90102
uses: actions/cache@v2
91103
with:

Build/Nuke/NukeBuild.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net5.0</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
<NoWarn>CS0649;CS0169</NoWarn>
77
<CheckEolTargetFramework>false</CheckEolTargetFramework>
88
<NukeRootDirectory>..\..</NukeRootDirectory>

Build/Nuke/ProjectExtensions.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static IReadOnlyCollection<string> GetTargetFrameworks(this Project proje
1111
var frameworks = project.GetTargetFrameworks();
1212
if (!excludeNetFramework)
1313
return frameworks.ToList();
14-
return frameworks.Where(x => x.Contains("standard") || x.Contains("core") || x.Contains("net50")).ToList();
14+
return frameworks.Where(x => x.Contains("standard") || x.Contains("core") || x.Contains("net50") || x.Contains("net60")).ToList();
1515
}
1616

1717
public static IReadOnlyCollection<string> GetPlatforms(this Project project)
@@ -50,7 +50,7 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
5050
if (azurePipelines != null && x.framework.Contains("2.2"))
5151
return false;
5252

53-
//exclude netcore 2.1 and 2.2 in x86 because is not well handle by azure pipelines and github actions on windows
53+
//exclude netcore 2.1, 2.2, 60 in x86 because is not well handle by azure pipelines and github actions on windows
5454
if (x.platform != "x86")
5555
return true;
5656
if (x.framework == null)
@@ -59,6 +59,8 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
5959
return false;
6060
if (x.framework.Contains("2.2"))
6161
return false;
62+
if (x.framework.Contains("60"))
63+
return false;
6264
return true;
6365
});
6466
}
@@ -76,4 +78,4 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
7678
yield return toList.Where(x => !x.project.Name.Contains("StructLinq.Tests"));
7779
}
7880

79-
}
81+
}

azure-pipelines.yml

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,23 @@ stages:
2121
pool:
2222
vmImage: 'windows-latest'
2323
jobs:
24-
- job: Setup
25-
displayName: 'Setup'
26-
dependsOn: [ ]
27-
steps:
28-
- task: UseDotNet@2
29-
displayName: 'Setup .NET Core 2.2'
30-
inputs:
31-
packageType: runtime
32-
version: 2.2.x
33-
performMultiLevelLookup: true
34-
3524
- job: Compile
3625
displayName: '⚙️ Compile'
37-
dependsOn: [ Setup ]
26+
dependsOn: [ ]
3827
steps:
28+
- task: UseDotNet@2
29+
displayName: 'Setup .NET 5.0'
30+
inputs:
31+
packageType: sdk
32+
version: 5.0.x
33+
performMultiLevelLookup: true
34+
- task: UseDotNet@2
35+
displayName: 'Setup .NET 6.0'
36+
inputs:
37+
packageType: sdk
38+
version: 6.0.x
39+
includePreviewVersions: true
40+
performMultiLevelLookup: true
3941
- task: CmdLine@2
4042
inputs:
4143
script: './build.cmd Restore Compile --skip'
@@ -45,6 +47,43 @@ stages:
4547
strategy:
4648
parallel: 3
4749
steps:
50+
- task: UseDotNet@2
51+
displayName: 'Setup .NET Core 2.1'
52+
inputs:
53+
packageType: sdk
54+
version: 2.1.x
55+
performMultiLevelLookup: true
56+
- task: UseDotNet@2
57+
displayName: 'Setup .NET Core 2.2'
58+
inputs:
59+
packageType: sdk
60+
version: 2.2.x
61+
performMultiLevelLookup: true
62+
- task: UseDotNet@2
63+
displayName: 'Setup .NET Core 3.0'
64+
inputs:
65+
packageType: sdk
66+
version: 3.0.x
67+
performMultiLevelLookup: true
68+
- task: UseDotNet@2
69+
displayName: 'Setup .NET Core 3.1'
70+
inputs:
71+
packageType: sdk
72+
version: 3.1.x
73+
performMultiLevelLookup: true
74+
- task: UseDotNet@2
75+
displayName: 'Setup .NET 5.0'
76+
inputs:
77+
packageType: sdk
78+
version: 5.0.x
79+
performMultiLevelLookup: true
80+
- task: UseDotNet@2
81+
displayName: 'Setup .NET 6.0'
82+
inputs:
83+
packageType: sdk
84+
version: 6.0.x
85+
includePreviewVersions: true
86+
performMultiLevelLookup: true
4887
- task: CmdLine@2
4988
inputs:
5089
script: './build.cmd Test --skip --test-partition $(System.JobPositionInPhase)'
@@ -56,6 +95,19 @@ stages:
5695
displayName: '📦 Pack'
5796
dependsOn: [ Compile ]
5897
steps:
98+
- task: UseDotNet@2
99+
displayName: 'Setup .NET 5.0'
100+
inputs:
101+
packageType: sdk
102+
version: 5.0.x
103+
performMultiLevelLookup: true
104+
- task: UseDotNet@2
105+
displayName: 'Setup .NET 6.0'
106+
inputs:
107+
packageType: sdk
108+
version: 6.0.x
109+
includePreviewVersions: true
110+
performMultiLevelLookup: true
59111
- task: CmdLine@2
60112
inputs:
61113
script: './build.cmd Pack --skip'

src/StructLinq.BCL.Tests/StructLinq.BCL.x64.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60</TargetFrameworks>
55
<Platform>x64</Platform>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<Platforms>x64</Platforms>

src/StructLinq.BCL.Tests/StructLinq.BCL.x86.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60</TargetFrameworks>
55
<Platform>x86</Platform>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<Platforms>x86</Platforms>

src/StructLinq/StructLinq.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.1;net452;net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50</TargetFrameworks>
4+
<TargetFrameworks>netstandard1.1;net452;net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup Label="Nuget">

0 commit comments

Comments
 (0)