mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +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"
|
||||
|
||||
download_with_retries "$CHROMEDRIVER_URL" "/tmp" "$CHROMEDRIVER_ARCHIVE"
|
||||
unzip -qq /tmp/$CHROMEDRIVER_ARCHIVE -d /usr/local/share
|
||||
chmod +x $CHROMEDRIVER_BIN
|
||||
unzip -qq /tmp/$CHROMEDRIVER_ARCHIVE -d /tmp/
|
||||
sudo mv "/tmp/chromedriver-${CHROME_PLATFORM}" "$CHROMEDRIVER_DIR"
|
||||
ln -s "$CHROMEDRIVER_BIN" /usr/local/bin/chromedriver
|
||||
echo "export CHROMEWEBDRIVER=$CHROMEDRIVER_DIR" >> "${HOME}/.bashrc"
|
||||
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
function Build-BrowserSection {
|
||||
return @(
|
||||
|
||||
$nodes = @()
|
||||
$os = Get-OSVersion
|
||||
|
||||
$nodes += @(
|
||||
[ToolVersionNode]::new("Safari", $(Get-SafariVersion))
|
||||
[ToolVersionNode]::new("SafariDriver", $(Get-SafariDriverVersion))
|
||||
[ToolVersionNode]::new("Google Chrome", $(Get-ChromeVersion))
|
||||
[ToolVersionNode]::new("Google Chrome for Testing", $(Get-ChromeForTestingVersion))
|
||||
[ToolVersionNode]::new("ChromeDriver", $(Get-ChromeDriverVersion))
|
||||
[ToolVersionNode]::new("Microsoft Edge", $(Get-EdgeVersion))
|
||||
[ToolVersionNode]::new("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
|
||||
[ToolVersionNode]::new("Mozilla Firefox", $(Get-FirefoxVersion))
|
||||
[ToolVersionNode]::new("geckodriver", $(Get-GeckodriverVersion))
|
||||
)
|
||||
|
||||
if (-not $os.IsVenturaArm64) {
|
||||
$nodes += @(
|
||||
[ToolVersionNode]::new("Microsoft Edge", $(Get-EdgeVersion))
|
||||
[ToolVersionNode]::new("Microsoft Edge WebDriver", $(Get-EdgeDriverVersion))
|
||||
[ToolVersionNode]::new("Mozilla Firefox", $(Get-FirefoxVersion))
|
||||
[ToolVersionNode]::new("geckodriver", $(Get-GeckodriverVersion))
|
||||
)
|
||||
}
|
||||
|
||||
$nodes += @(
|
||||
[ToolVersionNode]::new("Selenium server", $(Get-SeleniumVersion))
|
||||
)
|
||||
|
||||
return $nodes
|
||||
}
|
||||
|
||||
function Get-SafariVersion {
|
||||
@@ -64,7 +78,13 @@ function Get-GeckodriverVersion {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -202,12 +202,11 @@ if ((-not $os.IsVentura) -and (-not $os.IsVenturaArm64)) {
|
||||
$linters.AddToolVersion("Yamllint", $(Get-YamllintVersion))
|
||||
}
|
||||
|
||||
if (-not $os.IsVenturaArm64) {
|
||||
# Browsers
|
||||
$browsers = $installedSoftware.AddHeader("Browsers")
|
||||
$browsers.AddNodes($(Build-BrowserSection))
|
||||
$browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
|
||||
}
|
||||
# Browsers
|
||||
$browsers = $installedSoftware.AddHeader("Browsers")
|
||||
$browsers.AddNodes($(Build-BrowserSection))
|
||||
$browsers.AddNode($(Build-BrowserWebdriversEnvironmentTable))
|
||||
|
||||
# Java
|
||||
$java = $installedSoftware.AddHeader("Java")
|
||||
$java.AddTable($(Get-JavaVersions))
|
||||
|
||||
@@ -202,6 +202,7 @@ build {
|
||||
"./provision/core/gcc.sh",
|
||||
"./provision/core/cocoapods.sh",
|
||||
"./provision/core/safari.sh",
|
||||
"./provision/core/chrome.sh",
|
||||
"./provision/core/bicep.sh",
|
||||
"./provision/core/codeql-bundle.sh"
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Chrome" -Skip:($os.IsVenturaArm64) {
|
||||
Describe "Chrome" {
|
||||
BeforeAll {
|
||||
$chromeLocation = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
||||
$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" {
|
||||
(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.*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,4 +72,4 @@ Describe "Safari" {
|
||||
$commandResult.ExitCode | Should -Be 0
|
||||
$commandResult.Output | Should -Be "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user