From d6daf84ccdab9dff990d454164aa70470afe3019 Mon Sep 17 00:00:00 2001 From: BorisDog Date: Mon, 4 Mar 2024 12:47:46 -0800 Subject: [PATCH] CSHARP-4991: Add .NET 8 to Smoke Tests --- build.cake | 2 ++ build.ps1 | 2 ++ build.sh | 1 + evergreen/evergreen.yml | 10 ++++++++++ evergreen/install-dotnet.sh | 4 ++-- .../MongoDB.Driver.SmokeTests.Sdk.csproj | 9 ++++++++- 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/build.cake b/build.cake index 193b15a42a1..d767d0b96e5 100644 --- a/build.cake +++ b/build.cake @@ -439,6 +439,7 @@ Task("SmokeTestsNetCoreApp21").IsDependentOn("SmokeTests"); Task("SmokeTestsNetCoreApp31").IsDependentOn("SmokeTests"); Task("SmokeTestsNet50").IsDependentOn("SmokeTests"); Task("SmokeTestsNet60").IsDependentOn("SmokeTests"); +Task("SmokeTestsNet80").IsDependentOn("SmokeTests"); Task("TestsPackaging") .IsDependentOn("TestsPackagingProjectReference") @@ -658,6 +659,7 @@ Setup( string s when s.EndsWith("net472") => "net472", string s when s.EndsWith("net50") => "net5.0", string s when s.EndsWith("net60") => "net6.0", + string s when s.EndsWith("net80") => "net8.0", _ => null }; diff --git a/build.ps1 b/build.ps1 index b4c956b8414..1d07b5e0a19 100644 --- a/build.ps1 +++ b/build.ps1 @@ -102,6 +102,7 @@ if($FoundDotNetCliVersion -ne $DotNetVersion) { & bash $ScriptPath --install-dir "$InstallPath" --channel 2.1 --no-path & bash $ScriptPath --install-dir "$InstallPath" --channel 3.1 --no-path & bash $ScriptPath --install-dir "$InstallPath" --channel 5.0 --no-path + & bash $ScriptPath --install-dir "$InstallPath" --channel 8.0 --no-path & bash $ScriptPath --version "$DotNetVersion" --install-dir "$InstallPath" --channel "$DotNetChannel" --no-path Remove-PathVariable "$InstallPath" @@ -113,6 +114,7 @@ if($FoundDotNetCliVersion -ne $DotNetVersion) { & $ScriptPath -Channel 2.1 -InstallDir $InstallPath; & $ScriptPath -Channel 3.1 -InstallDir $InstallPath; & $ScriptPath -Channel 5.0 -InstallDir $InstallPath; + & $ScriptPath -Channel 8.0 -InstallDir $InstallPath; & $ScriptPath -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath; Remove-PathVariable "$InstallPath" diff --git a/build.sh b/build.sh index 1d0e31a676d..93b040085fa 100755 --- a/build.sh +++ b/build.sh @@ -47,6 +47,7 @@ if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 2.1 --architecture x64 --install-dir .dotnet --no-path bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 3.1 --architecture x64 --install-dir .dotnet --no-path bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 5.0 --architecture x64 --install-dir .dotnet --no-path + bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --channel 8.0 --architecture x64 --install-dir .dotnet --no-path bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --install-dir .dotnet --no-path export PATH="$SCRIPT_DIR/.dotnet":$PATH export DOTNET_ROOT="$SCRIPT_DIR/.dotnet" diff --git a/evergreen/evergreen.yml b/evergreen/evergreen.yml index 8d29578307c..0489286995c 100644 --- a/evergreen/evergreen.yml +++ b/evergreen/evergreen.yml @@ -1412,6 +1412,13 @@ tasks: vars: FRAMEWORK: net60 + - name: test-smoke-tests-net80 + commands: + - func: bootstrap-mongo-orchestration + - func: run-smoke-tests + vars: + FRAMEWORK: net80 + - name: performance-tests-net60-server-v6.0 commands: - func: bootstrap-mongo-orchestration @@ -2306,6 +2313,7 @@ buildvariants: - name: test-smoke-tests-netcoreapp31 - name: test-smoke-tests-net50 - name: test-smoke-tests-net60 + - name: test-smoke-tests-net80 - matrix_name: "smoke-tests-linux" matrix_spec: { os: "ubuntu-2004", ssl: "nossl", version: ["5.0", "6.0", "7.0", "latest"], topology: ["replicaset"] } @@ -2316,6 +2324,7 @@ buildvariants: - name: test-smoke-tests-netcoreapp31 - name: test-smoke-tests-net50 - name: test-smoke-tests-net60 + - name: test-smoke-tests-net80 - matrix_name: "smoke-tests-macOS" matrix_spec: { os: "macos-1100", ssl: "nossl", version: ["5.0", "6.0", "7.0", "latest"], topology: ["replicaset"] } @@ -2326,6 +2335,7 @@ buildvariants: - name: test-smoke-tests-netcoreapp31 - name: test-smoke-tests-net50 - name: test-smoke-tests-net60 + - name: test-smoke-tests-net80 # Package release variants - matrix_name: build-packages diff --git a/evergreen/install-dotnet.sh b/evergreen/install-dotnet.sh index 14fb49216ed..2e79576d4b3 100644 --- a/evergreen/install-dotnet.sh +++ b/evergreen/install-dotnet.sh @@ -8,10 +8,10 @@ if [[ $OS =~ [Ww]indows.* ]]; then echo "Downloading Windows .NET SDK installer into $DOTNET_SDK_PATH folder..." curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.ps1 https://dot.net/v1/dotnet-install.ps1 echo "Installing .NET LTS SDK..." - powershell.exe "$DOTNET_SDK_PATH"/dotnet-install.ps1 -Channel 6.0 -InstallDir "$DOTNET_SDK_PATH" -NoPath + powershell.exe "$DOTNET_SDK_PATH"/dotnet-install.ps1 -Channel 8.0 -InstallDir "$DOTNET_SDK_PATH" -NoPath else echo "Downloading .NET SDK installer into $DOTNET_SDK_PATH folder..." curl -Lfo "$DOTNET_SDK_PATH"/dotnet-install.sh https://dot.net/v1/dotnet-install.sh echo "Installing .NET LTS SDK..." - bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 6.0 --install-dir "$DOTNET_SDK_PATH" --no-path + bash "$DOTNET_SDK_PATH"/dotnet-install.sh --channel 8.0 --install-dir "$DOTNET_SDK_PATH" --no-path fi diff --git a/tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj b/tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj index 8c56b707d69..5dde81d3b04 100644 --- a/tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj +++ b/tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj @@ -1,6 +1,6 @@ - netcoreapp2.1;netcoreapp3.1;net472;net5.0;net6.0 + netcoreapp2.1;netcoreapp3.1;net472;net5.0;net6.0;net8.0 9 ..\..\..\MongoDBTest.ruleset @@ -54,6 +54,13 @@ + + + + + + + Always