From e42696a77d6bb32c2c4615fcebcc294e32e476d6 Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Mon, 16 Nov 2026 20:15:04 +0100 Subject: [PATCH 1/3] test(ci): Record browser integration runner baseline Co-Authored-By: OpenAI Codex --- .github/actions/install-playwright/action.yml | 19 ++++++++++----- .github/workflows/build.yml | 24 +++++++++++++++++-- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/actions/install-playwright/action.yml b/.github/actions/install-playwright/action.yml index b642f77815d3..af390cad74f6 100644 --- a/.github/actions/install-playwright/action.yml +++ b/.github/actions/install-playwright/action.yml @@ -34,7 +34,9 @@ runs: path: | ~/.cache/ms-playwright # Bump the iteration when bumping runner images to use a new cache - key: playwright-${{ runner.os }}-iteration-1-${{ steps.playwright-version.outputs.version }} + key: + playwright-${{ runner.os }}${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' }}-iteration-1-${{ + steps.playwright-version.outputs.version }} # We always install all browsers, if uncached # `npx` runs outside the repo, so it can't pick up a `playwright` that a parallel `pnpm install` is still linking. @@ -112,7 +114,8 @@ runs: - name: Remove obsolete cached WebKit packages if: steps.webkit-dependencies.outputs.key != '' && steps.webkit-apt-cache.outputs.cache-hit != 'true' && - github.event_name == 'push' && github.ref == 'refs/heads/develop' + (github.event_name == 'push' && github.ref == 'refs/heads/develop' || github.head_ref == + 'feat/benchmark-browser-playwright-arm' && inputs.cwd == 'dev-packages/browser-integration-tests') # Fallback restores can carry obsolete installers into newer cache entries. run: sudo apt-get -o Dir::Cache::archives=/var/tmp/webkit-apt-cache autoclean shell: bash @@ -122,7 +125,8 @@ runs: - name: Store cached WebKit system packages if: steps.webkit-dependencies.outputs.key != '' && steps.webkit-apt-cache.outputs.cache-hit != 'true' && - github.event_name == 'push' && github.ref == 'refs/heads/develop' + (github.event_name == 'push' && github.ref == 'refs/heads/develop' || github.head_ref == + 'feat/benchmark-browser-playwright-arm' && inputs.cwd == 'dev-packages/browser-integration-tests') uses: actions/cache/save@v6.1.0 with: path: /var/tmp/webkit-apt-cache/*.deb @@ -132,10 +136,13 @@ runs: - name: Store cached playwright binaries uses: actions/cache/save@v6.1.0 if: - steps.playwright-version.outputs.version != '' && github.event_name == 'push' && github.ref == - 'refs/heads/develop' + steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit != 'true' && + (github.event_name == 'push' && github.ref == 'refs/heads/develop' || github.head_ref == + 'feat/benchmark-browser-playwright-arm' && inputs.cwd == 'dev-packages/browser-integration-tests') with: path: | ~/.cache/ms-playwright # Bump the iteration when bumping runner images to use a new cache - key: playwright-${{ runner.os }}-iteration-1-${{ steps.playwright-version.outputs.version }} + key: + playwright-${{ runner.os }}${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' }}-iteration-1-${{ + steps.playwright-version.outputs.version }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53c2cf9ab6b4..30f902a9d853 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ concurrency: cancel-in-progress: true env: - HEAD_COMMIT: ${{ github.event.inputs.commit || github.sha }} + HEAD_COMMIT: ${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }} CACHED_DEPENDENCY_PATHS: | ${{ github.workspace }}/node_modules @@ -690,6 +690,16 @@ jobs: name: build-bundle-output path: ${{ env.BUNDLE_ARTIFACT_DOWNLOAD_PATH }} + - name: Record browser benchmark hardware + working-directory: dev-packages/browser-integration-tests + run: | + node -e ' + const os = require("node:os"); + const info = { arch: process.arch, cores: os.availableParallelism(), cpu: os.cpus()[0].model, memoryBytes: os.totalmem() }; + require("node:fs").writeFileSync("browser-runner.json", JSON.stringify(info)); + console.log(info); + ' + - name: Install Playwright uses: ./.github/actions/install-playwright with: @@ -704,6 +714,16 @@ jobs: pnpm run test:all${{ matrix.project && format(' --project={0}', matrix.project) || '' }}${{ matrix.shard && format(' --shard={0}/{1}', matrix.shard, matrix.shards) || '' }} + - name: Upload browser benchmark results + if: always() + uses: actions/upload-artifact@v7 + with: + name: browser-benchmark-${{ matrix.bundle }}-${{ matrix.project }}-${{ matrix.shard || '0' }} + path: | + dev-packages/browser-integration-tests/results.junit.xml + dev-packages/browser-integration-tests/browser-runner.json + if-no-files-found: error + - name: Upload Playwright Traces uses: actions/upload-artifact@v7 if: failure() @@ -954,7 +974,7 @@ jobs: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v7 with: - ref: ${{ env.HEAD_COMMIT }} + ref: ${{ github.sha }} - name: Set up Node uses: actions/setup-node@v7 with: From e3d652e78d9360c786c9664b301a860a58855521 Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Mon, 16 Nov 2026 20:30:43 +0100 Subject: [PATCH 2/3] test(ci): Benchmark browser integration matrix on ARM Co-Authored-By: OpenAI Codex --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30f902a9d853..951885926076 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -592,7 +592,7 @@ jobs: matrix.project) || ''}}${{ matrix.shard && format(' ({0}/{1})', matrix.shard, matrix.shards) || ''}} Tests needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request' - runs-on: ubuntu-24.04-large-js + runs-on: ubuntu-24.04-arm timeout-minutes: 25 strategy: fail-fast: false From 8f165089231a796665c1e8d54415cb386cccc24d Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Mon, 16 Nov 2026 20:40:51 +0100 Subject: [PATCH 3/3] test(ci): Measure warm browser caches on ARM Co-Authored-By: OpenAI Codex