mirror of
https://github.com/anomalyco/opentui.git
synced 2026-09-19 01:26:03 +08:00
532917707b
Mechanically migrate core to Zig 0.16 without changing behavior, ownership or api. - Pin Zig `0.16.0` - Port the build graph to 0.16 module-level C/C++ APIs; replace `@cImport` with Translate-C for miniaudio and Yoga. - Add one process-lifetime `std.Io.Threaded.init_single_threaded` seam; keep existing `std.Thread.spawn` for renderer/audio (no `Io.async` / `Evented` yet) - Migrate locks, clocks, writers, allocators, and removed std APIs - Forward SSH/mosh markers in auto terminal env so remote sessions do not inherit host capabilities - Upgrade to Unicode 17 data from `uucode` **Out of scope:** `std.Io.Evented`, renderer/FFI redesign, fixing pre-existing issues. | Surface | Result | | ------------------------------ | ------------------ | | Production exports | 347 unchanged | | Linux dynamic export names | Identical (1,760) | | TS FFI struct layouts | Byte-identical | | Linux glibc floor | Still `GLIBC_2.17` | | Release targets / native paths | Unchanged |
139 lines
3.2 KiB
YAML
139 lines
3.2 KiB
YAML
name: Build Keymap
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
NODE_VERSION: 26.4.0
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }})
|
|
strategy:
|
|
matrix:
|
|
os: [blacksmith-8vcpu-ubuntu-2404, blacksmith-8vcpu-windows-2025]
|
|
runs-on: ${{ matrix.os }}
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.3.14
|
|
|
|
- name: Setup Zig
|
|
uses: mlugg/setup-zig@v2
|
|
with:
|
|
version: 0.16.0
|
|
use-cache: false
|
|
|
|
- name: Restore Zig cache
|
|
if: runner.os != 'Windows'
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: .zig-cache
|
|
key: zig-v1-${{ runner.os }}-0.16.0-${{ github.run_id }}-${{ github.job }}
|
|
restore-keys: zig-v1-${{ runner.os }}-0.16.0-
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
|
|
- name: Build core
|
|
run: |
|
|
cd packages/core
|
|
bun run build
|
|
|
|
- name: Build
|
|
run: |
|
|
cd packages/keymap
|
|
bun run build --ci
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd packages/keymap
|
|
bun run test
|
|
|
|
packed-consumer:
|
|
name: Packed Consumer Smoke
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Setup Zig
|
|
uses: mlugg/setup-zig@v2
|
|
with:
|
|
version: 0.16.0
|
|
use-cache: false
|
|
|
|
- name: Restore Zig cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: .zig-cache
|
|
key: zig-v1-${{ runner.os }}-0.16.0-${{ github.run_id }}-${{ github.job }}
|
|
restore-keys: zig-v1-${{ runner.os }}-0.16.0-
|
|
|
|
- name: Install dependencies
|
|
run: bun install
|
|
|
|
- name: Build core
|
|
run: |
|
|
cd packages/core
|
|
bun run build
|
|
|
|
- name: Build keymap
|
|
run: |
|
|
cd packages/keymap
|
|
bun run build --ci
|
|
|
|
- name: Run packed consumer smoke test
|
|
run: |
|
|
cd packages/keymap
|
|
bun run test:dist --skip-build
|
|
|
|
build-complete:
|
|
name: Keymap - Build and Test
|
|
needs: [test, packed-consumer]
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
if: always()
|
|
steps:
|
|
- name: Check test results
|
|
run: |
|
|
if [ "${{ needs.test.result }}" != "success" ]; then
|
|
echo "Tests failed"
|
|
exit 1
|
|
fi
|
|
if [ "${{ needs.packed-consumer.result }}" != "success" ]; then
|
|
echo "Packed consumer smoke test failed"
|
|
exit 1
|
|
fi
|
|
echo "All tests passed"
|