Skip to content

Commit 49c0703

Browse files
authored
Drop support for .NETCore3.1 in Tests and samples (#6529)
* Drop support for `.NETCore3.1` in Tests and samples * changes on `azure-pipeline` yaml * changes build.fsx * fixes
1 parent 3d7c0e1 commit 49c0703

File tree

69 files changed

+88
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+88
-233
lines changed

build-system/azure-pipeline.mntr-template.yaml

-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ jobs:
2020
displayName: 'Use .NET 7 SDK 7.0.100'
2121
inputs:
2222
version: 7.0.100
23-
- task: UseDotNet@2
24-
displayName: 'Use .NET Core Runtime 3.1.10'
25-
inputs:
26-
packageType: runtime
27-
version: 3.1.10
2823
- task: Bash@3
2924
displayName: Linux / OSX Build
3025
inputs:

build-system/azure-pipeline.template.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ jobs:
2727
displayName: 'Use .NET 7 SDK 7.0.100'
2828
inputs:
2929
version: 7.0.100
30-
- task: UseDotNet@2 # to keep DocFx happy
31-
displayName: "Use .NET 6 SDK 6.0.100"
32-
inputs:
33-
version: 6.0.100
34-
- task: UseDotNet@2
35-
displayName: 'Use .NET Core Runtime 3.1.10'
36-
inputs:
37-
packageType: runtime
38-
version: 3.1.10
3930
- task: Bash@3
4031
displayName: Linux / OSX Build
4132
inputs:

build-system/nightly-builds.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
33

44
pool:
5-
vmImage: windows-2019
5+
vmImage: windows-latest
66
demands: Cmd
77

88
trigger: none
@@ -23,15 +23,6 @@ steps:
2323
displayName: 'Use .NET 7 SDK 7.0.100'
2424
inputs:
2525
version: 7.0.100
26-
- task: UseDotNet@2
27-
displayName: 'Use .NET 5 SDK 6.0.100'
28-
inputs:
29-
version: 6.0.100
30-
- task: UseDotNet@2
31-
displayName: 'Use .NET Core Runtime 3.1.10'
32-
inputs:
33-
packageType: runtime
34-
version: 3.1.10
3526
- task: BatchScript@1
3627
displayName: 'FAKE Build'
3728
inputs:

build-system/pr-validation.yaml

+17-54
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- job: DocsSpellcheck
2020
displayName: "Docs: Spellcheck"
2121
pool:
22-
vmImage: ubuntu-20.04
22+
vmImage: ubuntu-latest
2323
steps:
2424
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
2525
clean: false # whether to fetch clean each time
@@ -55,7 +55,7 @@ jobs:
5555
- job: WindowsBuild
5656
displayName: Windows Build
5757
pool:
58-
vmImage: windows-2019
58+
vmImage: windows-latest
5959
demands: Cmd
6060
steps:
6161
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
@@ -66,11 +66,6 @@ jobs:
6666
displayName: "Use .NET 7 SDK 7.0.100"
6767
inputs:
6868
version: 7.0.100
69-
- task: UseDotNet@2
70-
displayName: "Use .NET Core Runtime 3.1.10"
71-
inputs:
72-
packageType: runtime
73-
version: 3.1.10
7469
- task: BatchScript@1
7570
displayName: Windows Build
7671
inputs:
@@ -98,37 +93,17 @@ jobs:
9893
parameters:
9994
name: "netfx_tests_windows"
10095
displayName: ".NET Framework Unit Tests (Windows)"
101-
vmImage: "windows-2019"
96+
vmImage: "windows-latest"
10297
scriptFileName: build.cmd
10398
scriptArgs: runTests incremental
10499
outputDirectory: "TestResults"
105100
artifactName: "netfx_tests_windows-$(Build.BuildId)"
106101

107-
- template: azure-pipeline.template.yaml
108-
parameters:
109-
name: "net_core_tests_windows"
110-
displayName: ".NET Core Unit Tests (Windows)"
111-
vmImage: "windows-2019"
112-
scriptFileName: build.cmd
113-
scriptArgs: runTestsNetCore incremental
114-
outputDirectory: "TestResults"
115-
artifactName: "net_core_tests_windows-$(Build.BuildId)"
116-
117-
- template: azure-pipeline.template.yaml
118-
parameters:
119-
name: "net_core_tests_linux"
120-
displayName: ".NET Core Unit Tests (Linux)"
121-
vmImage: "ubuntu-latest"
122-
scriptFileName: "./build.sh"
123-
scriptArgs: runTestsNetCore incremental
124-
outputDirectory: "TestResults"
125-
artifactName: "net_core_tests_linux-$(Build.BuildId)"
126-
127102
- template: azure-pipeline.template.yaml
128103
parameters:
129104
name: "docfx_test"
130105
displayName: "DocFX warning check"
131-
vmImage: "windows-2019"
106+
vmImage: "windows-latest"
132107
scriptFileName: build.cmd
133108
scriptArgs: docfx
134109
outputDirectory: "TestResults"
@@ -137,53 +112,41 @@ jobs:
137112

138113
- template: azure-pipeline.template.yaml
139114
parameters:
140-
name: "net_6_tests_windows"
141-
displayName: ".NET 6 Unit Tests (Windows)"
142-
vmImage: "windows-2019"
115+
name: "net_7_tests_windows"
116+
displayName: ".NET 7 Unit Tests (Windows)"
117+
vmImage: "windows-latest"
143118
scriptFileName: build.cmd
144119
scriptArgs: runTestsNet incremental
145120
outputDirectory: "TestResults"
146-
artifactName: "net_6_tests_windows-$(Build.BuildId)"
121+
artifactName: "net_7_tests_windows-$(Build.BuildId)"
147122

148123
- template: azure-pipeline.template.yaml
149124
parameters:
150-
name: "net_6_tests_linux"
151-
displayName: ".NET 6 Unit Tests (Linux)"
125+
name: "net_7_tests_linux"
126+
displayName: ".NET 7 Unit Tests (Linux)"
152127
vmImage: "ubuntu-latest"
153128
scriptFileName: "./build.sh"
154129
scriptArgs: runTestsNet incremental
155130
outputDirectory: "TestResults"
156-
artifactName: "net_6_tests_linux-$(Build.BuildId)"
157-
158-
- template: azure-pipeline.mntr-template.yaml
159-
parameters:
160-
name: "net_core_mntr_windows"
161-
displayName: ".NET Core Multi-Node Tests (Windows)"
162-
vmImage: "windows-2019"
163-
scriptFileName: "build.cmd"
164-
scriptArgs: MultiNodeTestsNetCore incremental
165-
outputDirectory: "TestResults"
166-
artifactName: "net_core_mntr_windows-$(Build.BuildId)"
167-
mntrFailuresDir: 'TestResults\\multinode'
168-
mntrFailuresArtifactName: "net_core_mntr_FAILED_windows-$(Build.BuildId)"
131+
artifactName: "net_7_tests_linux-$(Build.BuildId)"
169132

170133
- template: azure-pipeline.mntr-template.yaml
171134
parameters:
172-
name: "net_6_mntr_windows"
173-
displayName: ".NET 6 Multi-Node Tests (Windows)"
174-
vmImage: "windows-2019"
135+
name: "net_7_mntr_windows"
136+
displayName: ".NET 7 Multi-Node Tests (Windows)"
137+
vmImage: "windows-latest"
175138
scriptFileName: "build.cmd"
176139
scriptArgs: MultiNodeTestsNet incremental
177140
outputDirectory: "TestResults"
178-
artifactName: "net_6_mntr_windows-$(Build.BuildId)"
141+
artifactName: "net_7_mntr_windows-$(Build.BuildId)"
179142
mntrFailuresDir: 'TestResults\\multinode'
180-
mntrFailuresArtifactName: "net_6_mntr_FAILED_windows-$(Build.BuildId)"
143+
mntrFailuresArtifactName: "net_7_mntr_FAILED_windows-$(Build.BuildId)"
181144

182145
- template: azure-pipeline.template.yaml
183146
parameters:
184147
name: "nuget_pack"
185148
displayName: "NuGet Pack"
186-
vmImage: "windows-2019"
149+
vmImage: "windows-latest"
187150
scriptFileName: build.cmd
188151
scriptArgs: CreateNuget nugetprerelease=dev incremental
189152
outputDirectory: "bin/nuget"

build-system/windows-release.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
33

44
pool:
5-
vmImage: windows-2019
5+
vmImage: windows-latest
66
demands: Cmd
77

88
trigger:
@@ -26,15 +26,6 @@ steps:
2626
displayName: 'Use .NET 7 SDK 7.0.100'
2727
inputs:
2828
version: 7.0.100
29-
- task: UseDotNet@2
30-
displayName: 'Use .NET 6 SDK 6.0.100'
31-
inputs:
32-
version: 6.0.100
33-
- task: UseDotNet@2
34-
displayName: 'Use .NET Core Runtime 3.1.10'
35-
inputs:
36-
packageType: runtime
37-
version: 3.1.10
3829
- task: BatchScript@1
3930
displayName: 'FAKE Build'
4031
inputs:

build.fsx

-76
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ let incrementalistReport = output @@ "incrementalist.txt"
5656

5757
// Configuration values for tests
5858
let testNetFrameworkVersion = "net471"
59-
let testNetCoreVersion = "netcoreapp3.1"
6059
let testNetVersion = "net7.0"
6160

6261
Target "Clean" (fun _ ->
@@ -202,13 +201,11 @@ Target "Build" (fun _ ->
202201
// Tests targets
203202
//--------------------------------------------------------------------------------
204203
type Runtime =
205-
| NetCore
206204
| Net
207205
| NetFramework
208206

209207
let getTestAssembly runtime project =
210208
let assemblyPath = match runtime with
211-
| NetCore -> !! ("src" @@ "**" @@ "bin" @@ "Release" @@ testNetCoreVersion @@ fileNameWithoutExt project + ".dll")
212209
| NetFramework -> !! ("src" @@ "**" @@ "bin" @@ "Release" @@ testNetFrameworkVersion @@ fileNameWithoutExt project + ".dll")
213210
| Net -> !! ("src" @@ "**" @@ "bin" @@ "Release" @@ testNetVersion @@ fileNameWithoutExt project + ".dll")
214211

@@ -264,35 +261,6 @@ Target "RunTests" (fun _ ->
264261
projects |> Seq.iter (runSingleProject)
265262
)
266263

267-
Target "RunTestsNetCore" (fun _ ->
268-
if not skipBuild.Value then
269-
let projects =
270-
let rawProjects = match (isWindows) with
271-
| true -> !! "./src/**/*.Tests.*sproj"
272-
++ "./src/**/Akka.Streams.Tests.TCK.csproj"
273-
-- "./src/**/*.Tests.MultiNode.csproj"
274-
-- "./src/examples/**"
275-
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here
276-
-- "./src/**/*.Tests.MultiNode.csproj"
277-
-- "./src/examples/**"
278-
rawProjects |> Seq.choose filterProjects
279-
280-
let runSingleProject project =
281-
let arguments =
282-
match (hasTeamCity) with
283-
| true -> (sprintf "test -c Release --blame-crash --blame-hang-timeout 30s --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetCoreVersion outputTests)
284-
| false -> (sprintf "test -c Release --blame-crash --blame-hang-timeout 30s --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputTests)
285-
286-
let result = ExecProcess(fun info ->
287-
info.FileName <- "dotnet"
288-
info.WorkingDirectory <- (Directory.GetParent project).FullName
289-
info.Arguments <- arguments) (TimeSpan.FromMinutes 30.0)
290-
291-
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
292-
293-
CreateDir outputTests
294-
projects |> Seq.iter (runSingleProject)
295-
)
296264

297265
Target "RunTestsNet" (fun _ ->
298266
if not skipBuild.Value then
@@ -324,45 +292,6 @@ Target "RunTestsNet" (fun _ ->
324292
projects |> Seq.iter (runSingleProject)
325293
)
326294

327-
Target "MultiNodeTestsNetCore" (fun _ ->
328-
if not skipBuild.Value then
329-
setEnvironVar "AKKA_CLUSTER_ASSERT" "on" // needed to enable assert invariants for Akka.Cluster
330-
331-
let projects =
332-
let rawProjects = match (isWindows) with
333-
| true -> !! "./src/**/*.Tests.MultiNode.csproj"
334-
| _ -> !! "./src/**/*.Tests.MultiNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
335-
rawProjects |> Seq.choose filterProjects
336-
337-
let projectDlls = projects |> Seq.map ( fun project ->
338-
let assemblyName = fileNameWithoutExt project
339-
(directory project) @@ "bin" @@ "Release" @@ testNetCoreVersion @@ assemblyName + ".dll"
340-
)
341-
342-
let runSingleProject projectDll =
343-
let arguments =
344-
match (hasTeamCity) with
345-
| true -> (sprintf "test \"%s\" -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\" -- -teamcity" projectDll testNetCoreVersion outputMultiNode)
346-
| false -> (sprintf "test \"%s\" -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\"" projectDll testNetCoreVersion outputMultiNode)
347-
348-
let resultPath = (directory projectDll)
349-
File.WriteAllText(
350-
(resultPath @@ "xunit.multinode.runner.json"),
351-
(sprintf "{\"outputDirectory\":\"%s\", \"useBuiltInTrxReporter\":true}" outputMultiNode).Replace("\\", "\\\\"))
352-
353-
let result = ExecProcess(fun info ->
354-
info.FileName <- "dotnet"
355-
info.WorkingDirectory <- outputMultiNode
356-
info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)
357-
358-
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
359-
360-
CreateDir outputMultiNode
361-
projectDlls |> Seq.iter ( fun projectDll ->
362-
runSingleProject projectDll
363-
)
364-
)
365-
366295
Target "MultiNodeTestsNet" (fun _ ->
367296
if not skipBuild.Value then
368297
setEnvironVar "AKKA_CLUSTER_ASSERT" "on" // needed to enable assert invariants for Akka.Cluster
@@ -641,7 +570,6 @@ Target "BuildRelease" DoNothing
641570
Target "All" DoNothing
642571
Target "Nuget" DoNothing
643572
Target "RunTestsFull" DoNothing
644-
Target "RunTestsNetCoreFull" DoNothing
645573

646574
// build dependencies
647575
"Clean" ==> "AssemblyInfo" ==> "Build"
@@ -650,11 +578,9 @@ Target "RunTestsNetCoreFull" DoNothing
650578

651579
// tests dependencies
652580
"Build" ==> "RunTests"
653-
"Build" ==> "RunTestsNetCore"
654581
"Build" ==> "RunTestsNet"
655582
"Build" ==> "NBench"
656583

657-
"BuildRelease" ==> "MultiNodeTestsNetCore"
658584
"BuildRelease" ==> "MultiNodeTestsNet"
659585

660586
// nuget dependencies
@@ -666,9 +592,7 @@ Target "RunTestsNetCoreFull" DoNothing
666592
// all
667593
"BuildRelease" ==> "All"
668594
"RunTests" ==> "All"
669-
"RunTestsNetCore" ==> "All"
670595
"RunTestsNet" ==> "All"
671-
"MultiNodeTestsNetCore" ==> "All"
672596
"MultiNodeTestsNet" ==> "All"
673597
"NBench" ==> "All"
674598

src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="..\..\common.props" />
44
<PropertyGroup>
55
<OutputType>Exe</OutputType>
6-
<TargetFrameworks>$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
6+
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
77
</PropertyGroup>
88

99
<ItemGroup>

src/benchmark/Akka.Cluster.Benchmarks/Akka.Cluster.Benchmarks.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\common.props" />
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
5+
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

src/benchmark/Akka.Cluster.Cpu.Benchmark/Akka.Cluster.Cpu.Benchmark.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

src/benchmark/PingPong/PingPong.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\common.props" />
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
5+
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
66
<ServerGarbageCollection>true</ServerGarbageCollection>
77
</PropertyGroup>
88

src/benchmark/RemotePingPong/RemotePingPong.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyTitle>RemotePingPong</AssemblyTitle>
77
<AssemblyName>RemotePingPong</AssemblyName>
88
<Authors>Akka.NET Team</Authors>
9-
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
9+
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
1010
<OutputType>Exe</OutputType>
1111
</PropertyGroup>
1212

0 commit comments

Comments
 (0)