[codex] Remove duplicate demo header #90
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| # macOS and Linux share the same setup/build scaffolding (checkout → node → | |
| # zig → npm ci → patched libghostty → payload), the E2E test invocation, and | |
| # the summary/upload tail. Only the middle differs, and it differs because | |
| # the code does: the headless ghostty embedding (N-API addon + renderer-poc + | |
| # Electron integration) is macOS/Metal/IOSurface-only, so those steps are | |
| # gated on `runner.os == 'macOS'`. Linux proves the fork compiles and runs | |
| # the DOM baselines under xvfb; its native rendering is pending EGL/GBM | |
| # (see docs/ghostty-renderer-reuse.md). One matrix job with a few guards | |
| # rather than two near-identical jobs. | |
| build: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-15 | |
| name: macOS (headless ghostty embedding, e2e + integration) | |
| - os: ubuntu-latest | |
| name: Linux (fork compiles + DOM baselines; headless rendering pending EGL/GBM) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .node-version | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Install dependencies | |
| run: npm ci | |
| # Clones ghostty, applies the fork patch, builds the full lib. On Linux | |
| # this also proves the fork compiles; the native addon below is macOS-only. | |
| - name: Build patched libghostty (clone + fork patch + full lib) | |
| run: npm run setup:ghostty | |
| # The N-API addon links libghostty's Metal renderer + IOSurface | |
| # presentation; binding.gyp only has a mac branch, so build on macOS only. | |
| - name: Build N-API addon (ghostty embedding wrapper) | |
| if: runner.os == 'macOS' | |
| run: npm run build:native | |
| - name: Generate payload | |
| run: npm run payload | |
| - name: Headless embedding PoC (pixel-asserting, no Electron) | |
| if: runner.os == 'macOS' | |
| run: make -C native/renderer-poc test | |
| # E2E cases self-skip on non-Darwin (the addon is macOS-only): a real | |
| # suite on macOS, a green no-op on Linux that proves the harness loads. | |
| - name: E2E tests (spawn/input/resize/scroll, IOSurface pixels) | |
| run: npm test | |
| - name: "Integration tests (Electron: DOM benches + demo smoke)" | |
| if: runner.os == 'macOS' | |
| run: npm run test:integration | |
| # All benchmark steps below are SMOKES, not measurements: CI | |
| # runners are noisy, and a real 3-run flood under a wall-clock | |
| # watchdog flaked contributors red (3 prior timing fixes in git | |
| # history). We only assert "the harness runs end to end"; real | |
| # numbers are produced attended (see README). | |
| - name: DOM terminal flood benchmark (smoke, 1 run) | |
| if: runner.os == 'macOS' | |
| run: node bench/run.js flood --runs 1 | |
| - name: Engine-placement benchmark (smoke, 1 run each) | |
| if: runner.os == 'macOS' | |
| run: | | |
| node bench/engine-placement.js --runs 1 --repeat 10 | |
| node scripts/engine-placement-chart.js | |
| # PTY race is a headline result (issue #10 sweep) but never ran in | |
| # CI, so node-pty's Electron ABI + the harness could silently rot. | |
| # Rebuild node-pty for Electron and run a tiny smoke of both a DOM | |
| # and the native backend. | |
| - name: PTY race (smoke; node-pty rebuilt for Electron) | |
| if: runner.os == 'macOS' | |
| run: | | |
| npx @electron/rebuild -f -w node-pty | |
| node bench/run.js pty --mb 2 --runs 1 --skip-web | |
| - name: DOM terminal benchmarks (Electron under xvfb) | |
| if: runner.os == 'Linux' | |
| # SwiftShader WebGL2 is blocklisted by default on GPU-less machines; | |
| # both flags are required for the WebGL addon to initialize. | |
| run: | | |
| xvfb-run --auto-servernum npx electron --no-sandbox \ | |
| --enable-unsafe-swiftshader --ignore-gpu-blocklist \ | |
| bench/flood-dom-main.js --backend xterm | |
| xvfb-run --auto-servernum npx electron --no-sandbox \ | |
| --enable-unsafe-swiftshader --ignore-gpu-blocklist \ | |
| bench/flood-dom-main.js --backend ghostty-web | |
| - name: Job summary | |
| if: always() | |
| shell: bash | |
| run: node scripts/ci-summary.js >> "$GITHUB_STEP_SUMMARY" | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: results-${{ runner.os == 'macOS' && 'macos' || 'linux' }} | |
| path: results/ | |
| if-no-files-found: ignore |