[macOS] Remove macOS-11 related code due to the deprecation (#10383)

This commit is contained in:
Erik Bershel
2024-08-09 11:25:15 +02:00
committed by GitHub
parent 88cb1bef47
commit 22143c7c68
27 changed files with 74 additions and 1176 deletions

View File

@@ -139,10 +139,7 @@ function Set-AnkaVMVideoController {
) )
$command = "anka modify $VMName set display -c $Controller" $command = "anka modify $VMName set display -c $Controller"
# Apple Metal is available starting from Big Sur $null = Invoke-AnkaCommand -Command $command
if (-not $ShortMacOSVersion.StartsWith("10.")) {
$null = Invoke-AnkaCommand -Command $command
}
} }
function Set-AnkaVMDisplayResolution { function Set-AnkaVMDisplayResolution {

View File

@@ -17,14 +17,7 @@ sudo rm -f /var/vm/sleepimage
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
# Disable Keyboard Setup Assistant window # Disable Keyboard Setup Assistant window
if is_Veertu; then sudo defaults write /Library/Preferences/com.apple.keyboardtype "keyboardtype" -dict-add "3-7582-0" -int 40
sudo defaults write /Library/Preferences/com.apple.keyboardtype "keyboardtype" -dict-add "3-7582-0" -int 40
fi
# Change screen resolution to the maximum supported for 4Mb video memory
if [[ -d "/Library/Application Support/VMware Tools" ]]; then
sudo "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1176 885
fi
# Update VoiceOver Utility to allow VoiceOver to be controlled with AppleScript # Update VoiceOver Utility to allow VoiceOver to be controlled with AppleScript
# by creating a special Accessibility DB file (SIP must be disabled) and # by creating a special Accessibility DB file (SIP must be disabled) and
@@ -39,7 +32,6 @@ defaults write com.apple.VoiceOver4/default SCREnableAppleScript -bool YES
# Rotate the certificate before expiration to ensure your apps are installed and signed with an active certificate. # Rotate the certificate before expiration to ensure your apps are installed and signed with an active certificate.
# Confirm that the correct intermediate certificate is installed by verifying the expiration date is set to 2030. # Confirm that the correct intermediate certificate is installed by verifying the expiration date is set to 2030.
# sudo security delete-certificate -Z FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64 /Library/Keychains/System.keychain # sudo security delete-certificate -Z FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64 /Library/Keychains/System.keychain
# Big Sur requires user interaction to add a cert https://developer.apple.com/forums/thread/671582, we need to use a workaround with SecItemAdd swift method
swiftc -suppress-warnings "${HOME}/image-generation/add-certificate.swift" swiftc -suppress-warnings "${HOME}/image-generation/add-certificate.swift"
@@ -58,7 +50,7 @@ done
rm -f ./add-certificate rm -f ./add-certificate
# enable-automationmode-without-authentication # enable-automationmode-without-authentication
if ! is_BigSur; then
retry=10 retry=10
while [[ $retry -gt 0 ]]; do while [[ $retry -gt 0 ]]; do
{ {
@@ -84,16 +76,15 @@ EOF
sleep 10 sleep 10
done done
echo "Getting terminal windows" echo "Getting terminal windows"
term_service=$(launchctl list | grep -i terminal | cut -f3) term_service=$(launchctl list | grep -i terminal | cut -f3)
echo "Close terminal windows: gui/501/${term_service}" echo "Close terminal windows: gui/501/${term_service}"
launchctl bootout gui/501/${term_service} && sleep 5 launchctl bootout gui/501/${term_service} && sleep 5
# test enable-automationmode-without-authentication # test enable-automationmode-without-authentication
if [[ ! "$(automationmodetool)" =~ "DOES NOT REQUIRE" ]]; then if [[ ! "$(automationmodetool)" =~ "DOES NOT REQUIRE" ]]; then
echo "Failed to enable enable-automationmode-without-authentication option" echo "Failed to enable enable-automationmode-without-authentication option"
exit 1 exit 1
fi
fi fi
# Create symlink for tests running # Create symlink for tests running

View File

@@ -19,15 +19,9 @@ if [[ $arch == "arm64" ]]; then
else else
image_label="macos-${label_version}" image_label="macos-${label_version}"
fi fi
release_label="macOS-${label_version}"
if is_Ventura || is_Sonoma || is_Monterey; then software_url="https://github.com/actions/runner-images/blob/${image_label}/${image_version}/images/macos/${image_label}-Readme.md"
software_url="https://github.com/actions/runner-images/blob/${image_label}/${image_version}/images/macos/${image_label}-Readme.md" releaseUrl="https://github.com/actions/runner-images/releases/tag/${image_label}%2F${image_version}"
releaseUrl="https://github.com/actions/runner-images/releases/tag/${image_label}%2F${image_version}"
else
software_url="https://github.com/actions/runner-images/blob/${release_label}/${image_version}/images/macos/${image_label}-Readme.md"
releaseUrl="https://github.com/actions/runner-images/releases/tag/${release_label}%2F${image_version}"
fi
cat <<EOF > $imagedata_file cat <<EOF > $imagedata_file
[ [

View File

@@ -10,11 +10,9 @@ echo "Installing aws..."
awscliv2_pkg_path=$(download_with_retry "https://awscli.amazonaws.com/AWSCLIV2.pkg") awscliv2_pkg_path=$(download_with_retry "https://awscli.amazonaws.com/AWSCLIV2.pkg")
sudo installer -pkg "$awscliv2_pkg_path" -target / sudo installer -pkg "$awscliv2_pkg_path" -target /
if ! is_BigSur; then echo "Installing aws sam cli..."
echo "Installing aws sam cli..." brew tap aws/tap
brew tap aws/tap brew_smart_install aws-sam-cli
brew_smart_install aws-sam-cli
fi
echo "Install aws cli session manager" echo "Install aws cli session manager"
brew install --cask session-manager-plugin brew install --cask session-manager-plugin

View File

@@ -6,12 +6,6 @@
source ~/utils/utils.sh source ~/utils/utils.sh
# Download and install YQ in cases when it is not available in the formulae as for macOS 11: https://formulae.brew.sh/formula/yq
if is_BigSur; then
binary_path=$(download_with_retry "https://github.com/mikefarah/yq/releases/latest/download/yq_darwin_amd64")
sudo install "$binary_path" /usr/local/bin/yq
fi
# Monterey needs future review: # Monterey needs future review:
# aliyun-cli, gnupg, helm have issues with building from the source code. # aliyun-cli, gnupg, helm have issues with building from the source code.
# Added gmp for now, because toolcache ruby needs its libs. Remove it when php starts to build from source code. # Added gmp for now, because toolcache ruby needs its libs. Remove it when php starts to build from source code.
@@ -48,27 +42,22 @@ fi
# Execute AppleScript to change security preferences # Execute AppleScript to change security preferences
# System Preferences -> Security & Privacy -> General -> Unlock -> Allow -> Not now # System Preferences -> Security & Privacy -> General -> Unlock -> Allow -> Not now
if is_Monterey; then if is_Monterey; then
if is_Veertu; then for retry in {4..0}; do
for retry in {4..0}; do echo "Executing AppleScript to change security preferences. Retries left: $retry"
echo "Executing AppleScript to change security preferences. Retries left: $retry" {
{ set -e
set -e osascript -e 'tell application "System Events" to get application processes where visible is true'
osascript -e 'tell application "System Events" to get application processes where visible is true' osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD } && break
} && break
if [[ $retry -eq 0 ]]; then if [[ $retry -eq 0 ]]; then
echo "Executing AppleScript failed. No retries left" echo "Executing AppleScript failed. No retries left"
exit 1 exit 1
fi fi
echo "Executing AppleScript failed. Sleeping for 10 seconds and retrying" echo "Executing AppleScript failed. Sleeping for 10 seconds and retrying"
sleep 10 sleep 10
done done
else
echo "Executing AppleScript to change security preferences"
osascript $HOME/utils/confirm-identified-developers.scpt $USER_PASSWORD
fi
fi fi
# Validate "Parallels International GmbH" kext # Validate "Parallels International GmbH" kext
@@ -95,10 +84,8 @@ if is_Monterey; then
echo "export PARALLELS_DMG_URL=$url" >> ${HOME}/.bashrc echo "export PARALLELS_DMG_URL=$url" >> ${HOME}/.bashrc
fi fi
if ! is_BigSur; then # Install Azure DevOps extension for Azure Command Line Interface
# Install Azure DevOps extension for Azure Command Line Interface az extension add -n azure-devops
az extension add -n azure-devops
fi
# Invoke tests for all basic tools # Invoke tests for all basic tools
invoke_tests "BasicTools" invoke_tests "BasicTools"

View File

@@ -11,16 +11,13 @@ brew_smart_install "git"
git config --global --add safe.directory "*" git config --global --add safe.directory "*"
echo "Installing Git LFS"
brew_smart_install "git-lfs"
if ! is_BigSur; then # Update global git config
echo "Installing Git LFS" git lfs install
brew_smart_install "git-lfs" # Update system git config
sudo git lfs install --system
# Update global git config
git lfs install
# Update system git config
sudo git lfs install --system
fi
echo "Disable all the Git help messages..." echo "Disable all the Git help messages..."
git config --global advice.pushUpdateRejected false git config --global advice.pushUpdateRejected false

View File

@@ -16,7 +16,7 @@ echo Installing yarn...
yarn_installer_path=$(download_with_retry "https://yarnpkg.com/install.sh") yarn_installer_path=$(download_with_retry "https://yarnpkg.com/install.sh")
bash $yarn_installer_path bash $yarn_installer_path
if is_BigSur || is_Monterey; then if is_Monterey; then
npm_global_packages=$(get_toolset_value '.npm.global_packages[].name') npm_global_packages=$(get_toolset_value '.npm.global_packages[].name')
for module in ${npm_global_packages[@]}; do for module in ${npm_global_packages[@]}; do
echo "Install $module" echo "Install $module"

View File

@@ -8,7 +8,7 @@ source ~/utils/utils.sh
echo "Installing Python Tooling" echo "Installing Python Tooling"
if is_Monterey || is_BigSur; then if is_Monterey; then
echo "Install latest Python 2" echo "Install latest Python 2"
python2_pkg=$(download_with_retry "https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg") python2_pkg=$(download_with_retry "https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg")
python2_pkg_sha256="c570f38b05dd8b112ad21b418cdf51a9816d62f9f44746452739d421be24d50c" python2_pkg_sha256="c570f38b05dd8b112ad21b418cdf51a9816d62f9f44746452739d421be24d50c"
@@ -33,9 +33,7 @@ EOF
fi fi
# Close Finder window # Close Finder window
if is_Veertu; then close_finder_window
close_finder_window
fi
echo "Brew Installing Python 3" echo "Brew Installing Python 3"
brew_smart_install "python@3.12" brew_smart_install "python@3.12"

View File

@@ -18,7 +18,7 @@ CARGO_HOME=$HOME/.cargo
echo "Install common tools..." echo "Install common tools..."
rustup component add rustfmt clippy rustup component add rustfmt clippy
if is_BigSur || is_Monterey; then if is_Monterey; then
cargo install bindgen-cli cbindgen cargo-audit cargo-outdated cargo install bindgen-cli cbindgen cargo-audit cargo-outdated
fi fi

View File

@@ -7,14 +7,7 @@
source ~/utils/utils.sh source ~/utils/utils.sh
echo "Installing Swiftlint..." echo "Installing Swiftlint..."
if is_BigSur; then if is_Monterey; then
# SwiftLint now requires Swift 5.6 or higher to build, and macOS 12 or higher to run https://github.com/realm/SwiftLint/releases/tag/0.49.0
COMMIT=d1d5743344227fe6e3c37cfba19f0cfe15a9448a
FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/swiftlint.rb"
curl -fsSL $FORMULA_URL > $(find $(brew --repository) -name swiftlint.rb)
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install swiftlint
elif is_Monterey; then
# SwiftLint now requires Xcode 15.3 or higher to build https://github.com/realm/SwiftLint/releases/tag/0.55.1 # SwiftLint now requires Xcode 15.3 or higher to build https://github.com/realm/SwiftLint/releases/tag/0.55.1
COMMIT=d91dabd087cb0b906c92a825df9e5e5e1a4f59f8 COMMIT=d91dabd087cb0b906c92a825df9e5e5e1a4f59f8
FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/s/swiftlint.rb" FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/s/swiftlint.rb"

View File

@@ -53,7 +53,7 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+') $languageAndRuntime.AddToolVersionsListInline("NVM - Cached node versions", $(Get-NVMNodeVersionList), '^\d+')
} }
$languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion)) $languageAndRuntime.AddToolVersion("Perl", $(Get-PerlVersion))
if ((-not $os.IsBigSur) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
$languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion)) $languageAndRuntime.AddToolVersion("PHP", $(Get-PHPVersion))
} }
@@ -63,7 +63,7 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version)) $languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsBigSur)) { if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$languageAndRuntime.AddToolVersion("R", $(Get-RVersion)) $languageAndRuntime.AddToolVersion("R", $(Get-RVersion))
} }
@@ -74,7 +74,7 @@ $packageManagement = $installedSoftware.AddHeader("Package Management")
$packageManagement.AddToolVersion("Bundler", $(Get-BundlerVersion)) $packageManagement.AddToolVersion("Bundler", $(Get-BundlerVersion))
$packageManagement.AddToolVersion("Carthage", $(Get-CarthageVersion)) $packageManagement.AddToolVersion("Carthage", $(Get-CarthageVersion))
$packageManagement.AddToolVersion("CocoaPods", $(Get-CocoaPodsVersion)) $packageManagement.AddToolVersion("CocoaPods", $(Get-CocoaPodsVersion))
if ((-not $os.IsBigSur) -and (-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
$packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion)) $packageManagement.AddToolVersion("Composer", $(Get-ComposerVersion))
} }
$packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion)) $packageManagement.AddToolVersion("Homebrew", $(Get-HomebrewVersion))
@@ -118,17 +118,12 @@ $utilities.AddToolVersion("bazelisk", $(Get-BazeliskVersion))
$utilities.AddToolVersion("bsdtar", $(Get-BsdtarVersion)) $utilities.AddToolVersion("bsdtar", $(Get-BsdtarVersion))
$utilities.AddToolVersion("Curl", $(Get-CurlVersion)) $utilities.AddToolVersion("Curl", $(Get-CurlVersion))
$utilities.AddToolVersion("Git", $(Get-GitVersion)) $utilities.AddToolVersion("Git", $(Get-GitVersion))
if (-not $os.IsBigSur) { $utilities.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
$utilities.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
}
$utilities.AddToolVersion("GitHub CLI", $(Get-GitHubCLIVersion)) $utilities.AddToolVersion("GitHub CLI", $(Get-GitHubCLIVersion))
$utilities.AddToolVersion("GNU Tar", $(Get-GnuTarVersion)) $utilities.AddToolVersion("GNU Tar", $(Get-GnuTarVersion))
$utilities.AddToolVersion("GNU Wget", $(Get-WgetVersion)) $utilities.AddToolVersion("GNU Wget", $(Get-WgetVersion))
$utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion)) $utilities.AddToolVersion("gpg (GnuPG)", $(Get-GPGVersion))
if ($os.IsBigSur) { if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$utilities.AddToolVersion("helm", $(Get-HelmVersion))
}
if ((-not $os.IsBigSur) -and (-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion)) $utilities.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion))
} }
$utilities.AddToolVersion("jq", $(Get-JqVersion)) $utilities.AddToolVersion("jq", $(Get-JqVersion))
@@ -136,9 +131,6 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$utilities.AddToolVersion("mongo", $(Get-MongoVersion)) $utilities.AddToolVersion("mongo", $(Get-MongoVersion))
$utilities.AddToolVersion("mongod", $(Get-MongodVersion)) $utilities.AddToolVersion("mongod", $(Get-MongodVersion))
} }
if ($os.IsBigSur) {
$utilities.AddToolVersion("Newman", $(Get-NewmanVersion))
}
$utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion)) $utilities.AddToolVersion("OpenSSL", $(Get-OpenSSLVersion))
$utilities.AddToolVersion("Packer", $(Get-PackerVersion)) $utilities.AddToolVersion("Packer", $(Get-PackerVersion))
$utilities.AddToolVersion("pkg-config", $(Get-PKGConfigVersion)) $utilities.AddToolVersion("pkg-config", $(Get-PKGConfigVersion))
@@ -158,21 +150,14 @@ $utilities.AddToolVersion("zstd", $(Get-ZstdVersion))
# Tools # Tools
$tools = $installedSoftware.AddHeader("Tools") $tools = $installedSoftware.AddHeader("Tools")
if ($os.IsBigSur) {
$tools.AddToolVersion("Aliyun CLI", $(Get-AliyunCLIVersion))
}
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion)) $tools.AddToolVersion("App Center CLI", $(Get-AppCenterCLIVersion))
} }
$tools.AddToolVersion("AWS CLI", $(Get-AWSCLIVersion)) $tools.AddToolVersion("AWS CLI", $(Get-AWSCLIVersion))
if (-not $os.IsBigSur) { $tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
$tools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMCLIVersion))
}
$tools.AddToolVersion("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion)) $tools.AddToolVersion("AWS Session Manager CLI", $(Get-AWSSessionManagerCLIVersion))
if (-not $os.IsBigSur) { $tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion))
$tools.AddToolVersion("Azure CLI", $(Get-AzureCLIVersion)) $tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
$tools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion))
}
$tools.AddToolVersion("Bicep CLI", $(Get-BicepVersion)) $tools.AddToolVersion("Bicep CLI", $(Get-BicepVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$tools.AddToolVersion("Cabal", $(Get-CabalVersion)) $tools.AddToolVersion("Cabal", $(Get-CabalVersion))
@@ -193,13 +178,9 @@ $tools.AddToolVersion("SwiftFormat", $(Get-SwiftFormatVersion))
if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
$tools.AddToolVersion("Swig", $(Get-SwigVersion)) $tools.AddToolVersion("Swig", $(Get-SwigVersion))
} }
if (-not $os.IsBigSur) { $tools.AddToolVersion("Xcbeautify", $(Get-XcbeautifyVersion))
$tools.AddToolVersion("Xcbeautify", $(Get-XcbeautifyVersion))
}
$tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion)) $tools.AddToolVersion("Xcode Command Line Tools", $(Get-XcodeCommandLineToolsVersion))
if (-not $os.IsBigSur) { $tools.AddToolVersion("Xcodes", $(Get-XcodesVersion))
$tools.AddToolVersion("Xcodes", $(Get-XcodesVersion))
}
# Linters # Linters
$linters = $installedSoftware.AddHeader("Linters") $linters = $installedSoftware.AddHeader("Linters")
@@ -225,7 +206,6 @@ $toolcache = $installedSoftware.AddHeader("Cached Tools")
$toolcache.AddNodes($(Build-ToolcacheSection)) $toolcache.AddNodes($(Build-ToolcacheSection))
# Rust # Rust
if (-not $os.IsBigSur) {
$rust = $installedSoftware.AddHeader("Rust Tools") $rust = $installedSoftware.AddHeader("Rust Tools")
$rust.AddToolVersion("Cargo", $(Get-RustCargoVersion)) $rust.AddToolVersion("Cargo", $(Get-RustCargoVersion))
$rust.AddToolVersion("Rust", $(Get-RustVersion)) $rust.AddToolVersion("Rust", $(Get-RustVersion))
@@ -241,7 +221,6 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
} }
$rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion)) $rustPackages.AddToolVersion("Clippy", $(Get-RustClippyVersion))
$rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion)) $rustPackages.AddToolVersion("Rustfmt", $(Get-RustfmtVersion))
}
# PowerShell # PowerShell
$powerShell = $installedSoftware.AddHeader("PowerShell Tools") $powerShell = $installedSoftware.AddHeader("PowerShell Tools")
@@ -303,7 +282,7 @@ $android.AddTable($androidTable)
$androidEnv = $android.AddHeader("Environment variables") $androidEnv = $android.AddHeader("Environment variables")
$androidEnv.AddTable($(Build-AndroidEnvironmentTable)) $androidEnv.AddTable($(Build-AndroidEnvironmentTable))
if ($os.IsBigSur -or $os.IsMonterey) { if ($os.IsMonterey) {
$miscellaneous = $installedSoftware.AddHeader("Miscellaneous") $miscellaneous = $installedSoftware.AddHeader("Miscellaneous")
$miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion)) $miscellaneous.AddToolVersion("libXext", $(Get-LibXextVersion))
$miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion)) $miscellaneous.AddToolVersion("libXft", $(Get-LibXftVersion))

View File

@@ -367,11 +367,6 @@ function Get-BazeliskVersion {
return ($bazeliskVersion -replace "^bazelisk").Trim() return ($bazeliskVersion -replace "^bazelisk").Trim()
} }
function Get-HelmVersion {
$helmVersion = Run-Command "helm version --short"
return $helmVersion
}
function Get-MongoVersion { function Get-MongoVersion {
$mongo = Run-Command "mongo --version" | Select-String "MongoDB shell version" | Take-Part -Part 3 $mongo = Run-Command "mongo --version" | Select-String "MongoDB shell version" | Take-Part -Part 3
return $mongo.TrimStart("v").Trim() return $mongo.TrimStart("v").Trim()
@@ -397,11 +392,6 @@ function Get-BsdtarVersion {
return "$bsdtar - available by 'tar' alias" return "$bsdtar - available by 'tar' alias"
} }
function Get-NewmanVersion {
$newmanVersion = Run-Command "newman --version"
return $newmanVersion
}
function Get-VirtualBoxVersion { function Get-VirtualBoxVersion {
$virtualBox = Run-Command "vboxmanage -v" $virtualBox = Run-Command "vboxmanage -v"
return $virtualBox return $virtualBox
@@ -457,11 +447,6 @@ function Get-AWSSessionManagerCLIVersion {
return $awsSessionManagerVersion return $awsSessionManagerVersion
} }
function Get-AliyunCLIVersion {
$aliyunVersion = Run-Command "aliyun --version" | Select-String "Alibaba Cloud Command Line Interface Version " | Take-Part -Part 6
return $aliyunVersion
}
function Get-GHCupVersion { function Get-GHCupVersion {
$ghcUpVersion = (Run-Command "ghcup --version" | Take-Part -Part 5).Replace('v','') $ghcUpVersion = (Run-Command "ghcup --version" | Take-Part -Part 5).Replace('v','')
return $ghcUpVersion return $ghcUpVersion

View File

@@ -236,7 +236,7 @@ function Build-XcodeSupportToolsSection {
$xcversion = Run-Command "xcversion --version" | Select-String "^[0-9]" $xcversion = Run-Command "xcversion --version" | Select-String "^[0-9]"
$toolNodes += [ToolVersionNode]::new("xcpretty", $xcpretty) $toolNodes += [ToolVersionNode]::new("xcpretty", $xcpretty)
if ($os.IsBigSur -or $os.IsMonterey) { if ($os.IsMonterey) {
$toolNodes += [ToolVersionNode]::new("xcversion", $xcversion) $toolNodes += [ToolVersionNode]::new("xcversion", $xcversion)
} }
@@ -245,10 +245,5 @@ function Build-XcodeSupportToolsSection {
$nomadShenzhenOutput = Run-Command "ipa -version" $nomadShenzhenOutput = Run-Command "ipa -version"
$nomadShenzhen = [regex]::matches($nomadShenzhenOutput, "(\d+.){2}\d+").Value $nomadShenzhen = [regex]::matches($nomadShenzhenOutput, "(\d+.){2}\d+").Value
if ($os.IsBigSur) {
$toolNodes += [ToolVersionNode]::new("Nomad CLI", $nomadCLI)
$toolNodes += [ToolVersionNode]::new("Nomad shenzhen CLI", $nomadShenzhen)
}
return $toolNodes return $toolNodes
} }

View File

@@ -29,7 +29,6 @@ function Get-OSVersion {
Version = $osVersion.Version Version = $osVersion.Version
Platform = $osVersion.Platform Platform = $osVersion.Platform
IsArm64 = $processorArchitecture -eq "arm64" IsArm64 = $processorArchitecture -eq "arm64"
IsBigSur = $osVersion.Version.Major -eq "11"
IsMonterey = $osVersion.Version.Major -eq "12" IsMonterey = $osVersion.Version.Major -eq "12"
IsVentura = $($osVersion.Version.Major -eq "13") IsVentura = $($osVersion.Version.Major -eq "13")
IsVenturaArm64 = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -eq "arm64") IsVenturaArm64 = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -eq "arm64")
@@ -104,10 +103,6 @@ function Invoke-DownloadWithRetry {
return $Path return $Path
} }
function isVeertu {
return (Test-Path -Path "/Library/Application Support/Veertu")
}
function Get-Architecture { function Get-Architecture {
$arch = arch $arch = arch
if ($arch -ne "arm64") { if ($arch -ne "arm64") {

View File

@@ -73,14 +73,6 @@ is_Monterey() {
[ "$OSTYPE" = "darwin21" ] [ "$OSTYPE" = "darwin21" ]
} }
is_BigSur() {
[ "$OSTYPE" = "darwin20" ]
}
is_Veertu() {
[[ -d "/Library/Application Support/Veertu" ]]
}
get_toolset_value() { get_toolset_value() {
local toolset_path=$(echo "$IMAGE_FOLDER/toolset.json") local toolset_path=$(echo "$IMAGE_FOLDER/toolset.json")
local query=$1 local query=$1

View File

@@ -57,7 +57,7 @@ Describe "Android" {
Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" Sdkmanager = "$env:ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
} }
) )
if ($os.IsBigSur -or $os.IsMonterey) { if ($os.IsMonterey) {
$testCases += @( $testCases += @(
@{ @{
PackageName = "SDK tools" PackageName = "SDK tools"

View File

@@ -2,13 +2,13 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion $os = Get-OSVersion
Describe "Azure CLI" -Skip:($os.IsBigSur) { Describe "Azure CLI" {
It "Azure CLI" { It "Azure CLI" {
"az -v" | Should -ReturnZeroExitCode "az -v" | Should -ReturnZeroExitCode
} }
} }
Describe "Azure DevOps CLI" -Skip:($os.IsBigSur) { Describe "Azure DevOps CLI" {
It "az devops" { It "az devops" {
"az devops -h" | Should -ReturnZeroExitCode "az devops -h" | Should -ReturnZeroExitCode
} }
@@ -62,12 +62,6 @@ Describe "Perl" {
} }
} }
Describe "Helm" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsSonoma) {
It "Helm" {
"helm version --short" | Should -ReturnZeroExitCode
}
}
Describe "Tcl/Tk" { Describe "Tcl/Tk" {
It "libtcl" { It "libtcl" {
"file /usr/local/lib/libtcl8.6.dylib" | Should -ReturnZeroExitCode "file /usr/local/lib/libtcl8.6.dylib" | Should -ReturnZeroExitCode
@@ -117,12 +111,6 @@ Describe "bazel" {
} }
} }
Describe "Aliyun CLI" -Skip:($os.IsMonterey -or $os.IsVentura -or $os.IsSonoma) {
It "Aliyun CLI" {
"aliyun --version" | Should -ReturnZeroExitCode
}
}
Describe "Julia" -Skip:($os.IsVentura -or $os.IsSonoma) { Describe "Julia" -Skip:($os.IsVentura -or $os.IsSonoma) {
It "Julia" { It "Julia" {
"julia --version" | Should -ReturnZeroExitCode "julia --version" | Should -ReturnZeroExitCode
@@ -147,19 +135,19 @@ Describe "wget" {
} }
} }
Describe "vagrant" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { Describe "vagrant" -Skip:($os.IsVentura -or $os.IsSonoma) {
It "vagrant" { It "vagrant" {
"vagrant --version" | Should -ReturnZeroExitCode "vagrant --version" | Should -ReturnZeroExitCode
} }
} }
Describe "virtualbox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { Describe "virtualbox" -Skip:($os.IsVentura -or $os.IsSonoma) {
It "virtualbox" { It "virtualbox" {
"vboxmanage -v" | Should -ReturnZeroExitCode "vboxmanage -v" | Should -ReturnZeroExitCode
} }
} }
Describe "R" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsBigSur) { Describe "R" -Skip:($os.IsVentura -or $os.IsSonoma) {
It "R" { It "R" {
"R --version" | Should -ReturnZeroExitCode "R --version" | Should -ReturnZeroExitCode
} }
@@ -191,7 +179,7 @@ Describe "yq" {
} }
} }
Describe "imagemagick" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { Describe "imagemagick" -Skip:($os.IsVentura -or $os.IsSonoma) {
It "imagemagick" { It "imagemagick" {
"magick -version" | Should -ReturnZeroExitCode "magick -version" | Should -ReturnZeroExitCode
} }

View File

@@ -43,7 +43,7 @@ Describe "AWS" {
It "AWS CLI" { It "AWS CLI" {
"aws --version" | Should -ReturnZeroExitCode "aws --version" | Should -ReturnZeroExitCode
} }
It "AWS SAM CLI" -Skip:($os.IsBigSur) { It "AWS SAM CLI" {
"sam --version" | Should -ReturnZeroExitCode "sam --version" | Should -ReturnZeroExitCode
} }
@@ -123,7 +123,7 @@ Describe "Go" -Skip:($os.IsVentura -or $os.IsSonoma) {
} }
} }
Describe "VirtualBox" -Skip:($os.IsBigSur -or $os.IsVentura -or $os.IsSonoma) { Describe "VirtualBox" -Skip:($os.IsVentura -or $os.IsSonoma) {
It "Check kext kernel modules" { It "Check kext kernel modules" {
kextstat | Out-String | Should -Match "org.virtualbox.kext" kextstat | Out-String | Should -Match "org.virtualbox.kext"
} }

View File

@@ -6,7 +6,7 @@ Describe "Git" {
It "git is installed" { It "git is installed" {
"git --version" | Should -ReturnZeroExitCode "git --version" | Should -ReturnZeroExitCode
} }
It "git lfs is installed" -Skip:($os.IsBigSur) { It "git lfs is installed" {
"git lfs version" | Should -ReturnZeroExitCode "git lfs version" | Should -ReturnZeroExitCode
} }
} }

View File

@@ -3,7 +3,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion $os = Get-OSVersion
Describe "PHP" { Describe "PHP" {
Context "PHP" -Skip:($os.IsBigSur -or $os.IsVenturaArm64 -or $os.IsSonomaArm64) { Context "PHP" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
It "PHP Path" { It "PHP Path" {
Get-ToolPath "php" | Should -Not -BeLike "/usr/bin/php*" Get-ToolPath "php" | Should -Not -BeLike "/usr/bin/php*"
} }
@@ -14,7 +14,7 @@ Describe "PHP" {
} }
} }
Context "Composer" -Skip:($os.IsBigSur -or $os.IsVenturaArm64 -or $os.IsSonomaArm64) { Context "Composer" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
It "Composer" { It "Composer" {
"composer --version" | Should -ReturnZeroExitCode "composer --version" | Should -ReturnZeroExitCode
} }

View File

@@ -2,7 +2,7 @@ Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion $os = Get-OSVersion
Describe "Rust" -Skip:($os.IsBigSur) { Describe "Rust" {
Context "Rust" { Context "Rust" {
It "Rustup is installed" { It "Rustup is installed" {
"rustup --version" | Should -ReturnZeroExitCode "rustup --version" | Should -ReturnZeroExitCode

View File

@@ -35,23 +35,8 @@ Describe "Audio device" -Skip:($os.IsVentura -or $os.IsSonoma) {
} }
} }
Describe "Screen Resolution" -Skip:(isVeertu) {
It "Screen Resolution" {
system_profiler SPDisplaysDataType | Select-String "Resolution" | Should -Match "1176 x 885|1920 x 1080"
}
}
Describe "Open windows" -Skip:(isVeertu) {
It "Opened windows not found" {
'tell application id "com.apple.systemevents" to get every window of (every process whose class of windows contains window)' | Tee-Object /tmp/windows.osascript
$cmd = "osascript /tmp/windows.osascript"
$openWindows = bash -c $cmd
$openWindows.Split(",").Trim() | Where-Object { $_ -notmatch "NotificationCenter" } | Should -BeNullOrEmpty
}
}
Describe "AutomationModeTool" { Describe "AutomationModeTool" {
It "Does not require user authentication" -Skip:($os.IsBigSur) { It "Does not require user authentication" {
automationmodetool | Out-String | Should -Match "DOES NOT REQUIRE" automationmodetool | Out-String | Should -Match "DOES NOT REQUIRE"
} }
} }

View File

@@ -8,7 +8,7 @@ if ($os.IsVentura -or $os.IsSonoma) {
$XAMARIN_IOS_VERSIONS = @() $XAMARIN_IOS_VERSIONS = @()
$XAMARIN_MAC_VERSIONS = @() $XAMARIN_MAC_VERSIONS = @()
$XAMARIN_ANDROID_VERSIONS = @() $XAMARIN_ANDROID_VERSIONS = @()
} elseif ($os.IsBigSur -or $os.IsMonterey) { } elseif ($os.IsMonterey) {
$MONO_VERSIONS = (Get-ToolsetContent).xamarin.mono_versions $MONO_VERSIONS = (Get-ToolsetContent).xamarin.mono_versions
$XAMARIN_IOS_VERSIONS = (Get-ToolsetContent).xamarin.ios_versions $XAMARIN_IOS_VERSIONS = (Get-ToolsetContent).xamarin.ios_versions
$XAMARIN_MAC_VERSIONS = (Get-ToolsetContent).xamarin.mac_versions $XAMARIN_MAC_VERSIONS = (Get-ToolsetContent).xamarin.mac_versions

View File

@@ -1,307 +0,0 @@
packer {
required_plugins {
vsphere = {
source = "github.com/hashicorp/vsphere"
version = "~> 1"
}
}
}
locals {
image_folder = "/Users/${var.vm_username}/image-generation"
}
variable "baseimage_name" {
type = string
}
variable "build_id" {
type = string
}
variable "cluster_or_esxi_host" {
type = string
}
variable "esxi_datastore" {
type = string
}
variable "github_api_pat" {
type = string
default = ""
sensitive = true
}
variable "image_os" {
type = string
default = "macos11"
}
variable "output_folder" {
type = string
}
variable "vcenter_datacenter" {
type = string
}
variable "vcenter_password" {
type = string
sensitive = true
}
variable "vcenter_server" {
type = string
}
variable "vcenter_username" {
type = string
sensitive = true
}
variable "vm_password" {
type = string
sensitive = true
}
variable "vm_username" {
type = string
sensitive = true
}
variable "xcode_install_sas" {
type = string
sensitive = true
}
variable "xcode_install_storage_url" {
type = string
sensitive = true
}
source "vsphere-clone" "template" {
CPUs = "5"
NestedHV = "true"
RAM = "24576"
cpu_cores = "5"
datacenter = "${var.vcenter_datacenter}"
datastore = "${var.esxi_datastore}"
folder = "${var.output_folder}"
host = "${var.cluster_or_esxi_host}"
insecure_connection = true
password = "${var.vcenter_password}"
shutdown_timeout = "15m"
ssh_password = "${var.vm_password}"
ssh_username = "${var.vm_username}"
template = "${var.baseimage_name}"
username = "${var.vcenter_username}"
vcenter_server = "${var.vcenter_server}"
vm_name = "${var.build_id}"
}
build {
sources = ["source.vsphere-clone.template"]
provisioner "shell" {
inline = ["mkdir ${local.image_folder}"]
}
provisioner "file" {
destination = "${local.image_folder}/"
sources = [
"${path.root}/../assets/xamarin-selector",
"${path.root}/../scripts/tests",
"${path.root}/../scripts/docs-gen",
"${path.root}/../scripts/helpers"
]
}
provisioner "file" {
destination = "${local.image_folder}/docs-gen/"
source = "${path.root}/../../../helpers/software-report-base"
}
provisioner "file" {
destination = "${local.image_folder}/add-certificate.swift"
source = "${path.root}/../assets/add-certificate.swift"
}
provisioner "file" {
destination = "~/.bashrc"
source = "${path.root}/../assets/bashrc"
}
provisioner "file" {
destination = "~/.bash_profile"
source = "${path.root}/../assets/bashprofile"
}
provisioner "shell" {
inline = [ "mkdir ~/bootstrap" ]
}
provisioner "file" {
destination = "~/bootstrap"
source = "${path.root}/../assets/bootstrap-provisioner/"
}
provisioner "file" {
destination = "${local.image_folder}/toolset.json"
source = "${path.root}/../toolsets/toolset-11.json"
}
provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
inline = [
"mv ${local.image_folder}/docs-gen ${local.image_folder}/software-report",
"mv ${local.image_folder}/xamarin-selector ${local.image_folder}/assets",
"mkdir ~/utils",
"mv ${local.image_folder}/helpers/confirm-identified-developers.scpt ~/utils",
"mv ${local.image_folder}/helpers/invoke-tests.sh ~/utils",
"mv ${local.image_folder}/helpers/utils.sh ~/utils",
"mv ${local.image_folder}/helpers/xamarin-utils.sh ~/utils"
]
}
provisioner "shell" {
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/install-xcode-clt.sh",
"${path.root}/../scripts/build/install-homebrew.sh"
]
}
provisioner "shell" {
environment_vars = ["PASSWORD=${var.vm_password}", "USERNAME=${var.vm_username}"]
execute_command = "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/install-xcode-clt.sh",
"${path.root}/../scripts/build/configure-network-interface-detection.sh",
"${path.root}/../scripts/build/configure-autologin.sh",
"${path.root}/../scripts/build/configure-auto-updates.sh",
"${path.root}/../scripts/build/configure-screensaver.sh",
"${path.root}/../scripts/build/configure-ntpconf.sh",
"${path.root}/../scripts/build/configure-max-files-limitation.sh",
"${path.root}/../scripts/build/configure-shell.sh"
]
}
provisioner "shell" {
environment_vars = ["IMAGE_VERSION=${var.build_id}", "IMAGE_OS=${var.image_os}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/configure-preimagedata.sh",
"${path.root}/../scripts/build/configure-ssh.sh",
"${path.root}/../scripts/build/configure-machine.sh"
]
}
provisioner "shell" {
execute_command = "sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
}
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
scripts = [
"${path.root}/../scripts/build/configure-windows.sh",
"${path.root}/../scripts/build/install-powershell.sh",
"${path.root}/../scripts/build/install-dotnet.sh",
"${path.root}/../scripts/build/install-python.sh",
"${path.root}/../scripts/build/install-azcopy.sh",
"${path.root}/../scripts/build/install-openssl.sh",
"${path.root}/../scripts/build/install-ruby.sh",
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-mongodb.sh",
"${path.root}/../scripts/build/install-node.sh"
]
}
provisioner "shell" {
environment_vars = ["XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_SAS=${var.xcode_install_sas}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}"
script = "${path.root}/../scripts/build/Install-Xcode.ps1"
}
provisioner "shell" {
execute_command = "sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
}
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/install-actions-cache.sh",
"${path.root}/../scripts/build/install-common-utils.sh",
"${path.root}/../scripts/build/install-llvm.sh",
"${path.root}/../scripts/build/install-golang.sh",
"${path.root}/../scripts/build/install-swiftlint.sh",
"${path.root}/../scripts/build/install-openjdk.sh",
"${path.root}/../scripts/build/install-aws-tools.sh",
"${path.root}/../scripts/build/install-gcc.sh",
"${path.root}/../scripts/build/install-haskell.sh",
"${path.root}/../scripts/build/install-cocoapods.sh",
"${path.root}/../scripts/build/install-android-sdk.sh",
"${path.root}/../scripts/build/install-xamarin.sh",
"${path.root}/../scripts/build/install-visualstudio.sh",
"${path.root}/../scripts/build/install-nvm.sh",
"${path.root}/../scripts/build/install-apache.sh",
"${path.root}/../scripts/build/install-nginx.sh",
"${path.root}/../scripts/build/install-postgresql.sh",
"${path.root}/../scripts/build/install-audiodevice.sh",
"${path.root}/../scripts/build/install-vcpkg.sh",
"${path.root}/../scripts/build/install-miniconda.sh",
"${path.root}/../scripts/build/install-safari.sh",
"${path.root}/../scripts/build/install-chrome.sh",
"${path.root}/../scripts/build/install-edge.sh",
"${path.root}/../scripts/build/install-firefox.sh",
"${path.root}/../scripts/build/install-pypy.sh",
"${path.root}/../scripts/build/install-pipx-packages.sh",
"${path.root}/../scripts/build/install-bicep.sh",
"${path.root}/../scripts/build/install-codeql-bundle.sh"
]
}
provisioner "shell" {
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/Install-Toolset.ps1",
"${path.root}/../scripts/build/Configure-Toolset.ps1"
]
}
provisioner "shell" {
execute_command = "ruby {{ .Path }}"
script = "${path.root}/../scripts/build/configure-xcode-simulators.rb"
}
provisioner "shell" {
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
inline = [
"pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}",
"pwsh -File \"${local.image_folder}/tests/RunAll-Tests.ps1\""
]
}
provisioner "file" {
destination = "${path.root}/../../image-output/"
direction = "download"
source = "${local.image_folder}/output/*"
}
provisioner "shell" {
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/configure-hostname.sh",
"${path.root}/../scripts/build/configure-system.sh"
]
}
}

View File

@@ -1,313 +0,0 @@
packer {
required_plugins {
vsphere = {
source = "github.com/hashicorp/vsphere"
version = "~> 1"
}
}
}
locals {
image_folder = "/Users/${var.vm_username}/image-generation"
}
variable "baseimage_name" {
type = string
}
variable "build_id" {
type = string
}
variable "cluster_or_esxi_host" {
type = string
}
variable "esxi_datastore" {
type = string
}
variable "github_api_pat" {
type = string
default = ""
sensitive = true
}
variable "image_os" {
type = string
default = "macos12"
}
variable "output_folder" {
type = string
}
variable "vcenter_datacenter" {
type = string
}
variable "vcenter_password" {
type = string
sensitive = true
}
variable "vcenter_server" {
type = string
}
variable "vcenter_username" {
type = string
sensitive = true
}
variable "vm_password" {
type = string
sensitive = true
}
variable "vm_username" {
type = string
sensitive = true
}
variable "xcode_install_sas" {
type = string
sensitive = true
}
variable "xcode_install_storage_url" {
type = string
sensitive = true
}
source "vsphere-clone" "template" {
CPUs = "5"
NestedHV = "true"
RAM = "24576"
cpu_cores = "5"
datacenter = "${var.vcenter_datacenter}"
datastore = "${var.esxi_datastore}"
folder = "${var.output_folder}"
host = "${var.cluster_or_esxi_host}"
insecure_connection = true
password = "${var.vcenter_password}"
shutdown_timeout = "15m"
ssh_password = "${var.vm_password}"
ssh_username = "${var.vm_username}"
template = "${var.baseimage_name}"
username = "${var.vcenter_username}"
vcenter_server = "${var.vcenter_server}"
vm_name = "${var.build_id}"
}
build {
sources = ["source.vsphere-clone.template"]
provisioner "shell" {
inline = ["mkdir ${local.image_folder}"]
}
provisioner "file" {
destination = "${local.image_folder}/"
sources = [
"${path.root}/../assets/xamarin-selector",
"${path.root}/../scripts/tests",
"${path.root}/../scripts/docs-gen",
"${path.root}/../scripts/helpers"
]
}
provisioner "file" {
destination = "${local.image_folder}/docs-gen/"
source = "${path.root}/../../../helpers/software-report-base"
}
provisioner "file" {
destination = "${local.image_folder}/add-certificate.swift"
source = "${path.root}/../assets/add-certificate.swift"
}
provisioner "file" {
destination = "~/.bashrc"
source = "${path.root}/../assets/bashrc"
}
provisioner "file" {
destination = "~/.bash_profile"
source = "${path.root}/../assets/bashprofile"
}
provisioner "shell" {
inline = [ "mkdir ~/bootstrap" ]
}
provisioner "file" {
destination = "~/bootstrap"
source = "${path.root}/../assets/bootstrap-provisioner/"
}
provisioner "file" {
destination = "${local.image_folder}/toolset.json"
source = "${path.root}/../toolsets/toolset-12.json"
}
provisioner "shell" {
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
inline = [
"mv ${local.image_folder}/docs-gen ${local.image_folder}/software-report",
"mv ${local.image_folder}/xamarin-selector ${local.image_folder}/assets",
"mkdir ~/utils",
"mv ${local.image_folder}/helpers/confirm-identified-developers.scpt ~/utils",
"mv ${local.image_folder}/helpers/invoke-tests.sh ~/utils",
"mv ${local.image_folder}/helpers/utils.sh ~/utils",
"mv ${local.image_folder}/helpers/xamarin-utils.sh ~/utils"
]
}
provisioner "shell" {
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/install-xcode-clt.sh",
"${path.root}/../scripts/build/install-homebrew.sh"
]
}
provisioner "shell" {
environment_vars = ["PASSWORD=${var.vm_password}", "USERNAME=${var.vm_username}"]
execute_command = "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/configure-network-interface-detection.sh",
"${path.root}/../scripts/build/configure-autologin.sh",
"${path.root}/../scripts/build/configure-auto-updates.sh",
"${path.root}/../scripts/build/configure-screensaver.sh",
"${path.root}/../scripts/build/configure-ntpconf.sh",
"${path.root}/../scripts/build/configure-max-files-limitation.sh",
"${path.root}/../scripts/build/configure-shell.sh"
]
}
provisioner "shell" {
environment_vars = ["IMAGE_VERSION=${var.build_id}", "IMAGE_OS=${var.image_os}", "PASSWORD=${var.vm_password}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/configure-preimagedata.sh",
"${path.root}/../scripts/build/configure-ssh.sh",
"${path.root}/../scripts/build/configure-machine.sh"
]
}
provisioner "shell" {
execute_command = "sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
}
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "USER_PASSWORD=${var.vm_password}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
scripts = [
"${path.root}/../scripts/build/configure-windows.sh",
"${path.root}/../scripts/build/install-powershell.sh",
"${path.root}/../scripts/build/install-dotnet.sh",
"${path.root}/../scripts/build/install-python.sh",
"${path.root}/../scripts/build/install-azcopy.sh",
"${path.root}/../scripts/build/install-openssl.sh",
"${path.root}/../scripts/build/install-ruby.sh",
"${path.root}/../scripts/build/install-rubygems.sh",
"${path.root}/../scripts/build/install-git.sh",
"${path.root}/../scripts/build/install-mongodb.sh",
"${path.root}/../scripts/build/install-node.sh",
"${path.root}/../scripts/build/install-common-utils.sh"
]
}
provisioner "shell" {
environment_vars = ["XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_SAS=${var.xcode_install_sas}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}"
script = "${path.root}/../scripts/build/Install-Xcode.ps1"
}
provisioner "shell" {
execute_command = "sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
}
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/install-actions-cache.sh",
"${path.root}/../scripts/build/install-llvm.sh",
"${path.root}/../scripts/build/install-golang.sh",
"${path.root}/../scripts/build/install-swiftlint.sh",
"${path.root}/../scripts/build/install-openjdk.sh",
"${path.root}/../scripts/build/install-php.sh",
"${path.root}/../scripts/build/install-aws-tools.sh",
"${path.root}/../scripts/build/install-rust.sh",
"${path.root}/../scripts/build/install-gcc.sh",
"${path.root}/../scripts/build/install-haskell.sh",
"${path.root}/../scripts/build/install-cocoapods.sh",
"${path.root}/../scripts/build/install-android-sdk.sh",
"${path.root}/../scripts/build/install-xamarin.sh",
"${path.root}/../scripts/build/install-visualstudio.sh",
"${path.root}/../scripts/build/install-nvm.sh",
"${path.root}/../scripts/build/install-apache.sh",
"${path.root}/../scripts/build/install-nginx.sh",
"${path.root}/../scripts/build/install-postgresql.sh",
"${path.root}/../scripts/build/install-audiodevice.sh",
"${path.root}/../scripts/build/install-vcpkg.sh",
"${path.root}/../scripts/build/install-miniconda.sh",
"${path.root}/../scripts/build/install-safari.sh",
"${path.root}/../scripts/build/install-chrome.sh",
"${path.root}/../scripts/build/install-edge.sh",
"${path.root}/../scripts/build/install-firefox.sh",
"${path.root}/../scripts/build/install-pypy.sh",
"${path.root}/../scripts/build/install-pipx-packages.sh",
"${path.root}/../scripts/build/install-bicep.sh",
"${path.root}/../scripts/build/install-codeql-bundle.sh"
]
}
provisioner "shell" {
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/Install-Toolset.ps1",
"${path.root}/../scripts/build/Configure-Toolset.ps1"
]
}
provisioner "shell" {
execute_command = "ruby {{ .Path }}"
script = "${path.root}/../scripts/build/configure-xcode-simulators.rb"
}
provisioner "shell" {
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}"
script = "${path.root}/../scripts/build/Update-XcodeSimulators.ps1"
}
provisioner "shell" {
environment_vars = ["IMAGE_FOLDER=${local.image_folder}"]
inline = [
"pwsh -File \"${local.image_folder}/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"${local.image_folder}/output/software-report\" -ImageName ${var.build_id}",
"pwsh -File \"${local.image_folder}/tests/RunAll-Tests.ps1\""
]
}
provisioner "file" {
destination = "${path.root}/../../image-output/"
direction = "download"
source = "${local.image_folder}/output/*"
}
provisioner "shell" {
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}"
scripts = [
"${path.root}/../scripts/build/configure-hostname.sh",
"${path.root}/../scripts/build/configure-system.sh"
]
}
}

View File

@@ -6,6 +6,8 @@
- `link` property points to the place where Xcode will be located on image. `/Applications/Xcode_<link>.app` - `link` property points to the place where Xcode will be located on image. `/Applications/Xcode_<link>.app`
- `version` points to Xcode version that will be downloaded and installed - `version` points to Xcode version that will be downloaded and installed
- `symlinks` describes the list of aliases where symlinks will be created to - `symlinks` describes the list of aliases where symlinks will be created to
- `install_runtimes` is boolean function to control over the related simulator runtimes
- `sha256` used to check integrity of the Xcode installer file
- `default` - version of Xcode to set as default (should be metched with any `link` in `versions` property) - `default` - version of Xcode to set as default (should be metched with any `link` in `versions` property)
**Example:** `"11.2"` **Example:** `"11.2"`
@@ -22,8 +24,8 @@
```json ```json
"versions": [ "versions": [
{ "link": "12.2", "version": "12.2.0" }, { "link": "16_beta_4", "version": "16.0.0-Beta.4+16A5211f", "symlinks": ["16.0"], "install_runtimes": "false", "sha256": "4270cd8021b2f7f512ce91bfc4423b25bccab36cdab21834709d798c8daade72"},
{ "link": "11.7", "version": "11.7.0", "symlinks": ["11.7_beta"] } { "link": "15.4", "version": "15.4.0+15F31d", "install_runtimes": "true", "sha256": "82d3d61804ff3f4c7c82085e91dc701037ddaa770e542848b2477e22f4e8aa7a"}
] ]
``` ```

View File

@@ -1,358 +0,0 @@
{
"xcode": {
"default": "13.2.1",
"x64": {
"versions": [
{ "link": "13.2.1", "version": "13.2.1+13C100", "symlinks": ["13.2"], "sha256": "D3BFCC6225D531587490C0DFC0926C80B7D50D17671DC8F25868F965F5D65F9D" },
{ "link": "13.1", "version": "13.1.0+13A1030d", "sha256": "4EFDEEA0EEEDA1957BB394128CCCD1DAAC3CB0A3D074224E0FAB90855CCA09C4" },
{ "link": "13.0", "version": "13.0.0+13A233", "sha256": "1D8257750A4E0333A2B372B32381BE5EC9B29704C8A0D44CE2E6D26D1CF4301E" },
{ "link": "12.5.1", "version": "12.5.1+12E507", "symlinks": ["12.5"], "sha256": "2592BF58E654440B3DF7062219DBBD24BDF345FAE6BA000756D6D5B1166A7168" },
{ "link": "12.4", "version": "12.4.0+12D4e", "sha256": "CC8D10155258F9DDAA5E422AB8F50E6058758C95208E58E59B5DB1DB033CE2FF" },
{ "link": "11.7", "version": "11.7.0-GM+11E801a", "symlinks": ["11.7_beta"], "sha256": "A53FDEAB92326CD9BF93A1B5FAE01E3D658B04DA60DFF5DE74141CABA0808B03" }
]
}
},
"xamarin": {
"vsmac": {
"default": "2022",
"versions": [ "2019", "2022" ]
},
"mono_versions": [
"6.12.0.188"
],
"ios_versions": [
"15.8.0.3", "15.6.0.3", "15.4.0.0", "15.2.0.17", "15.0.0.6", "14.20.0.24", "14.16.0.5", "14.14.2.5", "14.10.0.4", "14.8.0.3", "14.6.0.15", "14.4.1.3", "14.2.0.12", "14.0.0.0", "13.20.2.2"
],
"mac_versions": [
"8.8.0.3", "8.6.0.3", "8.4.0.0", "8.2.0.17", "7.14.0.27", "7.10.0.5", "7.8.2.5", "7.4.0.10", "7.2.0.3", "7.0.0.15", "6.22.1.26", "6.20.2.2"
],
"android_versions": [
"12.2.8.3", "12.1.0.2", "12.0.0.3", "11.3.0.4", "11.2.2.1", "11.1.0.26", "11.0.2.0"
],
"bundle_default": "6_12_12",
"bundles": [
{
"symlink": "6_12_16",
"mono":"6.12",
"ios": "15.8",
"mac": "8.8",
"android": "12.2"
},
{
"symlink": "6_12_15",
"mono":"6.12",
"ios": "15.8",
"mac": "8.8",
"android": "12.1"
},
{
"symlink": "6_12_14",
"mono":"6.12",
"ios": "15.8",
"mac": "8.8",
"android": "12.0"
},
{
"symlink": "6_12_13",
"mono":"6.12",
"ios": "15.6",
"mac": "8.6",
"android": "12.0"
},
{
"symlink": "6_12_12",
"mono":"6.12",
"ios": "15.4",
"mac": "8.4",
"android": "12.0"
},
{
"symlink": "6_12_11",
"mono":"6.12",
"ios": "15.2",
"mac": "8.2",
"android": "12.0"
},
{
"symlink": "6_12_10",
"mono":"6.12",
"ios": "15.0",
"mac": "7.14",
"android": "11.3"
},
{
"symlink": "6_12_9",
"mono":"6.12",
"ios": "14.20",
"mac": "7.14",
"android": "11.3"
},
{
"symlink": "6_12_8",
"mono":"6.12",
"ios": "14.16",
"mac": "7.10",
"android": "11.2"
},
{
"symlink": "6_12_7",
"mono":"6.12",
"ios": "14.14",
"mac": "7.8",
"android": "11.2"
},
{
"symlink": "6_12_6",
"mono":"6.12",
"ios": "14.10",
"mac": "7.4",
"android": "11.1"
},
{
"symlink": "6_12_5",
"mono":"6.12",
"ios": "14.8",
"mac": "7.2",
"android": "11.1"
},
{
"symlink": "6_12_4",
"mono":"6.12",
"ios": "14.6",
"mac": "7.0",
"android": "11.1"
},
{
"symlink": "6_12_3",
"mono":"6.12",
"ios": "14.4",
"mac": "6.22",
"android": "11.1"
},
{
"symlink": "6_12_2",
"mono":"6.12",
"ios": "14.2",
"mac": "6.20",
"android": "11.0"
},
{
"symlink": "6_12_1",
"mono":"6.12",
"ios": "14.0",
"mac": "6.20",
"android": "11.0"
},
{
"symlink": "6_12_0",
"mono":"6.12",
"ios": "13.20",
"mac": "6.20",
"android": "11.0"
}
]
},
"java": {
"x64": {
"default": "8",
"versions": [ "8", "11", "17", "21"]
}
},
"android": {
"cmdline-tools": "commandlinetools-mac-9123335_latest.zip",
"platform_min_version": "31",
"build_tools_min_version": "31.0.0",
"extras": [
"android;m2repository", "google;m2repository", "google;google_play_services"
],
"addons": [],
"additional_tools": [
"cmake;3.10.2.4988404",
"cmake;3.18.1",
"cmake;3.22.1"
],
"ndk": {
"default": "25",
"versions": [
"24", "25", "26"
]
}
},
"powershellModules": [
{"name": "Az"},
{"name": "MarkdownPS"},
{"name": "Pester"},
{"name": "PSScriptAnalyzer"}
],
"npm": {
"global_packages": [
{ "name": "appcenter-cli", "test": "appcenter --version" },
{ "name": "newman", "test": "newman --version" }
]
},
"brew": {
"common_packages": [
"aliyun-cli",
"ant",
"aria2",
"bazelisk",
"carthage",
"cmake",
"colima",
"gh",
"gnupg",
"gnu-tar",
"helm",
"kotlin",
"libpq",
"p7zip",
"packer",
"perl",
"pkg-config",
"sbt",
"subversion",
"swiftformat",
"swig",
"zstd",
"zlib",
"libxext",
"libxft",
"tcl-tk"
],
"cask_packages": [
"julia"
]
},
"gcc": {
"versions": [
"10",
"11",
"12"
]
},
"toolcache": [
{
"name": "Python",
"url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json",
"platform" : "darwin",
"arch": {
"x64": {
"versions": [
"3.7.*",
"3.8.*",
"3.9.*",
"3.10.*",
"3.11.*",
"3.12.*"
]
}
}
},
{
"name": "PyPy",
"platform" : "darwin",
"arch": {
"x64": {
"versions": [
"2.7",
"3.7",
"3.8",
"3.9",
"3.10"
]
}
}
},
{
"name": "Node",
"url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json",
"platform" : "darwin",
"arch": {
"x64": {
"versions": [
"16.*",
"18.*",
"20.*"
]
}
}
},
{
"name": "Go",
"url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json",
"platform" : "darwin",
"arch": {
"x64": {
"variable_template" : "GOROOT_{0}_{1}_X64",
"versions": [
"1.20.*",
"1.21.*"
]
}
}
},
{
"name": "Ruby",
"arch": {
"x64": {
"versions": [
"3.0.*",
"3.1.*"
]
}
}
}
],
"pipx": [
{
"package": "yamllint",
"cmd": "yamllint --version"
}
],
"dotnet": {
"arch":{
"x64": {
"versions": [
"6.0",
"7.0",
"8.0"
]
}
}
},
"ruby": {
"default": "3.0",
"rubygems": [
"xcode-install",
"cocoapods",
"nomad-cli",
"xcpretty",
"bundler",
"fastlane",
"jazzy"
]
},
"go": {
"default": "1.21"
},
"node": {
"default": "18",
"nvm_versions": [
"16",
"18",
"20"
]
},
"llvm": {
"version": "15"
},
"mongodb": {
"version": "5.0"
},
"postgresql": {
"version": "14"
},
"pwsh": {
"version": "7.4"
}
}