Skip to content

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

devops: add firefox debian build (#15568)

Andrey Lushnikovf76fb3e08a8a
diff --git a/browser_patches/checkout_build_archive_upload.sh b/browser_patches/checkout_build_archive_upload.sh
index 5a5e211829..5df524f775 100755
--- a/browser_patches/checkout_build_archive_upload.sh
+++ b/browser_patches/checkout_build_archive_upload.sh
@@ -230,6 +230,12 @@ elif [[ "$BUILD_FLAVOR" == "firefox-ubuntu-22.04-arm64" ]]; then
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="22.04"
BUILD_BLOB_NAME="firefox-ubuntu-22.04-arm64.zip"
+elif [[ "$BUILD_FLAVOR" == "firefox-debian-11" ]]; then
+ BROWSER_NAME="firefox"
+ EXTRA_BUILD_ARGS="--full"
+ EXPECTED_HOST_OS="Debian"
+ EXPECTED_HOST_OS_VERSION="11"
+ BUILD_BLOB_NAME="firefox-debian-11.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-mac-11" ]]; then
BROWSER_NAME="firefox"
EXTRA_BUILD_ARGS="--full"
@@ -281,6 +287,12 @@ elif [[ "$BUILD_FLAVOR" == "firefox-beta-ubuntu-22.04-arm64" ]]; then
EXPECTED_HOST_OS="Ubuntu"
EXPECTED_HOST_OS_VERSION="22.04"
BUILD_BLOB_NAME="firefox-beta-ubuntu-22.04-arm64.zip"
+elif [[ "$BUILD_FLAVOR" == "firefox-beta-debian-11" ]]; then
+ BROWSER_NAME="firefox-beta"
+ EXTRA_BUILD_ARGS="--full"
+ EXPECTED_HOST_OS="Debian"
+ EXPECTED_HOST_OS_VERSION="11"
+ BUILD_BLOB_NAME="firefox-beta-debian-11.zip"
elif [[ "$BUILD_FLAVOR" == "firefox-beta-mac-11" ]]; 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 d761331e2d..ded9b70170 100644
--- a/browser_patches/firefox-beta/EXPECTED_BUILDS
+++ b/browser_patches/firefox-beta/EXPECTED_BUILDS
@@ -4,4 +4,5 @@ firefox-beta-ubuntu-18.04.zip
firefox-beta-ubuntu-20.04.zip
firefox-beta-ubuntu-22.04.zip
firefox-beta-ubuntu-22.04-arm64.zip
+firefox-beta-debian-11.zip
firefox-beta-win64.zip
diff --git a/browser_patches/firefox-beta/build.sh b/browser_patches/firefox-beta/build.sh
index 68baa179c8..adb1375669 100755
--- a/browser_patches/firefox-beta/build.sh
+++ b/browser_patches/firefox-beta/build.sh
@@ -48,6 +48,11 @@ if [[ $1 == "--linux-arm64" || $2 == "--linux-arm64" ]]; then
echo "ac_add_options --target=aarch64-linux-gnu" >> .mozconfig
fi
+if is_linux "debian" 11; then
+ # There's no pre-built wasi sysroot for Debian 11.
+ echo "ac_add_options --without-wasm-sandboxed-libraries" >> .mozconfig
+fi
+
OBJ_FOLDER="obj-build-playwright"
echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/${OBJ_FOLDER}" >> .mozconfig
echo "ac_add_options --disable-crashreporter" >> .mozconfig
diff --git a/browser_patches/firefox/EXPECTED_BUILDS b/browser_patches/firefox/EXPECTED_BUILDS
index 327343b401..d2bf4c2ace 100644
--- a/browser_patches/firefox/EXPECTED_BUILDS
+++ b/browser_patches/firefox/EXPECTED_BUILDS
@@ -5,4 +5,5 @@ firefox-ubuntu-20.04.zip
firefox-ubuntu-20.04-arm64.zip
firefox-ubuntu-22.04.zip
firefox-ubuntu-22.04-arm64.zip
+firefox-debian-11.zip
firefox-win64.zip
diff --git a/browser_patches/firefox/build.sh b/browser_patches/firefox/build.sh
index 8c90d0b5ca..770a0fb27b 100755
--- a/browser_patches/firefox/build.sh
+++ b/browser_patches/firefox/build.sh
@@ -48,6 +48,11 @@ if [[ $1 == "--linux-arm64" || $2 == "--linux-arm64" ]]; then
echo "ac_add_options --target=aarch64-linux-gnu" >> .mozconfig
fi
+if is_linux "debian" 11; then
+ # There's no pre-built wasi sysroot for Debian 11.
+ echo "ac_add_options --without-wasm-sandboxed-libraries" >> .mozconfig
+fi
+
OBJ_FOLDER="obj-build-playwright"
echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/${OBJ_FOLDER}" >> .mozconfig
echo "ac_add_options --disable-crashreporter" >> .mozconfig
diff --git a/browser_patches/utils.sh b/browser_patches/utils.sh
index 6f6d0a76eb..28a731769f 100644
--- a/browser_patches/utils.sh
+++ b/browser_patches/utils.sh
@@ -60,9 +60,26 @@ function is_mac() {
}
function is_linux() {
- if [[ "$(uname)" == "Linux" ]]; then
- return 0;
- else
+ if [[ "$(uname)" != "Linux" ]]; then
return 1;
fi
+
+ # List of ID and VERSION_ID values for various distributions is available here:
+ # https://gist.github.com/aslushnikov/8ceddb8288e4cf9db3039c02e0f4fb75
+ if [[ -n "$1" ]]; then
+ local HOST_ID="$(bash -c 'source /etc/os-release && echo $ID')"
+ if [[ "$1" != "${HOST_ID}" ]]; then
+ return 1;
+ fi
+ fi
+
+ if [[ -n "$2" ]]; then
+ local HOST_VERSION="$(bash -c 'source /etc/os-release && echo $VERSION_ID')"
+ if [[ "$2" != "${HOST_VERSION}" ]]; then
+ return 1;
+ fi
+ fi
+
+ return 0;
}
+