mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-29 01:53:54 +03:00
chore: consolidate xcode versions across operating systems and builds (#13708)
A single place with all listed required xcode versions makes it easier to manage XCode on bots.
This commit is contained in:
parent
8e5854033a
commit
3b159b45ff
@ -56,8 +56,7 @@ compile_chromium() {
|
||||
source "${SCRIPT_FOLDER}/ensure_depot_tools.sh"
|
||||
|
||||
if is_mac; then
|
||||
# As of Apr, 2022 Chromium mac compilation requires Xcode13.3
|
||||
selectXcodeVersionOrDie "13.3"
|
||||
selectXcodeVersionOrDie $(node "${SCRIPT_FOLDER}/../get_xcode_version.js" chromium)
|
||||
fi
|
||||
|
||||
cd "${CR_CHECKOUT_PATH}/src"
|
||||
|
@ -27,14 +27,7 @@ cd "$(dirname $0)"
|
||||
SCRIPT_FOLDER="$(pwd -P)"
|
||||
source "${SCRIPT_FOLDER}/../utils.sh"
|
||||
|
||||
CURRENT_HOST_OS_VERSION=$(getMacVersion)
|
||||
# As of Oct 2021, we build FFMPEG for Mac with Xcode 13 to align toolchains.
|
||||
if [[ "${CURRENT_HOST_OS_VERSION}" == "10."* ]]; then
|
||||
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
|
||||
exit 1
|
||||
else
|
||||
selectXcodeVersionOrDie "13.2"
|
||||
fi
|
||||
selectXcodeVersionOrDie $(node "${SCRIPT_FOLDER}/../get_xcode_version.js" ffmpeg)
|
||||
|
||||
source ./CONFIG.sh
|
||||
|
||||
|
@ -21,14 +21,7 @@ fi
|
||||
rm -rf .mozconfig
|
||||
|
||||
if is_mac; then
|
||||
CURRENT_HOST_OS_VERSION=$(getMacVersion)
|
||||
# As of Oct 2021, building Firefox requires XCode 13
|
||||
if [[ "${CURRENT_HOST_OS_VERSION}" != "10."* ]]; then
|
||||
selectXcodeVersionOrDie "13.2"
|
||||
else
|
||||
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
|
||||
exit 1
|
||||
fi
|
||||
selectXcodeVersionOrDie $(node "${SCRIPT_FOLDER}/../get_xcode_version.js" firefox)
|
||||
echo "-- building on Mac"
|
||||
elif is_linux; then
|
||||
echo "-- building on Linux"
|
||||
|
@ -21,14 +21,7 @@ fi
|
||||
rm -rf .mozconfig
|
||||
|
||||
if is_mac; then
|
||||
CURRENT_HOST_OS_VERSION=$(getMacVersion)
|
||||
# As of Oct 2021, building Firefox requires XCode 13
|
||||
if [[ "${CURRENT_HOST_OS_VERSION}" != "10."* ]]; then
|
||||
selectXcodeVersionOrDie "13.2"
|
||||
else
|
||||
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
|
||||
exit 1
|
||||
fi
|
||||
selectXcodeVersionOrDie $(node "${SCRIPT_FOLDER}/../get_xcode_version.js" firefox)
|
||||
echo "-- building on Mac"
|
||||
elif is_linux; then
|
||||
echo "-- building on Linux"
|
||||
|
30
browser_patches/get_xcode_version.js
Executable file
30
browser_patches/get_xcode_version.js
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const child_process = require('child_process');
|
||||
|
||||
const XCODE_VERSIONS = {
|
||||
"macos-10.15": {
|
||||
webkit: '11.7',
|
||||
},
|
||||
"macos-11": {
|
||||
webkit: '12.5', // WebKit strongly requires xcode 12.5 and not higher on MacOS 11
|
||||
firefox: '13.2', // As of Oct 2021 building Firefox requires XCode 13
|
||||
ffmpeg: '13.2',
|
||||
},
|
||||
"macos-12": {
|
||||
webkit: '13.3',
|
||||
firefox: '13.2', // As of Oct 2021 building Firefox requires XCode 13
|
||||
chromium: '13.3', // As of Apr 2022 Chromium requires Xcode13.3
|
||||
ffmpeg: '13.2',
|
||||
},
|
||||
};
|
||||
|
||||
const [major, minor, patch] = child_process.execSync(`sw_vers -productVersion`).toString().trim().split('.');
|
||||
const browserName = process.argv[2];
|
||||
const macosVersion = major === '10' ? `macos-${major}.${minor}` : `macos-${major}`;
|
||||
const versions = XCODE_VERSIONS[macosVersion];
|
||||
if (!versions || !versions[browserName.toLowerCase()])
|
||||
throw new Error(`Compilation of ${browserName} is not supported on ${macosVersion}`);
|
||||
|
||||
console.log(versions[browserName.toLowerCase()]);
|
||||
|
@ -52,17 +52,7 @@ else
|
||||
fi
|
||||
|
||||
if is_mac; then
|
||||
CURRENT_HOST_OS_VERSION=$(getMacVersion)
|
||||
if [[ "${CURRENT_HOST_OS_VERSION}" == "10.15" ]]; then
|
||||
selectXcodeVersionOrDie "11.7"
|
||||
elif [[ "${CURRENT_HOST_OS_VERSION}" == "11."* ]]; then
|
||||
selectXcodeVersionOrDie "12.5"
|
||||
elif [[ "${CURRENT_HOST_OS_VERSION}" == "12."* ]]; then
|
||||
selectXcodeVersionOrDie "13.3"
|
||||
else
|
||||
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
|
||||
exit 1
|
||||
fi
|
||||
selectXcodeVersionOrDie $(node "$SCRIPT_FOLDER/../get_xcode_version.js" webkit)
|
||||
./Tools/Scripts/build-webkit --release --touch-events --orientation-events
|
||||
elif is_linux; then
|
||||
if [[ $# == 0 || (-z "$1") ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user