diff --git a/build.cake b/build.cake index 134248995bb..fc2432a722f 100644 --- a/build.cake +++ b/build.cake @@ -393,10 +393,7 @@ 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 = 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..617e84b5b30 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 # 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" } @@ -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 # 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" } @@ -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 # 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" } @@ -2641,6 +2656,13 @@ 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: + # Apple M1 (arm64) cannot load runtimes lower then .NET 6. + - 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" }