Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 3753 (#2289)
Browse files Browse the repository at this point in the history
* Bump MacOs version to macos-11

* Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1

Co-authored-by: Wes Haggard <[email protected]>

* Update eng/common/scripts/job-matrix/tests/job-matrix-functions.tests.ps1

Co-authored-by: Wes Haggard <[email protected]>

Co-authored-by: sima-zhu <[email protected]>
Co-authored-by: Sima Zhu <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>
  • Loading branch information
4 people authored Jul 27, 2022
1 parent aa4a905 commit 366173b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions eng/common/scripts/job-matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Example:
"operatingSystem": [
"windows-2019",
"ubuntu-18.04",
"macOS-10.15"
"macos-11"
],
"framework": [
"net461",
Expand Down Expand Up @@ -380,7 +380,7 @@ In the matrix job output that azure pipelines consumes, the format is a dictiona
{
"net461_macOS1015": {
"framework": "net461",
"operatingSystem": "macOS-10.15"
"operatingSystem": "macos-11"
},
"net50_ubuntu1804": {
"framework": "net50",
Expand Down Expand Up @@ -512,7 +512,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete
"Agent": {
"windows-2019": { "OSVmImage": "MMS2019", "Pool": "azsdk-pool-mms-win-2019-general" },
"ubuntu-1804": { "OSVmImage": "MMSUbuntu18.04", "Pool": "azsdk-pool-mms-ubuntu-1804-general" },
"macOS-10.15": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" }
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"JavaTestVersion": [ "1.8", "1.11" ],
"AZURE_TEST_HTTP_CLIENTS": "netty",
Expand Down
2 changes: 1 addition & 1 deletion eng/common/scripts/job-matrix/samples/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Agent": {
"ubuntu": { "OSVmImage": "ubuntu-18.04", "Pool": "Azure Pipelines" },
"windows": { "OSVmImage": "windows-2019", "Pool": "Azure Pipelines" },
"macOS": { "OSVmImage": "macOS-10.15", "Pool": "Azure Pipelines" }
"macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
},
"TestTargetFramework": [ "netcoreapp2.1", "net461", "net5.0" ]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BeforeAll {
$matrixConfig = @"
{
"matrix": {
"operatingSystem": [ "windows-2019", "ubuntu-18.04", "macOS-10.15" ],
"operatingSystem": [ "windows-2019", "ubuntu-18.04", "macos-11" ],
"framework": [ "net461", "netcoreapp2.1" ],
"additionalArguments": [ "", "mode=test" ]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BeforeAll {
"operatingSystem": [
"windows-2019",
"ubuntu-18.04",
"macOS-10.15"
"macos-11"
],
"framework": [
"net461",
Expand All @@ -36,11 +36,11 @@ BeforeAll {
"framework": "net461"
},
{
"operatingSystem": "macOS-10.15",
"operatingSystem": "macos-11",
"framework": "netcoreapp2.1"
},
{
"operatingSystem": ["macOS-10.15", "ubuntu-18.04"],
"operatingSystem": ["macos-11", "ubuntu-18.04"],
"additionalArguments": "--enableFoo"
}
]
Expand Down Expand Up @@ -275,7 +275,7 @@ Describe "Platform Matrix Generation" -Tag "generate" {
"operatingSystem": [
"windows-2019",
"ubuntu-18.04",
"macOS-10.15"
"macos-11"
],
"framework": [
"net461",
Expand Down Expand Up @@ -340,15 +340,15 @@ Describe "Platform Matrix Generation" -Tag "generate" {
$element.parameters.additionalArguments | Should -Be "--enableFoo"

$element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions
$element.parameters.operatingSystem | Should -Be "macOS-10.15"
$element.parameters.operatingSystem | Should -Be "macos-11"
$element.parameters.framework | Should -Be "netcoreapp2.1"
$element.parameters.additionalArguments | Should -Be "--enableFoo"
}

It "Should initialize a sparse matrix from an N-dimensional matrix" -TestCases @(
@{ i = 0; name = "windows2019_net461"; operatingSystem = "windows-2019"; framework = "net461"; additionalArguments = ""; }
@{ i = 1; name = "ubuntu1804_netcoreapp21_withfoo"; operatingSystem = "ubuntu-18.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; }
@{ i = 2; name = "macOS1015_net461"; operatingSystem = "macOS-10.15"; framework = "net461"; additionalArguments = ""; }
@{ i = 2; name = "macOS11_net461"; operatingSystem = "macos-11"; framework = "net461"; additionalArguments = ""; }
) {
$sparseMatrix = GenerateSparseMatrix $generateConfig.matrixParameters $generateConfig.displayNamesLookup
$dimensions = GetMatrixDimensions $generateConfig.matrixParameters
Expand Down Expand Up @@ -440,9 +440,9 @@ Describe "Platform Matrix Post Transformation" -Tag "transform" {
$matrix[2].parameters.operatingSystem | Should -Be "ubuntu-18.04"
$matrix[2].parameters.additionalArguments | Should -Be ""

$matrix[4].name | Should -Be "macOS1015_net461"
$matrix[4].name | Should -Be "macOS11_net461"
$matrix[4].parameters.framework | Should -Be "net461"
$matrix[4].parameters.operatingSystem | Should -Be "macOS-10.15"
$matrix[4].parameters.operatingSystem | Should -Be "macos-11"
$matrix[4].parameters.additionalArguments | Should -Be ""

$matrix[7].name | Should -Be "windows2019_net50_enableWindowsFoo"
Expand Down

0 comments on commit 366173b

Please sign in to comment.