Skip to content

Commit 7feddb9

Browse files
fixing playwright runner release (#313)
1 parent eacdf62 commit 7feddb9

File tree

6 files changed

+186
-11
lines changed

6 files changed

+186
-11
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ jobs:
171171
gh release upload ${{ steps.prep.outputs.version }} playwright-windows-amd64.zip
172172
173173
release-macos-bundle:
174-
# macos-latest is arm only
175-
runs-on: macos-15-intel
174+
runs-on: macos-15
176175
needs: [create-release-draft]
177176
steps:
178177
- name: Find Matching Draft Tag
@@ -274,6 +273,7 @@ jobs:
274273
env:
275274
GITHUB_TOKEN: ${{ github.token }}
276275
with:
276+
saucectl-version: v0.201.0
277277
skip-run: true
278278

279279
- name: Parse Release Version
@@ -307,6 +307,7 @@ jobs:
307307
env:
308308
GITHUB_TOKEN: ${{ github.token }}
309309
with:
310+
saucectl-version: v0.201.0
310311
skip-run: true
311312

312313
- name: Parse Release Version
@@ -340,6 +341,7 @@ jobs:
340341
env:
341342
GITHUB_TOKEN: ${{ github.token }}
342343
with:
344+
saucectl-version: v0.201.0
343345
skip-run: true
344346

345347
- name: Parse Release Version
@@ -375,6 +377,7 @@ jobs:
375377
env:
376378
GITHUB_TOKEN: ${{ github.token }}
377379
with:
380+
saucectl-version: v0.201.0
378381
skip-run: true
379382

380383
- name: Parse Release Version

.github/workflows/test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ jobs:
135135
gsutil cp ./playwright-windows-amd64.zip gs://${{ secrets.GCS_RUNNER_BUCKET }}/playwright-windows-amd64-${{ github.run_id }}.zip
136136
137137
build-macos-bundle:
138-
# macos-latest is arm only
139-
runs-on: macos-15-intel
138+
runs-on: macos-15
140139
needs: [test]
141140
steps:
142141
- name: Checkout
@@ -181,11 +180,13 @@ jobs:
181180
strategy:
182181
max-parallel: 3
183182
matrix:
184-
os: [Win10, Win11, macOS12, macOS13]
183+
os: [Win10, Win11, macOS12, macOS13, macOS14, macOS15]
185184
browser: [Chromium, Firefox, Webkit]
186185
exclude:
187186
- os: macOS12
188187
browser: Webkit
188+
- os: macOS13
189+
browser: Webkit
189190
fail-fast: false
190191

191192
runs-on: ubuntu-latest
@@ -198,6 +199,7 @@ jobs:
198199
env:
199200
GITHUB_TOKEN: ${{ github.token }}
200201
with:
202+
saucectl-version: v0.201.0
201203
skip-run: true
202204

203205
- name: Test on Sauce
@@ -218,7 +220,7 @@ jobs:
218220
strategy:
219221
max-parallel: 3
220222
matrix:
221-
os: [Win10, Win11, macOS12, macOS13]
223+
os: [Win10, Win11, macOS12, macOS13, macOS14, macOS15]
222224
browser: [Chromium, Firefox, Webkit]
223225
exclude:
224226
- os: Win10
@@ -227,6 +229,8 @@ jobs:
227229
browser: Webkit
228230
- os: macOS12
229231
browser: Webkit
232+
- os: macOS13
233+
browser: Webkit
230234
fail-fast: false
231235

232236
runs-on: ubuntu-latest
@@ -244,6 +248,7 @@ jobs:
244248
env:
245249
GITHUB_TOKEN: ${{ github.token }}
246250
with:
251+
saucectl-version: v0.201.0
247252
skip-run: true
248253

249254
- name: Run web-page
@@ -296,6 +301,7 @@ jobs:
296301
env:
297302
GITHUB_TOKEN: ${{ github.token }}
298303
with:
304+
saucectl-version: v0.201.0
299305
skip-run: true
300306

301307
- name: Test on Sauce

scripts/bundle.macos.sh

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,56 @@ export PLAYWRIGHT_SKIP_BROWSER_GC=1
99

1010
pushd bundle/
1111

12-
# Install all browsers with mac13 platform override
13-
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install
14-
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install-deps
12+
# --- Step 1: Install ARM64 browsers for macOS 14/15 (Apple Silicon) ---
13+
# Use mac14-arm64 override instead of native mac15-arm64 so that webkit is
14+
# compiled against the macOS 14 SDK. This binary is forward-compatible with
15+
# macOS 15 but the reverse is not true (mac15 webkit uses symbols absent on 14).
16+
# NOTE: Firefox is deliberately excluded here. Both arm64 and x64 Firefox
17+
# extract to the same directory path (firefox-<rev>/firefox/), so only one
18+
# can exist. We install x64 Firefox in Step 3, which runs natively on Intel
19+
# Macs and via Rosetta 2 on Apple Silicon.
20+
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac14-arm64 npx playwright install chromium chromium-headless-shell webkit
21+
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac14-arm64 npx playwright install-deps chromium webkit
22+
23+
# --- Step 2: Back up ARM64 Chromium files ---
24+
# Playwright deletes the entire browser revision directory (e.g. chromium-1208/)
25+
# when INSTALLATION_COMPLETE is missing. We must preserve the arm64 subdirectories
26+
# before the x64 install wipes them out.
27+
ARM64_BACKUP=$(mktemp -d)
28+
find "$PLAYWRIGHT_BROWSERS_PATH" -type d -name "chrome-mac-arm64" -exec cp -a {} "$ARM64_BACKUP/chrome-mac-arm64" \;
29+
find "$PLAYWRIGHT_BROWSERS_PATH" -type d -name "chrome-headless-shell-mac-arm64" -exec cp -a {} "$ARM64_BACKUP/chrome-headless-shell-mac-arm64" \;
30+
31+
# --- Step 3: Remove INSTALLATION_COMPLETE markers ---
32+
# Playwright checks for this marker and silently skips if present — even when
33+
# the needed platform variant (e.g. x64) is missing. Removing the markers
34+
# forces the x86 install to re-download.
35+
find "$PLAYWRIGHT_BROWSERS_PATH" -name "INSTALLATION_COMPLETE" -delete
36+
37+
# --- Step 4: Install x86 browsers for macOS 12/13 (Intel) ---
38+
# Firefox and ffmpeg share the same subdirectory for both architectures, so
39+
# this step overwrites the ARM64 copies with x64 — which is intentional since
40+
# x64 binaries run on Apple Silicon via Rosetta 2.
41+
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install chromium chromium-headless-shell firefox
42+
PLAYWRIGHT_HOST_PLATFORM_OVERRIDE=mac13 npx playwright install-deps chromium firefox
43+
44+
# --- Step 5: Restore ARM64 Chromium files ---
45+
# Copy arm64 subdirectories back into the browser revision directories so both
46+
# architectures coexist (chrome-mac-arm64/ alongside chrome-mac-x64/).
47+
for chromium_dir in "$PLAYWRIGHT_BROWSERS_PATH"/chromium-*/; do
48+
if [ -d "$ARM64_BACKUP/chrome-mac-arm64" ]; then
49+
cp -a "$ARM64_BACKUP/chrome-mac-arm64" "$chromium_dir/"
50+
fi
51+
done
52+
for headless_dir in "$PLAYWRIGHT_BROWSERS_PATH"/chromium_headless_shell-*/; do
53+
if [ -d "$ARM64_BACKUP/chrome-headless-shell-mac-arm64" ]; then
54+
cp -a "$ARM64_BACKUP/chrome-headless-shell-mac-arm64" "$headless_dir/"
55+
fi
56+
done
57+
rm -rf "$ARM64_BACKUP"
58+
1559
npx playwright --version
1660

1761
popd
1862

19-
# Archive Bundle with symlinks
63+
# Archive Bundle with symlinks preserved (required for macOS .app bundles)
2064
zip --symlinks -r playwright-macos-amd64.zip bundle/

tests/fixtures/cloud/.sauce/config-sc.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,53 @@ suites:
103103
browserName: "webkit"
104104
testMatch:
105105
- "tests/.*.test.js"
106+
107+
## macOS14 tests
108+
- name: "macOS14 - Chromium"
109+
platformName: "macOS 14"
110+
armRequired: true
111+
params:
112+
browserName: "chromium"
113+
testMatch:
114+
- "tests/.*.test.js"
115+
116+
- name: "macOS14 - Firefox"
117+
platformName: "macOS 14"
118+
armRequired: true
119+
params:
120+
browserName: "firefox"
121+
testMatch:
122+
- "tests/.*.test.js"
123+
124+
- name: "macOS14 - Webkit"
125+
platformName: "macOS 14"
126+
armRequired: true
127+
params:
128+
browserName: "webkit"
129+
testMatch:
130+
- "tests/.*.test.js"
131+
132+
## macOS15 tests
133+
- name: "macOS15 - Chromium"
134+
platformName: "macOS 15"
135+
armRequired: true
136+
params:
137+
browserName: "chromium"
138+
testMatch:
139+
- "tests/.*.test.js"
140+
141+
- name: "macOS15 - Firefox"
142+
platformName: "macOS 15"
143+
armRequired: true
144+
params:
145+
browserName: "firefox"
146+
testMatch:
147+
- "tests/.*.test.js"
148+
149+
- name: "macOS15 - Webkit"
150+
platformName: "macOS 15"
151+
armRequired: true
152+
params:
153+
browserName: "webkit"
154+
testMatch:
155+
- "tests/.*.test.js"

tests/fixtures/cloud/.sauce/config.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,53 @@ suites:
101101
browserName: "webkit"
102102
testMatch:
103103
- "tests/no-sc/.*.test.js"
104+
105+
## macOS14 tests
106+
- name: "macOS14 - Chromium"
107+
platformName: "macOS 14"
108+
armRequired: true
109+
params:
110+
browserName: "chromium"
111+
testMatch:
112+
- "tests/no-sc/.*.test.js"
113+
114+
- name: "macOS14 - Firefox"
115+
platformName: "macOS 14"
116+
armRequired: true
117+
params:
118+
browserName: "firefox"
119+
testMatch:
120+
- "tests/no-sc/.*.test.js"
121+
122+
- name: "macOS14 - Webkit"
123+
platformName: "macOS 14"
124+
armRequired: true
125+
params:
126+
browserName: "webkit"
127+
testMatch:
128+
- "tests/no-sc/.*.test.js"
129+
130+
## macOS15 tests
131+
- name: "macOS15 - Chromium"
132+
platformName: "macOS 15"
133+
armRequired: true
134+
params:
135+
browserName: "chromium"
136+
testMatch:
137+
- "tests/no-sc/.*.test.js"
138+
139+
- name: "macOS15 - Firefox"
140+
platformName: "macOS 15"
141+
armRequired: true
142+
params:
143+
browserName: "firefox"
144+
testMatch:
145+
- "tests/no-sc/.*.test.js"
146+
147+
- name: "macOS15 - Webkit"
148+
platformName: "macOS 15"
149+
armRequired: true
150+
params:
151+
browserName: "webkit"
152+
testMatch:
153+
- "tests/no-sc/.*.test.js"

tests/fixtures/post-release/.sauce/config_mac.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ suites:
1919
browserName: "chromium"
2020

2121
- name: "Post Release Test (macOS) - webkit"
22-
platformName: "macOS 13"
22+
platformName: "macOS 14"
23+
armRequired: true
2324
testMatch: ['.*.js']
2425
params:
2526
browserName: "webkit"
@@ -30,6 +31,27 @@ suites:
3031
params:
3132
browserName: "firefox"
3233

34+
- name: "Post Release Test (macOS 15) - chromium"
35+
platformName: "macOS 15"
36+
armRequired: true
37+
testMatch: ['.*.js']
38+
params:
39+
browserName: "chromium"
40+
41+
- name: "Post Release Test (macOS 15) - firefox"
42+
platformName: "macOS 15"
43+
armRequired: true
44+
testMatch: ['.*.js']
45+
params:
46+
browserName: "firefox"
47+
48+
- name: "Post Release Test (macOS 15) - webkit"
49+
platformName: "macOS 15"
50+
armRequired: true
51+
testMatch: ['.*.js']
52+
params:
53+
browserName: "webkit"
54+
3355
npm:
3456
packages:
3557
pretty-seconds: '^3.0.0'

0 commit comments

Comments
 (0)