Skip to content

Commit 176caf8

Browse files
nicohrubeccodex
andcommitted
ci: investigate Firefox and WebKit without system dependencies
Co-Authored-By: OpenAI Codex <codex@openai.com>
1 parent 4f1237d commit 176caf8

1 file changed

Lines changed: 119 additions & 0 deletions

File tree

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: 'Benchmark: Firefox and WebKit system dependencies'
2+
3+
on:
4+
push:
5+
branches: [feat/benchmark-firefox-webkit-deps]
6+
7+
permissions:
8+
contents: read
9+
actions: read
10+
11+
env:
12+
SKIP_PLAYWRIGHT_BROWSER_INSTALL: '1'
13+
pnpm_config_verify_deps_before_run: 'false'
14+
DISABLE_V8_COMPILE_CACHE: '1'
15+
PW_BUNDLE: bundle_tracing_replay_feedback_logs_metrics_min
16+
17+
jobs:
18+
browser:
19+
name: '${{ matrix.browser }} without install-deps'
20+
runs-on: ubuntu-24.04-large-js
21+
timeout-minutes: 15
22+
env:
23+
PLAYWRIGHT_BROWSER: ${{ matrix.browser }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
browser: [firefox, webkit]
28+
steps:
29+
- uses: actions/checkout@v7
30+
with:
31+
ref: 4f1237d4d4ad34cd6bfa73e1106e66cd8a28acff
32+
33+
- uses: actions/setup-node@v7
34+
with:
35+
node-version-file: package.json
36+
37+
- uses: ./.github/actions/install-pnpm
38+
39+
- name: Compute dependency cache key
40+
id: dependencies
41+
run: node scripts/dependency-hash-key.js >> "$GITHUB_OUTPUT"
42+
43+
- name: Restore dependencies
44+
id: dependency-cache
45+
uses: actions/cache/restore@v6.1.0
46+
with:
47+
key: ${{ steps.dependencies.outputs.hash }}
48+
path: |
49+
node_modules
50+
packages/*/node_modules
51+
dev-packages/*/node_modules
52+
~/.cache/mongodb-binaries/
53+
54+
- name: Install dependencies on cache miss
55+
if: steps.dependency-cache.outputs.cache-hit != 'true'
56+
run: pnpm install --frozen-lockfile
57+
58+
- name: Restore build artifacts
59+
uses: actions/download-artifact@v8
60+
with:
61+
name: build-output
62+
run-id: 42169764361
63+
github-token: ${{ github.token }}
64+
65+
- name: Restore bundle artifacts
66+
uses: actions/download-artifact@v8
67+
with:
68+
name: build-bundle-output
69+
path: packages
70+
run-id: 42169764361
71+
github-token: ${{ github.token }}
72+
73+
- name: Restore browser binaries
74+
uses: actions/cache/restore@v6.1.0
75+
with:
76+
key: playwright-Linux-iteration-1-1.64.1
77+
path: ~/.cache/ms-playwright
78+
79+
- name: Inspect existing system packages
80+
run: |
81+
for package in libavcodec60 libopus0 libgtk-4-1 libsoup-3.0-0 libwoff1 gstreamer1.0-plugins-base; do
82+
dpkg-query -W -f='${Package}: ${Status}\n' "$package" || true
83+
done
84+
85+
- name: Install browser binaries without system dependencies
86+
working-directory: dev-packages/browser-integration-tests
87+
run: pnpm exec playwright install "$PLAYWRIGHT_BROWSER"
88+
89+
- name: Check browser launch without system dependencies
90+
working-directory: dev-packages/browser-integration-tests
91+
run: |
92+
node <<'JS'
93+
const browserType = require('@playwright/test')[process.env.PLAYWRIGHT_BROWSER];
94+
(async () => {
95+
const browser = await browserType.launch();
96+
try {
97+
const page = await browser.newPage();
98+
await page.setContent('<title>Browser launch check</title>');
99+
console.log(`Launched ${process.env.PLAYWRIGHT_BROWSER}: ${await page.title()}`);
100+
} finally {
101+
await browser.close();
102+
}
103+
})().catch(error => {
104+
console.error(error);
105+
process.exitCode = 1;
106+
});
107+
JS
108+
109+
- name: Run existing browser integration suite
110+
working-directory: dev-packages/browser-integration-tests
111+
run: pnpm run test:all --project="$PLAYWRIGHT_BROWSER"
112+
113+
- name: Upload failure traces
114+
if: failure()
115+
uses: actions/upload-artifact@v7
116+
with:
117+
name: browser-dependency-experiment-${{ matrix.browser }}
118+
path: dev-packages/browser-integration-tests/test-results
119+
if-no-files-found: ignore

0 commit comments

Comments
 (0)