Files
orca/.github/workflows/release-javascript-benchmark.yml
T
Neil 83cf7cf5e2 perf(ci): compile release JavaScript once for all packaging hosts (#25828)
* perf(ci): share release JavaScript across packaging hosts

* fix(ci): verify the projected web entry in release archives

* fix(ci): use the Windows system archive tool for release bundles

* test(ci): retain stylesheet evidence in release build comparisons

* test(ci): verify release parity across native color rounding

* test(ci): normalize manifest asset references without changing import order

* test(ci): compare portable outputs across Windows text and color formatting

* test(ci): preserve module identity across dependent asset hashes

* fix(ci): keep SVG build inputs identical across release hosts

* fix(ci): stabilize compiler inputs and projected web bindings

* fix(ci): retain vendor minification in projected web output

* test(ci): normalize platform-specific pnpm manifest source paths

* fix(packaging): exclude shared build staging from application files

* test: align thinking-state fixtures with the current source shape

* test(mobile): reuse message fixtures within the line limit
2026-10-06 13:22:04 -07:00

121 lines
4.0 KiB
YAML

name: Release JavaScript comparison
on:
pull_request:
paths: ['.github/workflows/release-javascript-benchmark.yml']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: release-javascript-comparison-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
ORCA_BACKGROUND_LAUNCH: '1'
ORCA_DIAGNOSTICS_TOKEN_URL: https://www.onorca.dev/diagnostics/token
ORCA_POSTHOG_WRITE_KEY: ci-build-comparison
NODE_OPTIONS: --max-old-space-size=4096
jobs:
bundle:
uses: ./.github/workflows/release-javascript.yml
with:
ref: ${{ github.sha }}
secrets:
ORCA_POSTHOG_WRITE_KEY: ci-build-comparison
measure:
needs: bundle
name: ${{ matrix.mode }} ${{ matrix.host.platform }} ${{ matrix.host.arch }}
runs-on: ${{ matrix.host.os }}
timeout-minutes: 30
strategy:
fail-fast: false
max-parallel: 8
matrix:
mode: [baseline, shared]
host:
- os: ubuntu-latest
platform: linux
arch: x64
- os: ubuntu-24.04-arm
platform: linux
arch: arm64
- os: windows-2022
platform: win32
arch: x64
- os: macos-15
platform: darwin
arch: arm64
steps:
- uses: actions/checkout@v6
with:
ref: ${{ needs.bundle.outputs.source_sha }}
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
with:
native-runtime: node
persist-native-cache: 'false'
- uses: ./.github/actions/install-mobile-dependencies
- name: Install Linux provider dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y python3-gi gir1.2-atspi-2.0 at-spi2-core xclip xdotool
- name: Resolve build identity
shell: bash
run: |
RELEASE_TAG="v$(node -p 'require("./package.json").version')"
export RELEASE_TAG
echo "ORCA_BUILD_IDENTITY=$(node config/scripts/release-javascript-artifact.mjs identity)" >> "$GITHUB_ENV"
- name: Download shared JavaScript
if: matrix.mode == 'shared'
uses: actions/download-artifact@v8
with:
name: release-javascript
path: .build/release-javascript
- name: Measure release build
shell: bash
env:
MEASUREMENT_MODE: ${{ matrix.mode }}
ORCA_RELEASE_JAVASCRIPT_SOURCE_SHA: ${{ needs.bundle.outputs.source_sha }}
run: node config/scripts/release-javascript-benchmark.mjs "$MEASUREMENT_MODE"
- uses: actions/upload-artifact@v7
with:
name: release-javascript-measurement-${{ matrix.mode }}-${{ matrix.host.platform }}-${{ matrix.host.arch }}
path: .build/release-javascript-measurements/
retention-days: 7
comparison:
needs: [bundle, measure]
runs-on: ubuntu-slim
permissions:
contents: read
actions: read
steps:
- uses: actions/checkout@v6
with:
ref: ${{ needs.bundle.outputs.source_sha }}
persist-credentials: false
- uses: actions/setup-node@v6
with:
node-version-file: package.json
- uses: ./.github/actions/install-node-dependencies
- uses: actions/download-artifact@v8
with:
pattern: release-javascript-measurement-*
path: .build/release-javascript-measurements
- name: Compare build and transfer timings
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs?per_page=100" > .build/release-javascript-measurements/jobs.json
node config/scripts/release-javascript-benchmark.mjs summary
cat .build/release-javascript-measurements/comparison.md >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@v7
if: always()
with:
name: release-javascript-comparison
path: .build/release-javascript-measurements/comparison.md
retention-days: 30