Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ jobs:
gh release upload ${{ steps.prep.outputs.version }} playwright-windows-amd64.zip

release-macos-bundle:
# macos-latest is arm only
runs-on: macos-15-intel
runs-on: macos-15
needs: [create-release-draft]
steps:
- name: Find Matching Draft Tag
Expand Down Expand Up @@ -274,6 +273,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Parse Release Version
Expand Down Expand Up @@ -307,6 +307,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Parse Release Version
Expand Down Expand Up @@ -340,6 +341,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Parse Release Version
Expand Down Expand Up @@ -375,6 +377,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Parse Release Version
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ jobs:
gsutil cp ./playwright-windows-amd64.zip gs://${{ secrets.GCS_RUNNER_BUCKET }}/playwright-windows-amd64-${{ github.run_id }}.zip

build-macos-bundle:
# macos-latest is arm only
runs-on: macos-15-intel
runs-on: macos-15
needs: [test]
steps:
- name: Checkout
Expand Down Expand Up @@ -181,11 +180,13 @@ jobs:
strategy:
max-parallel: 3
matrix:
os: [Win10, Win11, macOS12, macOS13]
os: [Win10, Win11, macOS12, macOS13, macOS14, macOS15]
browser: [Chromium, Firefox, Webkit]
exclude:
- os: macOS12
browser: Webkit
- os: macOS13
browser: Webkit
fail-fast: false

runs-on: ubuntu-latest
Expand All @@ -198,6 +199,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Test on Sauce
Expand All @@ -218,7 +220,7 @@ jobs:
strategy:
max-parallel: 3
matrix:
os: [Win10, Win11, macOS12, macOS13]
os: [Win10, Win11, macOS12, macOS13, macOS14, macOS15]
browser: [Chromium, Firefox, Webkit]
exclude:
- os: Win10
Expand All @@ -227,6 +229,8 @@ jobs:
browser: Webkit
- os: macOS12
browser: Webkit
- os: macOS13
browser: Webkit
fail-fast: false

runs-on: ubuntu-latest
Expand All @@ -244,6 +248,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Run web-page
Expand Down Expand Up @@ -296,6 +301,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
with:
saucectl-version: v0.201.0
skip-run: true

- name: Test on Sauce
Expand Down
52 changes: 48 additions & 4 deletions scripts/bundle.macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,56 @@ export PLAYWRIGHT_SKIP_BROWSER_GC=1

pushd bundle/

# Install all browsers with mac13 platform override
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install-deps
# --- Step 1: Install ARM64 browsers for macOS 14/15 (Apple Silicon) ---
# Use mac14-arm64 override instead of native mac15-arm64 so that webkit is
# compiled against the macOS 14 SDK. This binary is forward-compatible with
# macOS 15 but the reverse is not true (mac15 webkit uses symbols absent on 14).
# NOTE: Firefox is deliberately excluded here. Both arm64 and x64 Firefox
# extract to the same directory path (firefox-<rev>/firefox/), so only one
# can exist. We install x64 Firefox in Step 3, which runs natively on Intel
# Macs and via Rosetta 2 on Apple Silicon.
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac14-arm64 npx playwright install chromium chromium-headless-shell webkit
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac14-arm64 npx playwright install-deps chromium webkit

# --- Step 2: Back up ARM64 Chromium files ---
# Playwright deletes the entire browser revision directory (e.g. chromium-1208/)
# when INSTALLATION_COMPLETE is missing. We must preserve the arm64 subdirectories
# before the x64 install wipes them out.
ARM64_BACKUP=$(mktemp -d)
find "$PLAYWRIGHT_BROWSERS_PATH" -type d -name "chrome-mac-arm64" -exec cp -a {} "$ARM64_BACKUP/chrome-mac-arm64" \;
find "$PLAYWRIGHT_BROWSERS_PATH" -type d -name "chrome-headless-shell-mac-arm64" -exec cp -a {} "$ARM64_BACKUP/chrome-headless-shell-mac-arm64" \;

# --- Step 3: Remove INSTALLATION_COMPLETE markers ---
# Playwright checks for this marker and silently skips if present — even when
# the needed platform variant (e.g. x64) is missing. Removing the markers
# forces the x86 install to re-download.
find "$PLAYWRIGHT_BROWSERS_PATH" -name "INSTALLATION_COMPLETE" -delete

# --- Step 4: Install x86 browsers for macOS 12/13 (Intel) ---
# Firefox and ffmpeg share the same subdirectory for both architectures, so
# this step overwrites the ARM64 copies with x64 — which is intentional since
# x64 binaries run on Apple Silicon via Rosetta 2.
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install chromium chromium-headless-shell firefox
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install-deps chromium firefox

# --- Step 5: Restore ARM64 Chromium files ---
# Copy arm64 subdirectories back into the browser revision directories so both
# architectures coexist (chrome-mac-arm64/ alongside chrome-mac-x64/).
for chromium_dir in "$PLAYWRIGHT_BROWSERS_PATH"/chromium-*/; do
if [ -d "$ARM64_BACKUP/chrome-mac-arm64" ]; then
cp -a "$ARM64_BACKUP/chrome-mac-arm64" "$chromium_dir/"
fi
done
for headless_dir in "$PLAYWRIGHT_BROWSERS_PATH"/chromium_headless_shell-*/; do
if [ -d "$ARM64_BACKUP/chrome-headless-shell-mac-arm64" ]; then
cp -a "$ARM64_BACKUP/chrome-headless-shell-mac-arm64" "$headless_dir/"
fi
done
rm -rf "$ARM64_BACKUP"

npx playwright --version

popd

# Archive Bundle with symlinks
# Archive Bundle with symlinks preserved (required for macOS .app bundles)
zip --symlinks -r playwright-macos-amd64.zip bundle/
50 changes: 50 additions & 0 deletions tests/fixtures/cloud/.sauce/config-sc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,53 @@ suites:
browserName: "webkit"
testMatch:
- "tests/.*.test.js"

## macOS14 tests
- name: "macOS14 - Chromium"
platformName: "macOS 14"
armRequired: true
params:
browserName: "chromium"
testMatch:
- "tests/.*.test.js"

- name: "macOS14 - Firefox"
platformName: "macOS 14"
armRequired: true
params:
browserName: "firefox"
testMatch:
- "tests/.*.test.js"

- name: "macOS14 - Webkit"
platformName: "macOS 14"
armRequired: true
params:
browserName: "webkit"
testMatch:
- "tests/.*.test.js"

## macOS15 tests
- name: "macOS15 - Chromium"
platformName: "macOS 15"
armRequired: true
params:
browserName: "chromium"
testMatch:
- "tests/.*.test.js"

- name: "macOS15 - Firefox"
platformName: "macOS 15"
armRequired: true
params:
browserName: "firefox"
testMatch:
- "tests/.*.test.js"

- name: "macOS15 - Webkit"
platformName: "macOS 15"
armRequired: true
params:
browserName: "webkit"
testMatch:
- "tests/.*.test.js"
50 changes: 50 additions & 0 deletions tests/fixtures/cloud/.sauce/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,53 @@ suites:
browserName: "webkit"
testMatch:
- "tests/no-sc/.*.test.js"

## macOS14 tests
- name: "macOS14 - Chromium"
platformName: "macOS 14"
armRequired: true
params:
browserName: "chromium"
testMatch:
- "tests/no-sc/.*.test.js"

- name: "macOS14 - Firefox"
platformName: "macOS 14"
armRequired: true
params:
browserName: "firefox"
testMatch:
- "tests/no-sc/.*.test.js"

- name: "macOS14 - Webkit"
platformName: "macOS 14"
armRequired: true
params:
browserName: "webkit"
testMatch:
- "tests/no-sc/.*.test.js"

## macOS15 tests
- name: "macOS15 - Chromium"
platformName: "macOS 15"
armRequired: true
params:
browserName: "chromium"
testMatch:
- "tests/no-sc/.*.test.js"

- name: "macOS15 - Firefox"
platformName: "macOS 15"
armRequired: true
params:
browserName: "firefox"
testMatch:
- "tests/no-sc/.*.test.js"

- name: "macOS15 - Webkit"
platformName: "macOS 15"
armRequired: true
params:
browserName: "webkit"
testMatch:
- "tests/no-sc/.*.test.js"
24 changes: 23 additions & 1 deletion tests/fixtures/post-release/.sauce/config_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ suites:
browserName: "chromium"

- name: "Post Release Test (macOS) - webkit"
platformName: "macOS 13"
platformName: "macOS 14"
armRequired: true
testMatch: ['.*.js']
params:
browserName: "webkit"
Expand All @@ -30,6 +31,27 @@ suites:
params:
browserName: "firefox"

- name: "Post Release Test (macOS 15) - chromium"
platformName: "macOS 15"
armRequired: true
testMatch: ['.*.js']
params:
browserName: "chromium"

- name: "Post Release Test (macOS 15) - firefox"
platformName: "macOS 15"
armRequired: true
testMatch: ['.*.js']
params:
browserName: "firefox"

- name: "Post Release Test (macOS 15) - webkit"
platformName: "macOS 15"
armRequired: true
testMatch: ['.*.js']
params:
browserName: "webkit"

npm:
packages:
pretty-seconds: '^3.0.0'