Skip to content
This repository was archived by the owner on Oct 31, 2026. It is now read-only.

Commit ecb10d9

Browse files
committed
fix(build): install zig for pty builds, bump vendored version defaults
1 parent d5ea5f3 commit ecb10d9

5 files changed

Lines changed: 23 additions & 13 deletions

File tree

‎.github/workflows/build-vendors.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ on:
2525
required: false
2626
default: ''
2727
opentui_version:
28-
description: 'libopentui version (empty = resolve from upstream_tag, else 0.5.16)'
28+
description: 'libopentui version (empty = resolve from upstream_tag, else 0.5.17)'
2929
required: false
3030
default: ''
3131
pty_version:
3232
description: 'opencode-pty version (empty = resolve from upstream_tag, else 0.2.0)'
3333
required: false
3434
default: ''
3535
bun_pty_version:
36-
description: 'bun-pty version (empty = resolve from upstream_tag, else 0.4.9)'
36+
description: 'bun-pty version (empty = resolve from upstream_tag, else 0.4.11)'
3737
required: false
3838
default: ''
3939

@@ -73,9 +73,9 @@ jobs:
7373
# Single grouped write (SC2129). Explicit inputs win, then the
7474
# upstream resolution, then the currently-vendored versions.
7575
{
76-
echo "opentui_version=${INPUT_OPENTUI:-${OPENTUI_V:-0.5.16}}"
76+
echo "opentui_version=${INPUT_OPENTUI:-${OPENTUI_V:-0.5.17}}"
7777
echo "pty_version=${INPUT_PTY:-${PTY_V:-0.2.0}}"
78-
echo "bun_pty_version=${INPUT_BUN_PTY:-${BUN_PTY_V:-0.4.9}}"
78+
echo "bun_pty_version=${INPUT_BUN_PTY:-${BUN_PTY_V:-0.4.11}}"
7979
} >> "$GITHUB_OUTPUT"
8080
8181
build:
@@ -112,7 +112,9 @@ jobs:
112112
df -h / /tmp
113113
114114
- name: Install Zig
115-
if: steps.plan.outputs.need_libopentui == 'true'
115+
# opencode-pty's build.rs also needs zig (it builds ghostty's vt
116+
# parser via `zig build`), so install it for pty builds too.
117+
if: steps.plan.outputs.need_libopentui == 'true' || steps.plan.outputs.need_pty == 'true'
116118
run: |
117119
cd /tmp || exit
118120
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz" -O zig.tar.xz

‎.github/workflows/build-weekly.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ jobs:
136136
bash scripts/build-vendors.sh --plan >> "$GITHUB_OUTPUT"
137137
138138
- name: Install Zig
139-
if: steps.vendors.outputs.need_libopentui == 'true'
139+
# opencode-pty's build.rs also needs zig (it builds ghostty's vt
140+
# parser via `zig build`), so install it for pty builds too.
141+
if: steps.vendors.outputs.need_libopentui == 'true' || steps.vendors.outputs.need_pty == 'true'
140142
run: |
141143
cd /tmp || exit
142144
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz" -O zig.tar.xz

‎scripts/build-libopentui-ci.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
set -euo pipefail
99

1010
REPO_ROOT="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
11-
OPENTUI_VERSION="${OPENTUI_VERSION:-0.5.16}"
11+
OPENTUI_VERSION="${OPENTUI_VERSION:-0.5.17}"
1212
ANDROID_API="${ANDROID_API:-29}"
1313
NDK_DIR="${NDK_DIR:-/opt/android-ndk}"
1414
WORK="${WORK:-$REPO_ROOT/work}"

‎scripts/build-pty-android-ci.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
# 2. librust_pty cdylib (sursaone/bun-pty at $BUN_PTY_VERSION, rust-pty crate),
77
# for bun-pty inline sessions (Bun compile embeds librust_pty_arm64.so).
88
# Env: REPO_ROOT (this repo), PTY_VERSION, BUN_PTY_VERSION, NDK_DIR, ANDROID_API.
9-
# Requires: cargo + rustup target aarch64-linux-android + NDK clang.
9+
# Requires: cargo + rustup target aarch64-linux-android + NDK clang + zig
10+
# (opencode-pty's build.rs vendors ghostty's vt parser via `zig build`).
1011
set -euo pipefail
1112

1213
REPO_ROOT="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
1314
PTY_VERSION="${PTY_VERSION:-0.2.0}"
14-
BUN_PTY_VERSION="${BUN_PTY_VERSION:-0.4.9}"
15+
BUN_PTY_VERSION="${BUN_PTY_VERSION:-0.4.11}"
1516
ANDROID_API="${ANDROID_API:-29}"
1617
NDK_DIR="${NDK_DIR:-/opt/android-ndk}"
1718
WORK="${WORK:-$REPO_ROOT/work}"

‎scripts/build-vendors.sh‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
# --force rebuild even when the vendor files exist (also: FORCE=1)
1515
# --commit git add/commit/push rebuilt vendor files (CI; default: off)
1616
# --vendors all (default), libopentui, pty, or comma combos (also: VENDORS=)
17-
# Env: REPO_ROOT, OUT, WORK, OPENTUI_VERSION (0.5.16), PTY_VERSION (0.2.0),
18-
# BUN_PTY_VERSION (0.4.9), NDK_DIR (/opt/android-ndk), ANDROID_API (29).
17+
# Env: REPO_ROOT, OUT, WORK, OPENTUI_VERSION (0.5.17), PTY_VERSION (0.2.0),
18+
# BUN_PTY_VERSION (0.4.11), NDK_DIR (/opt/android-ndk), ANDROID_API (29).
1919
set -euo pipefail
2020

2121
REPO_ROOT="${REPO_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
2222
OUT="${OUT:-$REPO_ROOT/out}"
2323
WORK="${WORK:-$REPO_ROOT/work}"
24-
OPENTUI_VERSION="${OPENTUI_VERSION:-0.5.16}"
24+
OPENTUI_VERSION="${OPENTUI_VERSION:-0.5.17}"
2525
PTY_VERSION="${PTY_VERSION:-0.2.0}"
26-
BUN_PTY_VERSION="${BUN_PTY_VERSION:-0.4.9}"
26+
BUN_PTY_VERSION="${BUN_PTY_VERSION:-0.4.11}"
2727
NDK_DIR="${NDK_DIR:-/opt/android-ndk}"
2828
ANDROID_API="${ANDROID_API:-29}"
2929
VENDORS="${VENDORS:-all}"
@@ -122,6 +122,11 @@ require_pty_toolchain() {
122122
echo "cargo missing (needed to build pty natives ${PTY_VERSION}/${BUN_PTY_VERSION} from source)" >&2
123123
exit 1
124124
}
125+
# opencode-pty's build.rs shells out to `zig build` (ghostty vt parser).
126+
command -v zig >/dev/null 2>&1 || {
127+
echo "zig missing (needed to build pty natives ${PTY_VERSION}/${BUN_PTY_VERSION} from source: opencode-pty vendors ghostty via zig)" >&2
128+
exit 1
129+
}
125130
test -x "$NDK_DIR/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android${ANDROID_API}-clang" || {
126131
echo "no NDK clang at $NDK_DIR (needed to build pty natives from source)" >&2
127132
exit 1

0 commit comments

Comments
 (0)