Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add ubuntu 22 support #14588

Merged
merged 3 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/intro-csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Depending on your Linux distribution, you might need to install additional
dependencies to run the browsers.

:::note
Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported.
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
:::

See also in the [Command line tools](./cli.md#install-system-dependencies)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/intro-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Depending on your Linux distribution, you might need to install additional
dependencies to run the browsers.

:::note
Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported.
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
:::

See also in the [Command line tools](./cli.md#install-system-dependencies)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/intro-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Depending on your Linux distribution, you might need to install additional
dependencies to run the browsers.

:::note
Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported.
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
:::

See also in the [Command line tools](./cli.md#install-system-dependencies)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/library-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Depending on your Linux distribution, you might need to install additional
dependencies to run the browsers.

:::note
Only Ubuntu 18.04 and Ubuntu 20.04 are officially supported.
Only Ubuntu 18.04, 20.04, and 22.04 are officially supported.
:::

See also in the [Command line tools](./cli.md#install-system-dependencies)
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-core/src/server/registry/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export async function validateDependenciesLinux(sdkLanguage: string, linuxLddDir
``,
` ${maybeSudo}${buildPlaywrightCLICommand(sdkLanguage, 'install-deps')}`,
``,
`- (alternative 2) use Aptitude inside docker:`,
`- (alternative 2) use apt inside docker:`,
``,
` ${maybeSudo}apt-get install ${[...missingPackages].join('\\\n ')}`,
``,
Expand All @@ -242,7 +242,7 @@ export async function validateDependenciesLinux(sdkLanguage: string, linuxLddDir
``,
` ${maybeSudo}${buildPlaywrightCLICommand(sdkLanguage, 'install-deps')}`,
``,
`Alternatively, use Aptitude:`,
`Alternatively, use apt:`,
` ${maybeSudo}apt-get install ${[...missingPackages].join('\\\n ')}`,
``,
`<3 Playwright Team`,
Expand Down
14 changes: 14 additions & 0 deletions packages/playwright-core/src/server/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'ubuntu18.04': 'builds/chromium/%s/chromium-linux.zip',
'ubuntu20.04': 'builds/chromium/%s/chromium-linux.zip',
'ubuntu22.04': 'builds/chromium/%s/chromium-linux.zip',
'ubuntu18.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'ubuntu20.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
mxschmitt marked this conversation as resolved.
Show resolved Hide resolved
'mac10.13': 'builds/chromium/%s/chromium-mac.zip',
'mac10.14': 'builds/chromium/%s/chromium-mac.zip',
'mac10.15': 'builds/chromium/%s/chromium-mac.zip',
Expand All @@ -83,8 +85,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu18.04': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'ubuntu20.04': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'ubuntu22.04': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'ubuntu18.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu20.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'mac10.13': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
'mac10.14': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
'mac10.15': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-mac.zip',
Expand All @@ -100,8 +104,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'ubuntu18.04': 'builds/chromium/%s/chromium-with-symbols-linux.zip',
'ubuntu20.04': 'builds/chromium/%s/chromium-with-symbols-linux.zip',
'ubuntu22.04': 'builds/chromium/%s/chromium-with-symbols-linux.zip',
'ubuntu18.04-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'ubuntu20.04-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-with-symbols-linux-arm64.zip',
'mac10.13': 'builds/chromium/%s/chromium-with-symbols-mac.zip',
'mac10.14': 'builds/chromium/%s/chromium-with-symbols-mac.zip',
'mac10.15': 'builds/chromium/%s/chromium-with-symbols-mac.zip',
Expand All @@ -117,8 +123,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': 'builds/firefox/%s/firefox-ubuntu-20.04-arm64.zip',
'ubuntu18.04': 'builds/firefox/%s/firefox-ubuntu-18.04.zip',
'ubuntu20.04': 'builds/firefox/%s/firefox-ubuntu-20.04.zip',
'ubuntu22.04': 'builds/firefox/%s/firefox-ubuntu-22.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/firefox/%s/firefox-ubuntu-20.04-arm64.zip',
'ubuntu22.04-arm64': 'builds/firefox/%s/firefox-ubuntu-22.04-arm64.zip',
'mac10.13': 'builds/firefox/%s/firefox-mac-11.zip',
'mac10.14': 'builds/firefox/%s/firefox-mac-11.zip',
'mac10.15': 'builds/firefox/%s/firefox-mac-11.zip',
Expand All @@ -134,8 +142,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': undefined,
'ubuntu18.04': 'builds/firefox-beta/%s/firefox-beta-ubuntu-18.04.zip',
'ubuntu20.04': 'builds/firefox-beta/%s/firefox-beta-ubuntu-20.04.zip',
'ubuntu22.04': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': undefined,
'ubuntu22.04-arm64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04-arm64.zip',
'mac10.13': 'builds/firefox-beta/%s/firefox-beta-mac-11.zip',
'mac10.14': 'builds/firefox-beta/%s/firefox-beta-mac-11.zip',
'mac10.15': 'builds/firefox-beta/%s/firefox-beta-mac-11.zip',
Expand All @@ -151,8 +161,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': 'builds/webkit/%s/webkit-ubuntu-20.04-arm64.zip',
'ubuntu18.04': 'builds/webkit/%s/webkit-ubuntu-18.04.zip',
'ubuntu20.04': 'builds/webkit/%s/webkit-ubuntu-20.04.zip',
'ubuntu22.04': 'builds/webkit/%s/webkit-ubuntu-22.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/webkit/%s/webkit-ubuntu-20.04-arm64.zip',
'ubuntu22.04-arm64': 'builds/webkit/%s/webkit-ubuntu-22.04-arm64.zip',
'mac10.13': undefined,
'mac10.14': 'builds/deprecated-webkit-mac-10.14/%s/deprecated-webkit-mac-10.14.zip',
'mac10.15': 'builds/webkit/%s/webkit-mac-10.15.zip',
Expand All @@ -168,8 +180,10 @@ const DOWNLOAD_PATHS = {
'generic-linux-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'ubuntu18.04': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'ubuntu20.04': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'ubuntu22.04': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'ubuntu18.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'ubuntu20.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'mac10.13': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
'mac10.14': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
'mac10.15': 'builds/ffmpeg/%s/ffmpeg-mac.zip',
Expand Down
71 changes: 37 additions & 34 deletions packages/playwright-core/src/server/registry/nativeDeps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,20 +434,20 @@ export const deps: any = {
},
},

'ubuntu21.04': {
'ubuntu22.04': {
tools: [
'xvfb',
'fonts-noto-color-emoji',
'ttf-unifont',
'libfontconfig',
'fonts-unifont',
'libfontconfig1',
'libfreetype6',
'xfonts-cyrillic',
'xfonts-scalable',
'fonts-liberation',
'fonts-ipafont-gothic',
'fonts-wqy-zenhei',
'fonts-tlwg-loma-otf',
'ttf-ubuntu-font-family',
'fonts-freefont-ttf',
],
chromium: [
'libasound2',
Expand All @@ -463,18 +463,18 @@ export const deps: any = {
'libnspr4',
'libnss3',
'libpango-1.0-0',
'libwayland-client0',
'libx11-6',
'libxcb1',
'libxcomposite1',
'libxdamage1',
'libxext6',
'libxfixes3',
'libxkbcommon0',
'libxrandr2',
'libxshmfence1'
'libxrandr2'
],
firefox: [
'ffmpeg',
mxschmitt marked this conversation as resolved.
Show resolved Hide resolved
'libasound2',
'libatk1.0-0',
'libcairo-gobject2',
'libcairo2',
Expand All @@ -485,11 +485,8 @@ export const deps: any = {
'libgdk-pixbuf-2.0-0',
'libglib2.0-0',
'libgtk-3-0',
'libgtk2.0-0',
'libharfbuzz0b',
'libpango-1.0-0',
'libpangocairo-1.0-0',
'libpangoft2-1.0-0',
'libx11-6',
'libx11-xcb1',
'libxcb-shm0',
Expand All @@ -500,61 +497,65 @@ export const deps: any = {
'libxext6',
'libxfixes3',
'libxi6',
'libxrandr2',
'libxrender1',
'libxt6'
'libxtst6'
],
webkit: [
'gstreamer1.0-libav',
'gstreamer1.0-plugins-bad',
'gstreamer1.0-plugins-base',
'gstreamer1.0-plugins-good',
'libicu70',
'libatk-bridge2.0-0',
'libatk1.0-0',
'libcairo2',
'libdbus-1-3',
'libdrm2',
'libegl1',
'libepoxy0',
'libevdev2',
'libffi7',
'libfontconfig1',
'libfreetype6',
'libgbm1',
'libgdk-pixbuf-2.0-0',
'libgl1',
'libgles2',
'libglib2.0-0',
'libglx0',
'libgstreamer-gl1.0-0',
'libgstreamer-plugins-bad1.0-0',
'libgstreamer-plugins-base1.0-0',
'libgstreamer1.0-0',
'libgtk-3-0',
'libgudev-1.0-0',
'libharfbuzz-icu0',
'libharfbuzz0b',
'libhyphen0',
'libjavascriptcoregtk-4.0-18',
'libjpeg-turbo8',
'liblcms2-2',
'libmanette-0.2-0',
'libnotify4',
'libopengl0',
'libopenjp2-7',
'libopus0',
'libpango-1.0-0',
'libpng16-16',
'libproxy1v5',
'libsecret-1-0',
'libsoup2.4-1',
'libvpx6',
'libwayland-client0',
'libwayland-egl1',
'libwayland-server0',
'libwebkit2gtk-4.0-37',
'libwebp6',
'libwebpdemux2',
'libwoff1',
'libwpe-1.0-1',
'libwpebackend-fdo-1.0-1',
'libwpewebkit-1.0-3',
'libx11-6',
'libxcomposite1',
'libxdamage1',
'libxkbcommon0',
'libxml2',
'libxslt1.1'
'libxslt1.1',
'libx264-163',
],
lib2package: {
'libasound.so.2': 'libasound2',
Expand All @@ -569,61 +570,57 @@ export const deps: any = {
'libdrm.so.2': 'libdrm2',
'libEGL.so.1': 'libegl1',
'libepoxy.so.0': 'libepoxy0',
'libevdev.so.2': 'libevdev2',
'libffi.so.7': 'libffi7',
'libfontconfig.so.1': 'libfontconfig1',
'libfreetype.so.6': 'libfreetype6',
'libgbm.so.1': 'libgbm1',
'libgdk_pixbuf-2.0.so.0': 'libgdk-pixbuf-2.0-0',
'libgdk-3.so.0': 'libgtk-3-0',
'libgdk-x11-2.0.so.0': 'libgtk2.0-0',
'libgio-2.0.so.0': 'libglib2.0-0',
'libGL.so.1': 'libgl1',
'libGLESv2.so.2': 'libgles2',
'libglib-2.0.so.0': 'libglib2.0-0',
'libGLX.so.0': 'libglx0',
'libgmodule-2.0.so.0': 'libglib2.0-0',
'libgobject-2.0.so.0': 'libglib2.0-0',
'libgstallocators-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstapp-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstaudio-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstbase-1.0.so.0': 'libgstreamer1.0-0',
'libgstcodecparsers-1.0.so.0': 'libgstreamer-plugins-bad1.0-0',
'libgstfft-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstgl-1.0.so.0': 'libgstreamer-gl1.0-0',
'libgstpbutils-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstreamer-1.0.so.0': 'libgstreamer1.0-0',
'libgsttag-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstvideo-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgthread-2.0.so.0': 'libglib2.0-0',
'libgtk-3.so.0': 'libgtk-3-0',
'libgtk-x11-2.0.so.0': 'libgtk2.0-0',
'libgudev-1.0.so.0': 'libgudev-1.0-0',
'libharfbuzz-icu.so.0': 'libharfbuzz-icu0',
'libharfbuzz.so.0': 'libharfbuzz0b',
'libhyphen.so.0': 'libhyphen0',
'libjavascriptcoregtk-4.0.so.18': 'libjavascriptcoregtk-4.0-18',
'libjpeg.so.8': 'libjpeg-turbo8',
'liblcms2.so.2': 'liblcms2-2',
'libmanette-0.2.so.0': 'libmanette-0.2-0',
'libnotify.so.4': 'libnotify4',
'libnspr4.so': 'libnspr4',
'libnss3.so': 'libnss3',
'libnssutil3.so': 'libnss3',
'libOpenGL.so.0': 'libopengl0',
'libopenjp2.so.7': 'libopenjp2-7',
'libopus.so.0': 'libopus0',
'libpango-1.0.so.0': 'libpango-1.0-0',
'libpangocairo-1.0.so.0': 'libpangocairo-1.0-0',
'libpangoft2-1.0.so.0': 'libpangoft2-1.0-0',
'libpng16.so.16': 'libpng16-16',
'libproxy.so.1': 'libproxy1v5',
'libsecret-1.so.0': 'libsecret-1-0',
'libsmime3.so': 'libnss3',
'libsoup-2.4.so.1': 'libsoup2.4-1',
'libvpx.so.6': 'libvpx6',
'libwayland-client.so.0': 'libwayland-client0',
'libwayland-egl.so.1': 'libwayland-egl1',
'libwayland-server.so.0': 'libwayland-server0',
'libwebkit2gtk-4.0.so.37': 'libwebkit2gtk-4.0-37',
'libwebp.so.6': 'libwebp6',
'libwebpdemux.so.2': 'libwebpdemux2',
'libwoff2dec.so.1.0.2': 'libwoff1',
'libwpe-1.0.so.1': 'libwpe-1.0-1',
'libWPEBackend-fdo-1.0.so.1': 'libwpebackend-fdo-1.0-1',
'libWPEWebKit-1.0.so.3': 'libwpewebkit-1.0-3',
'libX11-xcb.so.1': 'libx11-xcb1',
'libX11.so.6': 'libx11-6',
'libxcb-shm.so.0': 'libxcb-shm0',
Expand All @@ -638,9 +635,15 @@ export const deps: any = {
'libxml2.so.2': 'libxml2',
'libXrandr.so.2': 'libxrandr2',
'libXrender.so.1': 'libxrender1',
'libxshmfence.so.1': 'libxshmfence1',
'libxslt.so.1': 'libxslt1.1',
'libXt.so.6': 'libxt6',
'libXtst.so.6': 'libxtst6',
'libicui18n.so.60': 'libicu70',
'libicuuc.so.66': 'libicu70',
'libicui18n.so.66': 'libicu70',
'libwebp.so.6': 'libwebp6',
'libenchant.so.1': 'libenchant-2-2',
'libx264.so': 'libx264-163',
'libvpx.so.7': 'libvpx7'
},
}
};
Expand Down
4 changes: 3 additions & 1 deletion packages/playwright-core/src/utils/hostPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export const hostPlatform = ((): HostPlatform => {
return ('generic-linux' + archSuffix) as HostPlatform;
if (parseInt(ubuntuVersion, 10) <= 19)
return ('ubuntu18.04' + archSuffix) as HostPlatform;
return ('ubuntu20.04' + archSuffix) as HostPlatform;
if (parseInt(ubuntuVersion, 10) <= 21)
return ('ubuntu20.04' + archSuffix) as HostPlatform;
return ('ubuntu22.04' + archSuffix) as HostPlatform;
}
if (platform === 'win32')
return 'win64';
Expand Down
1 change: 0 additions & 1 deletion tests/library/popup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ it('should not throttle rAF in the opener page', async ({ page, server }) => {
waitForRafs(page, 30),
waitForRafs(popup, 30)
]);
console.log('done');
});

async function waitForRafs(page: Page, count: number): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion utils/linux-browser-dependencies/inside_docker/process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set +x
# Install Node.js

apt-get update && apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs

# Install apt-file
Expand Down
2 changes: 1 addition & 1 deletion utils/linux-browser-dependencies/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ cd "$(dirname "$0")"
# image.
node ../../utils/pack_package.js playwright-core ./playwright-core.tar.gz

docker run -v $PWD:/root/hostfolder --rm -it "$1" /root/hostfolder/inside_docker/process.sh "$2"
docker run --platform linux/amd64 -v $PWD:/root/hostfolder --rm -it "$1" /root/hostfolder/inside_docker/process.sh "$2"