Skip to content

Commit

Permalink
Update macos image from 11 to latest (#8457)
Browse files Browse the repository at this point in the history
* Update macos image from 11 to latest

* unpin pester now that 5.6.0 is on the agent
  • Loading branch information
weshaggard authored Jun 17, 2024
1 parent a258095 commit 612f36a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 22 deletions.
10 changes: 5 additions & 5 deletions doc/common/matrix_generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Example:
"operatingSystem": [
"windows-2022",
"ubuntu-22.04",
"macos-11"
"macos-latest"
],
"framework": [
"net461",
Expand Down Expand Up @@ -526,7 +526,7 @@ For example:

``` yaml
{
"net461_macOS1015": {
"net461_macOSlatest": {
"framework": "net461",
"operatingSystem": "env:OperatingSystem"
}
Expand All @@ -542,9 +542,9 @@ In the matrix job output that azure pipelines consumes, the format is a map of m

``` yaml
{
"net461_macOS1015": {
"net461_macOSlatest": {
"framework": "net461",
"operatingSystem": "macos-11"
"operatingSystem": "macos-latest"
},
"net60_ubuntu2204": {
"framework": "net6.0",
Expand Down Expand Up @@ -697,7 +697,7 @@ Given a matrix like below with `JavaTestVersion` marked as a non-sparse paramete
"Agent": {
"windows-2022": { "OSVmImage": "windows-2022", "Pool": "azsdk-pool-mms-win-2022-general" },
"ubuntu-2204": { "OSVmImage": "ubuntu-22.04", "Pool": "azsdk-pool-mms-ubuntu-2204-general" },
"macos-11": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
"macos-latest": { "OSVmImage": "macos-latest", "Pool": "Azure Pipelines" }
},
"JavaTestVersion": [ "1.8", "1.11" ],
"AZURE_TEST_HTTP_CLIENTS": "netty",
Expand Down
2 changes: 1 addition & 1 deletion eng/common-tests/matrix-generator/samples/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Agent": {
"ubuntu": { "OSVmImage": "ubuntu-20.04", "Pool": "Azure Pipelines" },
"windows": { "OSVmImage": "windows-2022", "Pool": "Azure Pipelines" },
"macOS": { "OSVmImage": "macos-11", "Pool": "Azure Pipelines" }
"macOS": { "OSVmImage": "macos-latest", "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-2022", "ubuntu-20.04", "macos-11" ],
"operatingSystem": [ "windows-2022", "ubuntu-20.04", "macos-latest" ],
"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-2022",
"ubuntu-20.04",
"macos-11"
"macos-latest"
],
"framework": [
"net461",
Expand All @@ -36,11 +36,11 @@ BeforeAll {
"framework": "net461"
},
{
"operatingSystem": "macos-11",
"operatingSystem": "macos-latest",
"framework": "netcoreapp2.1"
},
{
"operatingSystem": ["macos-11", "ubuntu-20.04"],
"operatingSystem": ["macos-latest", "ubuntu-20.04"],
"additionalArguments": "--enableFoo"
}
]
Expand Down Expand Up @@ -275,7 +275,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" {
"operatingSystem": [
"windows-2022",
"ubuntu-20.04",
"macos-11"
"macos-latest"
],
"framework": [
"net461",
Expand Down Expand Up @@ -321,7 +321,7 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" {
$element.name | Should -Be "ubuntu2004_netcoreapp21_withFoo"

$element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions
$element.name | Should -Be "macOS11_netcoreapp21_withFoo"
$element.name | Should -Be "macOSlatest_netcoreapp21_withFoo"
}

It "Should initialize an N-dimensional matrix from all parameter permutations" {
Expand All @@ -340,15 +340,15 @@ Describe "Platform Matrix Generation" -Tag "UnitTest", "generate" {
$element.parameters.additionalArguments | Should -Be "--enableFoo"

$element = GetNdMatrixElement @(2, 1, 1) $matrix $dimensions
$element.parameters.operatingSystem | Should -Be "macos-11"
$element.parameters.operatingSystem | Should -Be "macos-latest"
$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 = "windows2022_net461"; operatingSystem = "windows-2022"; framework = "net461"; additionalArguments = ""; }
@{ i = 1; name = "ubuntu2004_netcoreapp21_withfoo"; operatingSystem = "ubuntu-20.04"; framework = "netcoreapp2.1"; additionalArguments = "--enableFoo"; }
@{ i = 2; name = "macOS11_net461"; operatingSystem = "macos-11"; framework = "net461"; additionalArguments = ""; }
@{ i = 2; name = "macOSlatest_net461"; operatingSystem = "macos-latest"; 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 "UnitTest", "transform" {
$matrix[2].parameters.operatingSystem | Should -Be "ubuntu-20.04"
$matrix[2].parameters.additionalArguments | Should -Be ""

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

$matrix[7].name | Should -Be "windows2022_net50_enableWindowsFoo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stages:
Image: ubuntu-22.04
Mac:
Pool: Azure Pipelines
Image: macos-11
Image: macos-latest

pool:
name: $(Pool)
Expand Down
4 changes: 1 addition & 3 deletions eng/common/pipelines/templates/steps/run-pester-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ parameters:

steps:

# Lock Pester to 5.5.0. The reason being is that the signing of 5.6.0 is different and Windows complains.
# The tracking issue: https://github.com/Azure/azure-sdk-tools/issues/8395
- pwsh: |
Install-Module -Name Pester -RequiredVersion 5.5.0 -Force
Install-Module -Name Pester -Force
displayName: Install Pester
# default test steps
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/agent-software-inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
Host: Windows
CustomMacOS:
Pool: Azure Pipelines
OSVmImage: macos-11
OSVmImage: macos-latest
Host: MacOS

pool:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/variables/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
- name: WINDOWSVMIMAGE
value: azsdk-pool-mms-win-2022-1espt
- name: MACVMIMAGE
value: macos-11
value: macos-latest

# Values required for pool.os field in 1es pipeline templates
- name: LINUXOS
Expand Down

0 comments on commit 612f36a

Please sign in to comment.