mirror of
https://github.com/stablyai/orca.git
synced 2026-11-02 01:57:57 +00:00
* feat(orcad): ship the mobile web page so phones paired to orcad get it orcad never carried out/mobile-web, so it did not advertise mobileWeb.bundle.v1 and phones paired directly to an orcad server fell back to the app's built-in native screens. The built page now ships in every orcad package at out/mobile-web, the path getBundledMobileWebBundleRoot already probes under the install root. Its manifest is a fixed artifact; its content-addressed assets join the hashed artifact list from that manifest, as one shared copy in the template's common files. build-orcad fails when the page is missing or stale, and CI lanes that build orcad now build the page first. * ci(orcad): check out mobile/ for the Windows host template build * refactor(orcad): copy the page tree whole and build it once per CI run The guard already refuses unlisted files, so staging copies the bundle directory as native-chat-visuals is copied. The shipped template takes the page the qualification lanes tested, the e2e build artifact carries it, and the PR smoke builds it through install-mobile-dependencies behind its own scope step. Drops tests that duplicated the guard's own. * fix(orcad): refuse a template page asset name that escapes the slot
128 lines
5.0 KiB
YAML
128 lines
5.0 KiB
YAML
name: Windows packaged orcad serve switch E2E
|
|
|
|
# Why: proves D7 on a real Windows install. The installed desktop app forks its terminal daemon
|
|
# from the relocated %LOCALAPPDATA%\Orca\daemon-host; `orca serve` then serves the same profile
|
|
# on orcad and must adopt that daemon, and the desktop must reattach the terminal afterwards and
|
|
# still write its settings under orcad's data-root ACL. Unpackaged e2e cannot exercise the
|
|
# relocation, which only packaged builds do. A CI runner is the only safe place to install.
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
|
|
paths:
|
|
- 'src/main/daemon/**'
|
|
- '!src/main/daemon/**/*.test.ts'
|
|
- '!src/main/daemon/serialize-grid-roundtrip.ts'
|
|
- '!src/main/daemon/mock-descendant-sweep.ts'
|
|
- '!src/main/daemon/daemon-host-relocation.test-fixture.ts'
|
|
- '!src/main/daemon/daemon-endpoint-reachability-test-harness.ts'
|
|
# D7 packages production entries; the unit jobs own these test roots.
|
|
- 'src/main/orcad/**'
|
|
- '!src/main/orcad/**/*.test.ts'
|
|
- 'src/cli/runtime/**'
|
|
- '!src/cli/runtime/**/*.test.ts'
|
|
- 'src/shared/orcad-local-serve-selection.ts'
|
|
- 'tests/tools/win-update-e2e/**'
|
|
- '.github/workflows/win-orcad-serve-switch-e2e.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: win-orcad-serve-switch-e2e-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
serve-switch:
|
|
name: packaged Windows Electron/orcad serve switch (D7)
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.draft != true
|
|
runs-on: windows-2022
|
|
timeout-minutes: 75
|
|
env:
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
|
ORCA_BACKGROUND_LAUNCH: '1'
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: ./.github/actions/install-node-dependencies
|
|
with:
|
|
native-runtime: node
|
|
|
|
# Same key inputs as win-update-survival-e2e: a harness-only edit skips the installer build.
|
|
- name: Cache branch installer
|
|
id: cache-installer
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: dist/orca-windows-setup.exe
|
|
key: serve-switch-installer-v2-${{ hashFiles('src/**', 'config/**', 'native/**', 'resources/**', 'mobile/**', 'patches/**', 'package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml') }}
|
|
|
|
- uses: ./.github/actions/install-mobile-dependencies
|
|
if: steps.cache-installer.outputs.cache-hit != 'true'
|
|
|
|
- uses: ./.github/actions/prepare-windows-agent-hook
|
|
if: steps.cache-installer.outputs.cache-hit != 'true'
|
|
|
|
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
|
if: steps.cache-installer.outputs.cache-hit != 'true'
|
|
with:
|
|
bun-version-file: config/.bun-version
|
|
|
|
# Before the template exists: packaging verifies a present template for every target.
|
|
- name: Build Windows installer (unsigned)
|
|
if: steps.cache-installer.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
env:
|
|
ORCA_REUSE_PREPARED_NATIVE_RUNTIME: '1'
|
|
run: |
|
|
node config/scripts/ensure-native-runtime.mjs --runtime=electron
|
|
pnpm run build:desktop:ci
|
|
pnpm exec electron-builder --config config/electron-builder.config.cjs --win --publish never
|
|
|
|
- name: Cache the built installer
|
|
if: steps.cache-installer.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: dist/orca-windows-setup.exe
|
|
key: ${{ steps.cache-installer.outputs.cache-primary-key }}
|
|
|
|
# The win32-x64 template the harness drops into the install, which is where serve looks.
|
|
- uses: ./.github/actions/prepare-orcad-prebuilds
|
|
with:
|
|
resolve-windows-cache: 'true'
|
|
restore-windows-cache: 'true'
|
|
- uses: ./.github/actions/prepare-windows-cli-launcher
|
|
with:
|
|
arches: x64
|
|
- uses: ./.github/actions/build-mobile-web-bundle
|
|
- name: Build the win32-x64 orcad template
|
|
shell: bash
|
|
env:
|
|
ORCA_REUSE_PREPARED_WINDOWS_SECURITY: 'true'
|
|
run: |
|
|
node config/scripts/ensure-native-runtime.mjs --runtime=node
|
|
node config/scripts/build-windows-process-tree-addon.mjs --arch=x64 --reuse-prepared-runtime
|
|
node config/scripts/build-orcad-template.mjs --targets win32-x64
|
|
|
|
- name: Switch serve hosts on the installed app's profile
|
|
shell: bash
|
|
run: |
|
|
mkdir -p artifacts
|
|
node tests/tools/win-update-e2e/serve-switch.mjs \
|
|
--installer dist/orca-windows-setup.exe \
|
|
--template out/orcad-template 2>&1 | tee artifacts/serve-switch.log
|
|
exit "${PIPESTATUS[0]}"
|
|
|
|
- name: Upload serve switch output
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: win-orcad-serve-switch-output
|
|
path: artifacts/
|
|
retention-days: 7
|
|
if-no-files-found: warn
|