Skip to content

Commit

Permalink
Drop support for .NETCore3.1 in Tests and samples (#6529)
Browse files Browse the repository at this point in the history
* Drop support for `.NETCore3.1` in Tests and samples

* changes on `azure-pipeline` yaml

* changes build.fsx

* fixes
  • Loading branch information
eaba authored Mar 17, 2023
1 parent 3d7c0e1 commit 49c0703
Show file tree
Hide file tree
Showing 69 changed files with 88 additions and 233 deletions.
5 changes: 0 additions & 5 deletions build-system/azure-pipeline.mntr-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ jobs:
displayName: 'Use .NET 7 SDK 7.0.100'
inputs:
version: 7.0.100
- task: UseDotNet@2
displayName: 'Use .NET Core Runtime 3.1.10'
inputs:
packageType: runtime
version: 3.1.10
- task: Bash@3
displayName: Linux / OSX Build
inputs:
Expand Down
9 changes: 0 additions & 9 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ jobs:
displayName: 'Use .NET 7 SDK 7.0.100'
inputs:
version: 7.0.100
- task: UseDotNet@2 # to keep DocFx happy
displayName: "Use .NET 6 SDK 6.0.100"
inputs:
version: 6.0.100
- task: UseDotNet@2
displayName: 'Use .NET Core Runtime 3.1.10'
inputs:
packageType: runtime
version: 3.1.10
- task: Bash@3
displayName: Linux / OSX Build
inputs:
Expand Down
11 changes: 1 addition & 10 deletions build-system/nightly-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference

pool:
vmImage: windows-2019
vmImage: windows-latest
demands: Cmd

trigger: none
Expand All @@ -23,15 +23,6 @@ steps:
displayName: 'Use .NET 7 SDK 7.0.100'
inputs:
version: 7.0.100
- task: UseDotNet@2
displayName: 'Use .NET 5 SDK 6.0.100'
inputs:
version: 6.0.100
- task: UseDotNet@2
displayName: 'Use .NET Core Runtime 3.1.10'
inputs:
packageType: runtime
version: 3.1.10
- task: BatchScript@1
displayName: 'FAKE Build'
inputs:
Expand Down
71 changes: 17 additions & 54 deletions build-system/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- job: DocsSpellcheck
displayName: "Docs: Spellcheck"
pool:
vmImage: ubuntu-20.04
vmImage: ubuntu-latest
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: false # whether to fetch clean each time
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- job: WindowsBuild
displayName: Windows Build
pool:
vmImage: windows-2019
vmImage: windows-latest
demands: Cmd
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
Expand All @@ -66,11 +66,6 @@ jobs:
displayName: "Use .NET 7 SDK 7.0.100"
inputs:
version: 7.0.100
- task: UseDotNet@2
displayName: "Use .NET Core Runtime 3.1.10"
inputs:
packageType: runtime
version: 3.1.10
- task: BatchScript@1
displayName: Windows Build
inputs:
Expand Down Expand Up @@ -98,37 +93,17 @@ jobs:
parameters:
name: "netfx_tests_windows"
displayName: ".NET Framework Unit Tests (Windows)"
vmImage: "windows-2019"
vmImage: "windows-latest"
scriptFileName: build.cmd
scriptArgs: runTests incremental
outputDirectory: "TestResults"
artifactName: "netfx_tests_windows-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "net_core_tests_windows"
displayName: ".NET Core Unit Tests (Windows)"
vmImage: "windows-2019"
scriptFileName: build.cmd
scriptArgs: runTestsNetCore incremental
outputDirectory: "TestResults"
artifactName: "net_core_tests_windows-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "net_core_tests_linux"
displayName: ".NET Core Unit Tests (Linux)"
vmImage: "ubuntu-latest"
scriptFileName: "./build.sh"
scriptArgs: runTestsNetCore incremental
outputDirectory: "TestResults"
artifactName: "net_core_tests_linux-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "docfx_test"
displayName: "DocFX warning check"
vmImage: "windows-2019"
vmImage: "windows-latest"
scriptFileName: build.cmd
scriptArgs: docfx
outputDirectory: "TestResults"
Expand All @@ -137,53 +112,41 @@ jobs:

- template: azure-pipeline.template.yaml
parameters:
name: "net_6_tests_windows"
displayName: ".NET 6 Unit Tests (Windows)"
vmImage: "windows-2019"
name: "net_7_tests_windows"
displayName: ".NET 7 Unit Tests (Windows)"
vmImage: "windows-latest"
scriptFileName: build.cmd
scriptArgs: runTestsNet incremental
outputDirectory: "TestResults"
artifactName: "net_6_tests_windows-$(Build.BuildId)"
artifactName: "net_7_tests_windows-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "net_6_tests_linux"
displayName: ".NET 6 Unit Tests (Linux)"
name: "net_7_tests_linux"
displayName: ".NET 7 Unit Tests (Linux)"
vmImage: "ubuntu-latest"
scriptFileName: "./build.sh"
scriptArgs: runTestsNet incremental
outputDirectory: "TestResults"
artifactName: "net_6_tests_linux-$(Build.BuildId)"

- template: azure-pipeline.mntr-template.yaml
parameters:
name: "net_core_mntr_windows"
displayName: ".NET Core Multi-Node Tests (Windows)"
vmImage: "windows-2019"
scriptFileName: "build.cmd"
scriptArgs: MultiNodeTestsNetCore incremental
outputDirectory: "TestResults"
artifactName: "net_core_mntr_windows-$(Build.BuildId)"
mntrFailuresDir: 'TestResults\\multinode'
mntrFailuresArtifactName: "net_core_mntr_FAILED_windows-$(Build.BuildId)"
artifactName: "net_7_tests_linux-$(Build.BuildId)"

- template: azure-pipeline.mntr-template.yaml
parameters:
name: "net_6_mntr_windows"
displayName: ".NET 6 Multi-Node Tests (Windows)"
vmImage: "windows-2019"
name: "net_7_mntr_windows"
displayName: ".NET 7 Multi-Node Tests (Windows)"
vmImage: "windows-latest"
scriptFileName: "build.cmd"
scriptArgs: MultiNodeTestsNet incremental
outputDirectory: "TestResults"
artifactName: "net_6_mntr_windows-$(Build.BuildId)"
artifactName: "net_7_mntr_windows-$(Build.BuildId)"
mntrFailuresDir: 'TestResults\\multinode'
mntrFailuresArtifactName: "net_6_mntr_FAILED_windows-$(Build.BuildId)"
mntrFailuresArtifactName: "net_7_mntr_FAILED_windows-$(Build.BuildId)"

- template: azure-pipeline.template.yaml
parameters:
name: "nuget_pack"
displayName: "NuGet Pack"
vmImage: "windows-2019"
vmImage: "windows-latest"
scriptFileName: build.cmd
scriptArgs: CreateNuget nugetprerelease=dev incremental
outputDirectory: "bin/nuget"
Expand Down
11 changes: 1 addition & 10 deletions build-system/windows-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference

pool:
vmImage: windows-2019
vmImage: windows-latest
demands: Cmd

trigger:
Expand All @@ -26,15 +26,6 @@ steps:
displayName: 'Use .NET 7 SDK 7.0.100'
inputs:
version: 7.0.100
- task: UseDotNet@2
displayName: 'Use .NET 6 SDK 6.0.100'
inputs:
version: 6.0.100
- task: UseDotNet@2
displayName: 'Use .NET Core Runtime 3.1.10'
inputs:
packageType: runtime
version: 3.1.10
- task: BatchScript@1
displayName: 'FAKE Build'
inputs:
Expand Down
76 changes: 0 additions & 76 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ let incrementalistReport = output @@ "incrementalist.txt"

// Configuration values for tests
let testNetFrameworkVersion = "net471"
let testNetCoreVersion = "netcoreapp3.1"
let testNetVersion = "net7.0"

Target "Clean" (fun _ ->
Expand Down Expand Up @@ -202,13 +201,11 @@ Target "Build" (fun _ ->
// Tests targets
//--------------------------------------------------------------------------------
type Runtime =
| NetCore
| Net
| NetFramework

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

Expand Down Expand Up @@ -264,35 +261,6 @@ Target "RunTests" (fun _ ->
projects |> Seq.iter (runSingleProject)
)

Target "RunTestsNetCore" (fun _ ->
if not skipBuild.Value then
let projects =
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.*sproj"
++ "./src/**/Akka.Streams.Tests.TCK.csproj"
-- "./src/**/*.Tests.MultiNode.csproj"
-- "./src/examples/**"
| _ -> !! "./src/**/*.Tests.*sproj" // if you need to filter specs for Linux vs. Windows, do it here
-- "./src/**/*.Tests.MultiNode.csproj"
-- "./src/examples/**"
rawProjects |> Seq.choose filterProjects

let runSingleProject project =
let arguments =
match (hasTeamCity) with
| 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)
| 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)

let result = ExecProcess(fun info ->
info.FileName <- "dotnet"
info.WorkingDirectory <- (Directory.GetParent project).FullName
info.Arguments <- arguments) (TimeSpan.FromMinutes 30.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

CreateDir outputTests
projects |> Seq.iter (runSingleProject)
)

Target "RunTestsNet" (fun _ ->
if not skipBuild.Value then
Expand Down Expand Up @@ -324,45 +292,6 @@ Target "RunTestsNet" (fun _ ->
projects |> Seq.iter (runSingleProject)
)

Target "MultiNodeTestsNetCore" (fun _ ->
if not skipBuild.Value then
setEnvironVar "AKKA_CLUSTER_ASSERT" "on" // needed to enable assert invariants for Akka.Cluster

let projects =
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.MultiNode.csproj"
| _ -> !! "./src/**/*.Tests.MultiNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
rawProjects |> Seq.choose filterProjects

let projectDlls = projects |> Seq.map ( fun project ->
let assemblyName = fileNameWithoutExt project
(directory project) @@ "bin" @@ "Release" @@ testNetCoreVersion @@ assemblyName + ".dll"
)

let runSingleProject projectDll =
let arguments =
match (hasTeamCity) with
| true -> (sprintf "test \"%s\" -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\" -- -teamcity" projectDll testNetCoreVersion outputMultiNode)
| false -> (sprintf "test \"%s\" -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\"" projectDll testNetCoreVersion outputMultiNode)

let resultPath = (directory projectDll)
File.WriteAllText(
(resultPath @@ "xunit.multinode.runner.json"),
(sprintf "{\"outputDirectory\":\"%s\", \"useBuiltInTrxReporter\":true}" outputMultiNode).Replace("\\", "\\\\"))

let result = ExecProcess(fun info ->
info.FileName <- "dotnet"
info.WorkingDirectory <- outputMultiNode
info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

CreateDir outputMultiNode
projectDlls |> Seq.iter ( fun projectDll ->
runSingleProject projectDll
)
)

Target "MultiNodeTestsNet" (fun _ ->
if not skipBuild.Value then
setEnvironVar "AKKA_CLUSTER_ASSERT" "on" // needed to enable assert invariants for Akka.Cluster
Expand Down Expand Up @@ -641,7 +570,6 @@ Target "BuildRelease" DoNothing
Target "All" DoNothing
Target "Nuget" DoNothing
Target "RunTestsFull" DoNothing
Target "RunTestsNetCoreFull" DoNothing

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

// tests dependencies
"Build" ==> "RunTests"
"Build" ==> "RunTestsNetCore"
"Build" ==> "RunTestsNet"
"Build" ==> "NBench"

"BuildRelease" ==> "MultiNodeTestsNetCore"
"BuildRelease" ==> "MultiNodeTestsNet"

// nuget dependencies
Expand All @@ -666,9 +592,7 @@ Target "RunTestsNetCoreFull" DoNothing
// all
"BuildRelease" ==> "All"
"RunTests" ==> "All"
"RunTestsNetCore" ==> "All"
"RunTestsNet" ==> "All"
"MultiNodeTestsNetCore" ==> "All"
"MultiNodeTestsNet" ==> "All"
"NBench" ==> "All"

Expand Down
2 changes: 1 addition & 1 deletion src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetTestVersion)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/benchmark/PingPong/PingPong.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
<ServerGarbageCollection>true</ServerGarbageCollection>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/benchmark/RemotePingPong/RemotePingPong.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyTitle>RemotePingPong</AssemblyTitle>
<AssemblyName>RemotePingPong</AssemblyName>
<Authors>Akka.NET Team</Authors>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetTestVersion)</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand Down
Loading

0 comments on commit 49c0703

Please sign in to comment.