Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: move building Firefox for Mac Intel to MacOS 11 (#9383)

Andrey Lushnikov120e919b8e5c
diff --git a/browser_patches/checkout_build_archive_upload.sh b/browser_patches/checkout_build_archive_upload.sh
index 60adb99a3d..f0ff625dce 100755
--- a/browser_patches/checkout_build_archive_upload.sh
+++ b/browser_patches/checkout_build_archive_upload.sh
@@ -4,7 +4,7 @@ set +x
set -o pipefail
if [[ ($1 == '--help') || ($1 == '-h') ]]; then
- echo "usage: $(basename "$0") [firefox-linux|firefox-win32|firefox-win64|webkit-gtk|webkit-wpe|webkit-gtk-wpe|webkit-win64|webkit-mac-10.14|webkit-mac-10.15] [-f|--force]"
+ echo "usage: $(basename "$0") [firefox-linux|firefox-win32|firefox-win64|webkit-gtk|webkit-wpe|webkit-gtk-wpe|webkit-win64|webkit-mac-10.15] [-f|--force]"
echo
echo "Prepares checkout under browser folder, applies patches, builds, archives, and uploads if build is missing."
echo "Script will bail out early if the build for the browser version is already present."
@@ -212,12 +212,13 @@ elif [[ "$BUILD_FLAVOR" == "firefox-ubuntu-20.04" ]]; then
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="20.04"
BUILD_BLOB_NAME="firefox-ubuntu-20.04.zip"
-elif [[ "$BUILD_FLAVOR" == "firefox-mac-10.14" ]]; then
+elif [[ "$BUILD_FLAVOR" == "firefox-mac-11" ]]; then
BROWSER_NAME="firefox"
EXTRA_BUILD_ARGS="--full"
EXPECTED_HOST_OS="Darwin"
- EXPECTED_HOST_OS_VERSION="10.14"
- BUILD_BLOB_NAME="firefox-mac-10.14.zip"
+ EXPECTED_HOST_OS_VERSION="11.6"
+ EXPECTED_ARCH="x86_64"
+ BUILD_BLOB_NAME="firefox-mac-11.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-mac-11-arm64" ]]; then
BROWSER_NAME="firefox"
EXTRA_BUILD_ARGS="--full"
@@ -252,12 +253,13 @@ elif [[ "$BUILD_FLAVOR" == "firefox-beta-ubuntu-20.04" ]]; then
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="20.04"
BUILD_BLOB_NAME="firefox-beta-ubuntu-20.04.zip"
-elif [[ "$BUILD_FLAVOR" == "firefox-beta-mac-10.14" ]]; then
+elif [[ "$BUILD_FLAVOR" == "firefox-beta-mac-11" ]]; then
BROWSER_NAME="firefox-beta"
EXTRA_BUILD_ARGS="--full"
EXPECTED_HOST_OS="Darwin"
- EXPECTED_HOST_OS_VERSION="10.14"
- BUILD_BLOB_NAME="firefox-beta-mac-10.14.zip"
+ EXPECTED_HOST_OS_VERSION="11.6"
+ EXPECTED_ARCH="x86_64"
+ BUILD_BLOB_NAME="firefox-beta-mac-11.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-beta-mac-11-arm64" ]]; then
BROWSER_NAME="firefox-beta"
EXTRA_BUILD_ARGS="--full"
diff --git a/browser_patches/firefox-beta/EXPECTED_BUILDS b/browser_patches/firefox-beta/EXPECTED_BUILDS
index ba09ca278a..107c325617 100644
--- a/browser_patches/firefox-beta/EXPECTED_BUILDS
+++ b/browser_patches/firefox-beta/EXPECTED_BUILDS
@@ -1,4 +1,4 @@
-firefox-beta-mac-10.14.zip
+firefox-beta-mac-11.zip
firefox-beta-mac-11-arm64.zip
firefox-beta-ubuntu-18.04.zip
firefox-beta-ubuntu-20.04.zip
diff --git a/browser_patches/firefox-beta/build.sh b/browser_patches/firefox-beta/build.sh
index 3900a95b77..7d0431c1da 100755
--- a/browser_patches/firefox-beta/build.sh
+++ b/browser_patches/firefox-beta/build.sh
@@ -26,18 +26,17 @@ rm -rf .mozconfig
if [[ "$(uname)" == "Darwin" ]]; then
CURRENT_HOST_OS_VERSION=$(getMacVersion)
- if [[ "${CURRENT_HOST_OS_VERSION}" == "10.14" ]]; then
- selectXcodeVersionOrDie "11.3.1"
- elif [[ "${CURRENT_HOST_OS_VERSION}" == "11."* ]]; then
- # As of Jan 2021, building Firefox on Apple Silicon requires XCode 12.2
+ # As of Oct 2021, building Firefox requires XCode 12.2
+ if [[ "${CURRENT_HOST_OS_VERSION}" == "11."* ]]; then
selectXcodeVersionOrDie "12.2"
else
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
exit 1
fi
- if [[ "${CURRENT_HOST_OS_VERSION}" == "10."* ]]; then
- # Firefox currently does not build on 10.14 or 10.15 out of the box - it requires SDK for 10.12.
- # Make sure the SDK is out there.
+
+ # Firefox on Mac Intel requires SDK for 10.12 to work on old versions of MacOS.
+ # Mac on Apple Silicon doesn't exist on old versions of MacOS, so this is not needed.
+ if [[ "$(uname -m)" == "x86_64" ]]; then
if ! [[ -d $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk ]]; then
echo "As of Dec 2020, Firefox does not build on Mac ${CURRENT_HOST_OS_VERSION} without ${MACOS_SDK_VERSION} SDK."
echo "Download XCode ${XCODE_VERSION_WITH_REQUIRED_SDK_VERSION} from https://developer.apple.com/download/more/ and"
diff --git a/browser_patches/firefox/EXPECTED_BUILDS b/browser_patches/firefox/EXPECTED_BUILDS
index c85aecf03d..6f6ff5a099 100644
--- a/browser_patches/firefox/EXPECTED_BUILDS
+++ b/browser_patches/firefox/EXPECTED_BUILDS
@@ -1,4 +1,4 @@
-firefox-mac-10.14.zip
+firefox-mac-11.zip
firefox-mac-11-arm64.zip
firefox-ubuntu-18.04.zip
firefox-ubuntu-20.04.zip
diff --git a/browser_patches/firefox/build.sh b/browser_patches/firefox/build.sh
index 3900a95b77..7d0431c1da 100755
--- a/browser_patches/firefox/build.sh
+++ b/browser_patches/firefox/build.sh
@@ -26,18 +26,17 @@ rm -rf .mozconfig
if [[ "$(uname)" == "Darwin" ]]; then
CURRENT_HOST_OS_VERSION=$(getMacVersion)
- if [[ "${CURRENT_HOST_OS_VERSION}" == "10.14" ]]; then
- selectXcodeVersionOrDie "11.3.1"
- elif [[ "${CURRENT_HOST_OS_VERSION}" == "11."* ]]; then
- # As of Jan 2021, building Firefox on Apple Silicon requires XCode 12.2
+ # As of Oct 2021, building Firefox requires XCode 12.2
+ if [[ "${CURRENT_HOST_OS_VERSION}" == "11."* ]]; then
selectXcodeVersionOrDie "12.2"
else
echo "ERROR: ${CURRENT_HOST_OS_VERSION} is not supported"
exit 1
fi
- if [[ "${CURRENT_HOST_OS_VERSION}" == "10."* ]]; then
- # Firefox currently does not build on 10.14 or 10.15 out of the box - it requires SDK for 10.12.
- # Make sure the SDK is out there.
+
+ # Firefox on Mac Intel requires SDK for 10.12 to work on old versions of MacOS.
+ # Mac on Apple Silicon doesn't exist on old versions of MacOS, so this is not needed.
+ if [[ "$(uname -m)" == "x86_64" ]]; then
if ! [[ -d $HOME/SDK-archive/MacOSX${MACOS_SDK_VERSION}.sdk ]]; then
echo "As of Dec 2020, Firefox does not build on Mac ${CURRENT_HOST_OS_VERSION} without ${MACOS_SDK_VERSION} SDK."
echo "Download XCode ${XCODE_VERSION_WITH_REQUIRED_SDK_VERSION} from https://developer.apple.com/download/more/ and"