mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 14:47:08 +00:00
[macOS] Add Chrome to arm64 image (#8526)
This commit is contained in:
committed by
GitHub
parent
9e6658b0b2
commit
c598da4d84
@@ -26,8 +26,8 @@ CHROMEDRIVER_DIR="/usr/local/share/chromedriver-${CHROME_PLATFORM}"
|
|||||||
CHROMEDRIVER_BIN="$CHROMEDRIVER_DIR/chromedriver"
|
CHROMEDRIVER_BIN="$CHROMEDRIVER_DIR/chromedriver"
|
||||||
|
|
||||||
download_with_retries "$CHROMEDRIVER_URL" "/tmp" "$CHROMEDRIVER_ARCHIVE"
|
download_with_retries "$CHROMEDRIVER_URL" "/tmp" "$CHROMEDRIVER_ARCHIVE"
|
||||||
unzip -qq /tmp/$CHROMEDRIVER_ARCHIVE -d /usr/local/share
|
unzip -qq /tmp/$CHROMEDRIVER_ARCHIVE -d /tmp/
|
||||||
chmod +x $CHROMEDRIVER_BIN
|
sudo mv "/tmp/chromedriver-${CHROME_PLATFORM}" "$CHROMEDRIVER_DIR"
|
||||||
ln -s "$CHROMEDRIVER_BIN" /usr/local/bin/chromedriver
|
ln -s "$CHROMEDRIVER_BIN" /usr/local/bin/chromedriver
|
||||||
echo "export CHROMEWEBDRIVER=$CHROMEDRIVER_DIR" >> "${HOME}/.bashrc"
|
echo "export CHROMEWEBDRIVER=$CHROMEDRIVER_DIR" >> "${HOME}/.bashrc"
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,30 @@
|
|||||||
function Build-BrowserSection {
|
function Build-BrowserSection {
|
||||||
return @(
|
|
||||||
|
$nodes = @()
|
||||||
|
$os = Get-OSVersion
|
||||||
|
|
||||||
|
$nodes += @(
|
||||||
[ToolVersionNode]::new("Safari", $(Get-SafariVersion))
|
[ToolVersionNode]::new("Safari", $(Get-SafariVersion))
|
||||||
[ToolVersionNode]::new("SafariDriver", $(Get-SafariDriverVersion))
|
[ToolVersionNode]::new("SafariDriver", $(Get-SafariDriverVersion))
|
||||||
[ToolVersionNode]::new("Google Chrome", $(Get-ChromeVersion))
|
[ToolVersionNode]::new("Google Chrome", $(Get-ChromeVersion))
|
||||||
[ToolVersionNode]::new("Google Chrome for Testing", $(Get-ChromeForTestingVersion))
|
[ToolVersionNode]::new("Google Chrome for Testing", $(Get-ChromeForTestingVersion))
|
||||||
[ToolVersionNode]::new("ChromeDriver", $(Get-ChromeDriverVersion))
|
[ToolVersionNode]::new("ChromeDriver", $(Get-ChromeDriverVersion))
|
||||||
|
)
|
||||||
|
|
||||||
|
if (-not $os.IsVenturaArm64) {
|
||||||
|
$nodes += @(
|
||||||
[ToolVersionNode]::new("Microsoft Edge", $(Get-EdgeVersion))
|
[ToolVersionNode]::new("Microsoft Edge", $(Get-EdgeVersion))
|
||||||
[ToolVersionNode]::new("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
|
[ToolVersionNode]::new("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
|
||||||
[ToolVersionNode]::new("Mozilla Firefox", $(Get-FirefoxVersion))
|
[ToolVersionNode]::new("Mozilla Firefox", $(Get-FirefoxVersion))
|
||||||
[ToolVersionNode]::new("geckodriver", $(Get-GeckodriverVersion))
|
[ToolVersionNode]::new("geckodriver", $(Get-GeckodriverVersion))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
$nodes += @(
|
||||||
[ToolVersionNode]::new("Selenium server", $(Get-SeleniumVersion))
|
[ToolVersionNode]::new("Selenium server", $(Get-SeleniumVersion))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return $nodes
|
||||||
}
|
}
|
||||||
|
|
||||||
function Get-SafariVersion {
|
function Get-SafariVersion {
|
||||||
@@ -64,7 +78,13 @@ function Get-GeckodriverVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-SeleniumVersion {
|
function Get-SeleniumVersion {
|
||||||
$seleniumVersion = (Get-ChildItem -Path "/usr/local/Cellar/selenium-server*/*").Name
|
$os = Get-OSVersion
|
||||||
|
if ($os.IsVenturaArm64) {
|
||||||
|
$cellarPath = "/opt/homebrew/Cellar"
|
||||||
|
} else {
|
||||||
|
$cellarPath = "/usr/local/Cellar"
|
||||||
|
}
|
||||||
|
$seleniumVersion = (Get-ChildItem -Path "$cellarPath/selenium-server*/*").Name
|
||||||
return $seleniumVersion
|
return $seleniumVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,12 +202,11 @@ if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) {
|
|||||||
$linters.AddToolVersion("Yamllint", $(Get-YamllintVersion))
|
$linters.AddToolVersion("Yamllint", $(Get-YamllintVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $os.IsVenturaArm64) {
|
|
||||||
# Browsers
|
# Browsers
|
||||||
$browsers = $installedSoftware.AddHeader("Browsers")
|
$browsers = $installedSoftware.AddHeader("Browsers")
|
||||||
$browsers.AddNodes($(Build-BrowserSection))
|
$browsers.AddNodes($(Build-BrowserSection))
|
||||||
$browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
|
$browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
|
||||||
}
|
|
||||||
# Java
|
# Java
|
||||||
$java = $installedSoftware.AddHeader("Java")
|
$java = $installedSoftware.AddHeader("Java")
|
||||||
$java.AddTable($(Get-JavaVersions))
|
$java.AddTable($(Get-JavaVersions))
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ build {
|
|||||||
"./provision/core/gcc.sh",
|
"./provision/core/gcc.sh",
|
||||||
"./provision/core/cocoapods.sh",
|
"./provision/core/cocoapods.sh",
|
||||||
"./provision/core/safari.sh",
|
"./provision/core/safari.sh",
|
||||||
|
"./provision/core/chrome.sh",
|
||||||
"./provision/core/bicep.sh",
|
"./provision/core/bicep.sh",
|
||||||
"./provision/core/codeql-bundle.sh"
|
"./provision/core/codeql-bundle.sh"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||||
$os = Get-OSVersion
|
$os = Get-OSVersion
|
||||||
|
|
||||||
Describe "Chrome" -Skip:($os.IsVenturaArm64) {
|
Describe "Chrome" {
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
$chromeLocation = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
$chromeLocation = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
||||||
$chromeForTestingLocation = "/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
|
$chromeForTestingLocation = "/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
|
||||||
@@ -28,9 +28,15 @@ Describe "Chrome" -Skip:($os.IsVenturaArm64) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Selenium server" -Skip:($os.IsVenturaArm64) {
|
Describe "Selenium server" {
|
||||||
It "Selenium server" {
|
It "Selenium server" {
|
||||||
(Get-ChildItem -Path "/usr/local/Cellar/selenium-server*/*").Name | Should -BeLike "4.*"
|
$os = Get-OSVersion
|
||||||
|
if ($os.IsVenturaArm64) {
|
||||||
|
$cellarPath = "/opt/homebrew/Cellar"
|
||||||
|
} else {
|
||||||
|
$cellarPath = "/usr/local/Cellar"
|
||||||
|
}
|
||||||
|
(Get-ChildItem -Path "$cellarPath/selenium-server*/*").Name | Should -BeLike "4.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user