From 7ed439c193a17e56887da2e7a46d8a9b5a6dc1f3 Mon Sep 17 00:00:00 2001 From: Oleksandr Poliakov Date: Mon, 22 Sep 2025 12:34:24 -0700 Subject: [PATCH 1/3] CSHARP-5742: Do not run netstandard tests on ARM platform --- build.cake | 2 +- evergreen/evergreen.yml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index 134248995bb..74033303b48 100644 --- a/build.cake +++ b/build.cake @@ -396,7 +396,7 @@ Setup( // Apple M1 (arm64) must run on .NET 6 as the hosting process is arm64 and cannot load the previous netcoreapp2.1/3.1 runtimes. // While Rosetta 2 can cross-compile x64->arm64 to run x64 code, it requires a completely separate install of the .NET runtimes // in a different directory with a x64 dotnet host process. This would further complicate our testing for little additional gain. - var framework = targetPlatform == "arm64" ? "net6.0" : lowerTarget switch + var framework = lowerTarget switch { string s when s.EndsWith("netstandard21") || s.EndsWith("netcoreapp31") => "netcoreapp3.1", string s when s.EndsWith("net472") => "net472", diff --git a/evergreen/evergreen.yml b/evergreen/evergreen.yml index f55c269e032..f58fc2a4ffe 100644 --- a/evergreen/evergreen.yml +++ b/evergreen/evergreen.yml @@ -2354,6 +2354,11 @@ buildvariants: tasks: - name: test-netstandard21 - name: test-net60 + rules: + - if: { version: "*", topology: "*", auth: "*", ssl: "*", os: "macos-14-arm64" } + then: + remove_tasks: + - test-netstandard21 - matrix_name: "secure-tests-linux-1804" matrix_spec: { version: ["4.2", "4.4", "5.0", "6.0"], topology: "*", auth: "auth", ssl: "ssl", os: "ubuntu-1804" } @@ -2389,6 +2394,11 @@ buildvariants: tasks: - name: test-netstandard21 - name: test-net60 + rules: + - if: { version: "*", topology: "*", auth: "*", ssl: "*", os: "macos-14-arm64" } + then: + remove_tasks: + - test-netstandard21 - matrix_name: "unsecure-tests-linux-1804" matrix_spec: { version: ["4.2", "4.4", "5.0", "6.0"], topology: "*", auth: "noauth", ssl: "nossl", os: "ubuntu-1804" } @@ -2424,6 +2434,11 @@ buildvariants: tasks: - name: test-netstandard21 - name: test-net60 + rules: + - if: { compressor : "*", auth: "*", ssl: "*", version: "*", topology: "*", os: "macos-14-arm64" } + then: + remove_tasks: + - test-netstandard21 - matrix_name: "tests-compression-linux-1804" matrix_spec: { compressor: "*", auth: "noauth", ssl: "nossl", version: ["4.2", "4.4", "5.0", "6.0"], topology: "standalone", os: "ubuntu-1804" } @@ -2641,6 +2656,12 @@ buildvariants: - name: test-csfle-with-mocked-kms-tls-net60 - name: test-csfle-with-mongocryptd-netstandard21 - name: test-csfle-with-mongocryptd-net60 + rules: + - if: { os: "macos-14-arm64", ssl: "*", version: "*", topology: "*" } + then: + remove_tasks: + - test-csfle-with-mocked-kms-tls-netstandard21 + - test-csfle-with-mongocryptd-netstandard21 - matrix_name: "csfle-with-azure-kms-tests-linux" matrix_spec: { ssl: "nossl", os: "ubuntu-2004" } From 8d440af9788f91468299ad57061964e8605ebf63 Mon Sep 17 00:00:00 2001 From: Oleksandr Poliakov <31327136+sanych-sun@users.noreply.github.com> Date: Thu, 25 Sep 2025 12:21:57 -0700 Subject: [PATCH 2/3] Remove outdated comment --- build.cake | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.cake b/build.cake index 74033303b48..fc2432a722f 100644 --- a/build.cake +++ b/build.cake @@ -393,9 +393,6 @@ Setup( }; var lowerTarget = target.ToLowerInvariant(); - // Apple M1 (arm64) must run on .NET 6 as the hosting process is arm64 and cannot load the previous netcoreapp2.1/3.1 runtimes. - // While Rosetta 2 can cross-compile x64->arm64 to run x64 code, it requires a completely separate install of the .NET runtimes - // in a different directory with a x64 dotnet host process. This would further complicate our testing for little additional gain. var framework = lowerTarget switch { string s when s.EndsWith("netstandard21") || s.EndsWith("netcoreapp31") => "netcoreapp3.1", From e10bb959f1508743828e61939d91fb0e61ba8db8 Mon Sep 17 00:00:00 2001 From: Oleksandr Poliakov <31327136+sanych-sun@users.noreply.github.com> Date: Thu, 25 Sep 2025 12:25:01 -0700 Subject: [PATCH 3/3] Add comment why to remove tasks --- evergreen/evergreen.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/evergreen/evergreen.yml b/evergreen/evergreen.yml index f58fc2a4ffe..617e84b5b30 100644 --- a/evergreen/evergreen.yml +++ b/evergreen/evergreen.yml @@ -2358,7 +2358,7 @@ buildvariants: - if: { version: "*", topology: "*", auth: "*", ssl: "*", os: "macos-14-arm64" } then: remove_tasks: - - test-netstandard21 + - test-netstandard21 # Apple M1 (arm64) cannot load runtimes lower then .NET 6. - matrix_name: "secure-tests-linux-1804" matrix_spec: { version: ["4.2", "4.4", "5.0", "6.0"], topology: "*", auth: "auth", ssl: "ssl", os: "ubuntu-1804" } @@ -2398,7 +2398,7 @@ buildvariants: - if: { version: "*", topology: "*", auth: "*", ssl: "*", os: "macos-14-arm64" } then: remove_tasks: - - test-netstandard21 + - test-netstandard21 # Apple M1 (arm64) cannot load runtimes lower then .NET 6. - matrix_name: "unsecure-tests-linux-1804" matrix_spec: { version: ["4.2", "4.4", "5.0", "6.0"], topology: "*", auth: "noauth", ssl: "nossl", os: "ubuntu-1804" } @@ -2438,7 +2438,7 @@ buildvariants: - if: { compressor : "*", auth: "*", ssl: "*", version: "*", topology: "*", os: "macos-14-arm64" } then: remove_tasks: - - test-netstandard21 + - test-netstandard21 # Apple M1 (arm64) cannot load runtimes lower then .NET 6. - matrix_name: "tests-compression-linux-1804" matrix_spec: { compressor: "*", auth: "noauth", ssl: "nossl", version: ["4.2", "4.4", "5.0", "6.0"], topology: "standalone", os: "ubuntu-1804" } @@ -2660,6 +2660,7 @@ buildvariants: - if: { os: "macos-14-arm64", ssl: "*", version: "*", topology: "*" } then: remove_tasks: + # Apple M1 (arm64) cannot load runtimes lower then .NET 6. - test-csfle-with-mocked-kms-tls-netstandard21 - test-csfle-with-mongocryptd-netstandard21