Skip to content

Commit a653ca3

Browse files
authored
[Infra] Add Net70 (#167)
* [Infra] Remove preview versions in yaml. * [Infra] Target win 2019 * [Infra] Use update setup-dotnet from v1 to v3 * [Infra] fix continuous yaml. * [Infra] Exclude net50 in x86 because it was remove from windows image. * [Infra] add net70 * [Infra] Add unsaved file.
1 parent 5884765 commit a653ca3

File tree

8 files changed

+67
-88
lines changed

8 files changed

+67
-88
lines changed

.github/workflows/continuous.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,16 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v1
2727

28-
- name: Setup .NET 2.2
29-
uses: actions/setup-dotnet@v1
30-
with:
31-
dotnet-version: 2.2.*
32-
33-
- name: Setup .NET 3.0
34-
uses: actions/setup-dotnet@v1
35-
with:
36-
dotnet-version: 3.0.*
37-
38-
- name: Setup .NET 3.1
39-
uses: actions/setup-dotnet@v1
40-
with:
41-
dotnet-version: 3.1.*
42-
43-
- name: Setup .NET 5.0
44-
uses: actions/setup-dotnet@v1
45-
with:
46-
dotnet-version: 5.0.*
47-
48-
- name: Setup .NET 6.0
49-
uses: actions/setup-dotnet@v1
50-
with:
51-
dotnet-version: 6.0.*
52-
include-prerelease: true
28+
- name: Setup .NET version
29+
uses: actions/setup-dotnet@v3
30+
with:
31+
dotnet-version: |
32+
2.2.*
33+
3.0.*
34+
3.1.*
35+
5.0.*
36+
6.0.*
37+
7.0.*
5338
5439
- name: Cache .nuke/temp, ~/.nuget/packages
5540
uses: actions/cache@v2

.github/workflows/continuousCore.yml

Lines changed: 19 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,16 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v1
2727

28-
- name: Setup .NET 2.2
29-
uses: actions/setup-dotnet@v1
28+
- name: Setup .NET version
29+
uses: actions/setup-dotnet@v3
3030
with:
31-
dotnet-version: 2.2.*
32-
33-
- name: Setup .NET 3.0
34-
uses: actions/setup-dotnet@v1
35-
with:
36-
dotnet-version: 3.0.*
37-
38-
- name: Setup .NET 3.1
39-
uses: actions/setup-dotnet@v1
40-
with:
41-
dotnet-version: 3.1.*
42-
43-
- name: Setup .NET 5.0
44-
uses: actions/setup-dotnet@v1
45-
with:
46-
dotnet-version: 5.0.*
47-
48-
- name: Setup .NET 6.0
49-
uses: actions/setup-dotnet@v1
50-
with:
51-
dotnet-version: 6.0.*
52-
include-prerelease: true
31+
dotnet-version: |
32+
2.2.*
33+
3.0.*
34+
3.1.*
35+
5.0.*
36+
6.0.*
37+
7.0.*
5338
5439
- name: Cache .nuke/temp, ~/.nuget/packages
5540
uses: actions/cache@v2
@@ -68,35 +53,20 @@ jobs:
6853
path: .result/test-results
6954
macOS-latest:
7055
name: macOS-latest
71-
runs-on: macOS-latest
56+
runs-on: macos-latest
7257
steps:
7358
- uses: actions/checkout@v1
7459

75-
- name: Setup .NET 2.2
76-
uses: actions/setup-dotnet@v1
77-
with:
78-
dotnet-version: 2.2.*
79-
80-
- name: Setup .NET 3.0
81-
uses: actions/setup-dotnet@v1
82-
with:
83-
dotnet-version: 3.0.*
84-
85-
- name: Setup .NET 3.1
86-
uses: actions/setup-dotnet@v1
87-
with:
88-
dotnet-version: 3.1.*
89-
90-
- name: Setup .NET 5.0
91-
uses: actions/setup-dotnet@v1
92-
with:
93-
dotnet-version: 5.0.*
94-
95-
- name: Setup .NET 6.0
96-
uses: actions/setup-dotnet@v1
60+
- name: Setup .NET version
61+
uses: actions/setup-dotnet@v3
9762
with:
98-
dotnet-version: 6.0.*
99-
include-prerelease: true
63+
dotnet-version: |
64+
2.2.*
65+
3.0.*
66+
3.1.*
67+
5.0.*
68+
6.0.*
69+
7.0.*
10070
10171
- name: Cache .nuke/temp, ~/.nuget/packages
10272
uses: actions/cache@v2

Build/Nuke/ProjectExtensions.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ 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") || x.Contains("net60")).ToList();
14+
return frameworks.Where(x =>
15+
x.Contains("standard") ||
16+
x.Contains("core") ||
17+
x.Contains("net50") ||
18+
x.Contains("net60") ||
19+
x.Contains("net70")
20+
).ToList();
1521
}
1622

1723
public static IReadOnlyCollection<string> GetPlatforms(this Project project)
@@ -50,7 +56,7 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
5056
if (azurePipelines != null && x.framework.Contains("2.2"))
5157
return false;
5258

53-
//exclude netcore 2.1, 2.2, 6.0 in x86 because is not well handle by azure pipelines and github actions on windows
59+
//exclude netcore 2.1, 2.2, 5.0, 7.0 in x86 because is not well handle by azure pipelines and github actions on windows
5460
if (x.platform != "x86")
5561
return true;
5662
if (x.framework == null)
@@ -59,7 +65,9 @@ public static IReadOnlyCollection<string> GetPlatformsForTests(this Project proj
5965
return false;
6066
if (x.framework.Contains("2.2"))
6167
return false;
62-
if (x.framework.Contains("60"))
68+
if (x.framework.Contains("50"))
69+
return false;
70+
if (x.framework.Contains("70"))
6371
return false;
6472
return true;
6573
});

azure-pipelines.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
# ------------------------------------------------------------------------------
1616

1717
stages:
18-
- stage: windows_latest
19-
displayName: 'windows-latest'
18+
- stage: windows_2019
19+
displayName: 'windows-2019'
2020
dependsOn: [ ]
2121
pool:
22-
vmImage: 'windows-latest'
22+
vmImage: 'windows-2019'
2323
jobs:
2424
- job: Compile
2525
displayName: '⚙️ Compile'
@@ -36,7 +36,12 @@ stages:
3636
inputs:
3737
packageType: sdk
3838
version: 6.0.x
39-
includePreviewVersions: true
39+
performMultiLevelLookup: true
40+
- task: UseDotNet@2
41+
displayName: 'Setup .NET 7.0'
42+
inputs:
43+
packageType: sdk
44+
version: 7.0.x
4045
performMultiLevelLookup: true
4146
- task: CmdLine@2
4247
inputs:
@@ -82,7 +87,12 @@ stages:
8287
inputs:
8388
packageType: sdk
8489
version: 6.0.x
85-
includePreviewVersions: true
90+
performMultiLevelLookup: true
91+
- task: UseDotNet@2
92+
displayName: 'Setup .NET 7.0'
93+
inputs:
94+
packageType: sdk
95+
version: 7.0.x
8696
performMultiLevelLookup: true
8797
- task: CmdLine@2
8898
inputs:
@@ -106,7 +116,12 @@ stages:
106116
inputs:
107117
packageType: sdk
108118
version: 6.0.x
109-
includePreviewVersions: true
119+
performMultiLevelLookup: true
120+
- task: UseDotNet@2
121+
displayName: 'Setup .NET 7.0'
122+
inputs:
123+
packageType: sdk
124+
version: 7.0.x
110125
performMultiLevelLookup: true
111126
- task: CmdLine@2
112127
inputs:

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- common tests properties -->
88
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
99
<IsPackable>False</IsPackable>
10-
<DefaultTargetFrameworks>net60;net50;net48</DefaultTargetFrameworks>
10+
<DefaultTargetFrameworks>net70;net60;net48</DefaultTargetFrameworks>
1111
</PropertyGroup>
1212

1313
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Tests'))">
@@ -26,7 +26,7 @@
2626
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Benchmark'))">
2727
<IsPackable>False</IsPackable>
2828
<OutputType>Exe</OutputType>
29-
<DefaultTargetFrameworks>net50;net48;net60</DefaultTargetFrameworks>
29+
<DefaultTargetFrameworks>net70;net60;net48</DefaultTargetFrameworks>
3030
</PropertyGroup>
3131

3232
<ItemGroup Condition="$(MSBuildProjectName.EndsWith('Benchmark'))">

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;net60</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60;net70</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;net60</TargetFrameworks>
4+
<TargetFrameworks>net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60;net70</TargetFrameworks>
55
<Platform>x86</Platform>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<Platforms>x86</Platforms>

src/StructLinq/StructLinq.csproj

Lines changed: 2 additions & 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;net60</TargetFrameworks>
4+
<TargetFrameworks>netstandard1.1;net452;net472;net48;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net50;net60;net70</TargetFrameworks>
55
<OldVersion>True</OldVersion>
66
<OldVersion Condition="'$(TargetFramework)' == 'netstandard1.1' Or '$(TargetFramework)' == 'net452'">true</OldVersion>
77
</PropertyGroup>
@@ -144,3 +144,4 @@
144144
</ItemGroup>
145145

146146
</Project>
147+

0 commit comments

Comments
 (0)